Documentation ¶
Index ¶
- func HexToAscii(ch1 rune, ch2 rune) rune
- func IsHex(ch rune) bool
- func IsLetter(value string) bool
- func Max(x int, y int) int
- func Min(x int, y int) int
- func SplitKeep(target string, split string) []string
- func Window[T any](array []T, size int) [][]T
- type AstAtom
- type AstBranch
- type AstCharacterClass
- type AstCharacterClassType
- type AstCommand
- type AstDec
- type AstExpression
- type AstFind
- type AstList
- type AstListable
- type AstLiteral
- type AstLoop
- type AstPrimary
- type AstProcessBinaryExpression
- type AstProcessBoolean
- type AstProcessBreak
- type AstProcessContinue
- type AstProcessDebug
- type AstProcessExpression
- type AstProcessIf
- type AstProcessLoop
- type AstProcessNumber
- type AstProcessProgram
- type AstProcessReturn
- type AstProcessSet
- type AstProcessStatement
- type AstProcessString
- type AstProcessUnaryExpression
- type AstProcessVariable
- type AstRange
- type AstReplace
- type AstSet
- type AstSetBody
- type AstSetMatches
- type AstSetPattern
- type AstSetTransform
- type AstString
- type AstSub
- type AstSubExpr
- type AstVariable
- type Branch
- type CallState
- type CallSubroutine
- type Command
- type EndNotIn
- type EndSubroutine
- type EndVarDec
- type FailNotIn
- type FindCommand
- type GenState
- type GeneratedPattern
- type GlobalState
- type Jump
- type Lexer
- type LoopState
- type Match
- type MatchCharClass
- type MatchLiteral
- type MatchRange
- type MatchVariable
- type Matches
- type MemoryStream
- type Optional
- type Path
- type PathEntry
- type PathEntryType
- type PositionInfo
- type ProcessContext
- type ProcessState
- type ProcessStatus
- type ProcessType
- type ProcessTypeInfo
- type ProcessValue
- type ProcessValueBoolean
- type ProcessValueNumber
- type ProcessValueString
- type Queue
- type Range
- type ReadSeekCloser
- type ReplaceCommand
- type ReplaceInstruction
- type ReplaceMode
- type ReplaceProcess
- type ReplaceString
- type ReplaceVariable
- type ReplacerState
- type SearchEngineState
- func (es *SearchEngineState) BACKTRACK()
- func (es *SearchEngineState) CALL(id int, returnOffset int)
- func (es *SearchEngineState) CHECKPOINT()
- func (es *SearchEngineState) CHECKZEROMATCHLOOP() bool
- func (es *SearchEngineState) CONSUME(amount int)
- func (es *SearchEngineState) Copy() *SearchEngineState
- func (es *SearchEngineState) ENDVAR(name string)
- func (es *SearchEngineState) FAIL()
- func (es *SearchEngineState) GETITERATIONSTEP() int
- func (es *SearchEngineState) GETPC() int
- func (es *SearchEngineState) INCLOOPSTACK()
- func (es *SearchEngineState) INITLOOPSTACK(loopId int64, name string) bool
- func (es *SearchEngineState) INSERTVARIABLE(name string, value Value)
- func (es *SearchEngineState) JUMP(pc int)
- func (es *SearchEngineState) MATCH(value string, not bool, caseless bool)
- func (es *SearchEngineState) MATCHANY(not bool)
- func (es *SearchEngineState) MATCHFILEEND(not bool)
- func (es *SearchEngineState) MATCHFILESTART(not bool)
- func (es *SearchEngineState) MATCHLETTER(not bool)
- func (es *SearchEngineState) MATCHLINEEND(not bool)
- func (es *SearchEngineState) MATCHLINESTART(not bool)
- func (es *SearchEngineState) MATCHOPTIONS(options []string, not bool)
- func (es *SearchEngineState) MATCHRANGE(from string, to string, not bool)
- func (es *SearchEngineState) MATCHVAR(name string)
- func (es *SearchEngineState) MATCHWHOLEFILE(not bool)
- func (es *SearchEngineState) MATCHWHOLELINE(not bool)
- func (es *SearchEngineState) MATCHWHOLEWORD(not bool)
- func (es *SearchEngineState) MATCHWORDEND(not bool)
- func (es *SearchEngineState) MATCHWORDSTART(not bool)
- func (es *SearchEngineState) MakeMatch(matchNumber int) Match
- func (es *SearchEngineState) NEXT()
- func (es *SearchEngineState) POPLOOPSTACK() LoopState
- func (es *SearchEngineState) PUSHLOOPSTACK(loopState LoopState)
- func (es *SearchEngineState) READ(length int) string
- func (es *SearchEngineState) READAT(offset int, length int) string
- func (es *SearchEngineState) RETURN()
- func (es *SearchEngineState) SEEK()
- func (es *SearchEngineState) SEEKTO(offset int)
- func (es *SearchEngineState) STARTVAR(name string)
- func (es *SearchEngineState) SUCCESS()
- func (es *SearchEngineState) Set(value *SearchEngineState)
- func (es *SearchEngineState) VALIDATECALL(id int, returnOffset int)
- type SearchInstruction
- type SetCommand
- type SetCommandBody
- type SetCommandExpression
- type SetCommandMatches
- type SetCommandTransform
- type Stack
- type StartLoop
- type StartNotIn
- type StartSubroutine
- type StartVarDec
- type Status
- type StopLoop
- type StringReadSeekCloser
- type Token
- type TokenType
- type VBufferedFile
- type VReader
- type VWriter
- type Value
- type ValueHashMap
- type ValueString
- type ValueType
- type VariableRecord
- type Vore
- type VoreError
- type WriteSeekCloser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HexToAscii ¶
Types ¶
type AstCharacterClass ¶
type AstCharacterClass struct {
// contains filtered or unexported fields
}
type AstCharacterClassType ¶
type AstCharacterClassType int
const ( ClassAny AstCharacterClassType = iota ClassWhitespace ClassDigit ClassUpper ClassLower ClassLetter ClassLineStart ClassFileStart ClassWordStart ClassLineEnd ClassFileEnd ClassWordEnd ClassWholeLine ClassWholeFile ClassWholeWord )
type AstCommand ¶
type AstCommand interface {
// contains filtered or unexported methods
}
type AstExpression ¶
type AstExpression interface {
// contains filtered or unexported methods
}
type AstListable ¶
type AstListable interface {
// contains filtered or unexported methods
}
type AstLiteral ¶
type AstLiteral interface {
// contains filtered or unexported methods
}
type AstPrimary ¶
type AstPrimary struct {
// contains filtered or unexported fields
}
type AstProcessBinaryExpression ¶
type AstProcessBinaryExpression struct {
// contains filtered or unexported fields
}
type AstProcessBoolean ¶
type AstProcessBoolean struct {
// contains filtered or unexported fields
}
type AstProcessBreak ¶
type AstProcessBreak struct{}
type AstProcessContinue ¶
type AstProcessContinue struct{}
type AstProcessDebug ¶
type AstProcessDebug struct {
// contains filtered or unexported fields
}
type AstProcessExpression ¶
type AstProcessExpression interface {
// contains filtered or unexported methods
}
type AstProcessIf ¶
type AstProcessIf struct {
// contains filtered or unexported fields
}
type AstProcessLoop ¶
type AstProcessLoop struct {
// contains filtered or unexported fields
}
type AstProcessNumber ¶
type AstProcessNumber struct {
// contains filtered or unexported fields
}
type AstProcessProgram ¶
type AstProcessProgram []AstProcessStatement
type AstProcessReturn ¶
type AstProcessReturn struct {
// contains filtered or unexported fields
}
type AstProcessSet ¶
type AstProcessSet struct {
// contains filtered or unexported fields
}
type AstProcessStatement ¶
type AstProcessStatement interface {
// contains filtered or unexported methods
}
type AstProcessString ¶
type AstProcessString struct {
// contains filtered or unexported fields
}
type AstProcessUnaryExpression ¶
type AstProcessUnaryExpression struct {
// contains filtered or unexported fields
}
type AstProcessVariable ¶
type AstProcessVariable struct {
// contains filtered or unexported fields
}
type AstReplace ¶
type AstReplace struct {
// contains filtered or unexported fields
}
type AstSetBody ¶
type AstSetBody interface {
// contains filtered or unexported methods
}
type AstSetMatches ¶
type AstSetMatches struct {
// contains filtered or unexported fields
}
type AstSetPattern ¶
type AstSetPattern struct {
// contains filtered or unexported fields
}
type AstSetTransform ¶
type AstSetTransform struct {
// contains filtered or unexported fields
}
type AstSubExpr ¶
type AstSubExpr struct {
// contains filtered or unexported fields
}
type AstVariable ¶
type AstVariable struct {
// contains filtered or unexported fields
}
type CallSubroutine ¶
type CallSubroutine struct {
// contains filtered or unexported fields
}
type EndSubroutine ¶
type EndSubroutine struct {
// contains filtered or unexported fields
}
type FindCommand ¶
type FindCommand struct {
// contains filtered or unexported fields
}
type GeneratedPattern ¶
type GeneratedPattern struct {
// contains filtered or unexported fields
}
type GlobalState ¶
type GlobalState struct { }
type Match ¶
type Match struct { Filename string MatchNumber int Offset Range Line Range Column Range Value string Replacement Optional[string] Variables ValueHashMap }
func (Match) FormattedJson ¶
type MatchCharClass ¶
type MatchCharClass struct {
// contains filtered or unexported fields
}
type MatchLiteral ¶
type MatchLiteral struct {
// contains filtered or unexported fields
}
type MatchRange ¶
type MatchRange struct {
// contains filtered or unexported fields
}
type MatchVariable ¶
type MatchVariable struct {
// contains filtered or unexported fields
}
type MemoryStream ¶
type MemoryStream struct {
// contains filtered or unexported fields
}
func NewMemoryStream ¶
func NewMemoryStream() *MemoryStream
func (*MemoryStream) Close ¶
func (ms *MemoryStream) Close() error
type Optional ¶
type Optional[T any] struct { // contains filtered or unexported fields }
func (Optional[T]) GetValueOrDefault ¶
func (o Optional[T]) GetValueOrDefault(def T) T
type Path ¶
type Path struct {
// contains filtered or unexported fields
}
func (*Path) GetFileList ¶
type PathEntryType ¶
type PathEntryType int
const ( Directory PathEntryType = iota WildcardDirectory File WildcardFile )
type PositionInfo ¶
type PositionInfo struct {
// contains filtered or unexported fields
}
type ProcessContext ¶
type ProcessContext int
const ( PREDICATE ProcessContext = iota TRANSFORMATION )
type ProcessState ¶
type ProcessState struct {
// contains filtered or unexported fields
}
type ProcessStatus ¶
type ProcessStatus int
const ( NEXT ProcessStatus = iota BREAKLOOP CONTINUELOOP RETURNING )
type ProcessType ¶
type ProcessType int
const ( PTUNKNOWN ProcessType = iota PTOK PTERROR PTSTRING PTNUMBER PTBOOLEAN )
type ProcessTypeInfo ¶
type ProcessTypeInfo struct {
// contains filtered or unexported fields
}
type ProcessValue ¶
type ProcessValue interface {
// contains filtered or unexported methods
}
type ProcessValueBoolean ¶
type ProcessValueBoolean struct {
// contains filtered or unexported fields
}
type ProcessValueNumber ¶
type ProcessValueNumber struct {
// contains filtered or unexported fields
}
type ProcessValueString ¶
type ProcessValueString struct {
// contains filtered or unexported fields
}
type ReadSeekCloser ¶
type ReplaceCommand ¶
type ReplaceCommand struct {
// contains filtered or unexported fields
}
type ReplaceInstruction ¶
type ReplaceInstruction interface {
// contains filtered or unexported methods
}
type ReplaceProcess ¶
type ReplaceProcess struct {
// contains filtered or unexported fields
}
type ReplaceString ¶
type ReplaceString struct {
// contains filtered or unexported fields
}
type ReplaceVariable ¶
type ReplaceVariable struct {
// contains filtered or unexported fields
}
type ReplacerState ¶
type ReplacerState struct {
// contains filtered or unexported fields
}
func InitReplacerState ¶
func InitReplacerState(match Match, totalMatches int) *ReplacerState
func (*ReplacerState) Copy ¶
func (rs *ReplacerState) Copy() *ReplacerState
func (*ReplacerState) NEXT ¶
func (rs *ReplacerState) NEXT()
func (*ReplacerState) Set ¶
func (rs *ReplacerState) Set(from *ReplacerState)
func (*ReplacerState) WRITESTRING ¶
func (rs *ReplacerState) WRITESTRING(value string)
func (*ReplacerState) WRITEVAR ¶
func (rs *ReplacerState) WRITEVAR(name string)
type SearchEngineState ¶
type SearchEngineState struct {
// contains filtered or unexported fields
}
func CreateState ¶
func (*SearchEngineState) BACKTRACK ¶
func (es *SearchEngineState) BACKTRACK()
func (*SearchEngineState) CALL ¶
func (es *SearchEngineState) CALL(id int, returnOffset int)
func (*SearchEngineState) CHECKPOINT ¶
func (es *SearchEngineState) CHECKPOINT()
func (*SearchEngineState) CHECKZEROMATCHLOOP ¶
func (es *SearchEngineState) CHECKZEROMATCHLOOP() bool
func (*SearchEngineState) CONSUME ¶
func (es *SearchEngineState) CONSUME(amount int)
func (*SearchEngineState) Copy ¶
func (es *SearchEngineState) Copy() *SearchEngineState
func (*SearchEngineState) ENDVAR ¶
func (es *SearchEngineState) ENDVAR(name string)
func (*SearchEngineState) FAIL ¶
func (es *SearchEngineState) FAIL()
func (*SearchEngineState) GETITERATIONSTEP ¶
func (es *SearchEngineState) GETITERATIONSTEP() int
func (*SearchEngineState) GETPC ¶
func (es *SearchEngineState) GETPC() int
func (*SearchEngineState) INCLOOPSTACK ¶
func (es *SearchEngineState) INCLOOPSTACK()
func (*SearchEngineState) INITLOOPSTACK ¶
func (es *SearchEngineState) INITLOOPSTACK(loopId int64, name string) bool
func (*SearchEngineState) INSERTVARIABLE ¶
func (es *SearchEngineState) INSERTVARIABLE(name string, value Value)
func (*SearchEngineState) JUMP ¶
func (es *SearchEngineState) JUMP(pc int)
func (*SearchEngineState) MATCH ¶
func (es *SearchEngineState) MATCH(value string, not bool, caseless bool)
func (*SearchEngineState) MATCHANY ¶
func (es *SearchEngineState) MATCHANY(not bool)
func (*SearchEngineState) MATCHFILEEND ¶
func (es *SearchEngineState) MATCHFILEEND(not bool)
func (*SearchEngineState) MATCHFILESTART ¶
func (es *SearchEngineState) MATCHFILESTART(not bool)
func (*SearchEngineState) MATCHLETTER ¶
func (es *SearchEngineState) MATCHLETTER(not bool)
func (*SearchEngineState) MATCHLINEEND ¶
func (es *SearchEngineState) MATCHLINEEND(not bool)
func (*SearchEngineState) MATCHLINESTART ¶
func (es *SearchEngineState) MATCHLINESTART(not bool)
func (*SearchEngineState) MATCHOPTIONS ¶
func (es *SearchEngineState) MATCHOPTIONS(options []string, not bool)
func (*SearchEngineState) MATCHRANGE ¶
func (es *SearchEngineState) MATCHRANGE(from string, to string, not bool)
func (*SearchEngineState) MATCHVAR ¶
func (es *SearchEngineState) MATCHVAR(name string)
func (*SearchEngineState) MATCHWHOLEFILE ¶
func (es *SearchEngineState) MATCHWHOLEFILE(not bool)
func (*SearchEngineState) MATCHWHOLELINE ¶
func (es *SearchEngineState) MATCHWHOLELINE(not bool)
func (*SearchEngineState) MATCHWHOLEWORD ¶
func (es *SearchEngineState) MATCHWHOLEWORD(not bool)
func (*SearchEngineState) MATCHWORDEND ¶
func (es *SearchEngineState) MATCHWORDEND(not bool)
func (*SearchEngineState) MATCHWORDSTART ¶
func (es *SearchEngineState) MATCHWORDSTART(not bool)
func (*SearchEngineState) MakeMatch ¶
func (es *SearchEngineState) MakeMatch(matchNumber int) Match
func (*SearchEngineState) NEXT ¶
func (es *SearchEngineState) NEXT()
func (*SearchEngineState) POPLOOPSTACK ¶
func (es *SearchEngineState) POPLOOPSTACK() LoopState
func (*SearchEngineState) PUSHLOOPSTACK ¶
func (es *SearchEngineState) PUSHLOOPSTACK(loopState LoopState)
func (*SearchEngineState) READ ¶
func (es *SearchEngineState) READ(length int) string
func (*SearchEngineState) READAT ¶
func (es *SearchEngineState) READAT(offset int, length int) string
func (*SearchEngineState) RETURN ¶
func (es *SearchEngineState) RETURN()
func (*SearchEngineState) SEEK ¶
func (es *SearchEngineState) SEEK()
func (*SearchEngineState) SEEKTO ¶
func (es *SearchEngineState) SEEKTO(offset int)
func (*SearchEngineState) STARTVAR ¶
func (es *SearchEngineState) STARTVAR(name string)
func (*SearchEngineState) SUCCESS ¶
func (es *SearchEngineState) SUCCESS()
func (*SearchEngineState) Set ¶
func (es *SearchEngineState) Set(value *SearchEngineState)
func (*SearchEngineState) VALIDATECALL ¶
func (es *SearchEngineState) VALIDATECALL(id int, returnOffset int)
type SearchInstruction ¶
type SearchInstruction interface {
// contains filtered or unexported methods
}
type SetCommand ¶
type SetCommand struct {
// contains filtered or unexported fields
}
type SetCommandBody ¶
type SetCommandBody interface {
// contains filtered or unexported methods
}
type SetCommandExpression ¶
type SetCommandExpression struct {
// contains filtered or unexported fields
}
type SetCommandMatches ¶
type SetCommandMatches struct {
// contains filtered or unexported fields
}
type SetCommandTransform ¶
type SetCommandTransform struct {
// contains filtered or unexported fields
}
type StartNotIn ¶
type StartNotIn struct {
// contains filtered or unexported fields
}
type StartSubroutine ¶
type StartSubroutine struct {
// contains filtered or unexported fields
}
type StartVarDec ¶
type StartVarDec struct {
// contains filtered or unexported fields
}
type StringReadSeekCloser ¶
type StringReadSeekCloser struct {
// contains filtered or unexported fields
}
func NewStringReadCloser ¶
func NewStringReadCloser(value string) *StringReadSeekCloser
func (*StringReadSeekCloser) Close ¶
func (srsc *StringReadSeekCloser) Close() error
type TokenType ¶
type TokenType int
const ( // special tokens ERROR TokenType = iota EOF WS COMMENT // literals IDENTIFIER NUMBER STRING REGEXP // misc EQUAL COLONEQ COMMA OPENPAREN CLOSEPAREN OPENCURLY CLOSECURLY PLUS MINUS MULT DIV LESS GREATER LESSEQ GREATEREQ DEQUAL NEQUAL MOD // commands FIND REPLACE WITH SET TO PATTERN MATCHES TRANSFORM // result length ALL SKIP TAKE TOP LAST // classes ANY WHITESPACE DIGIT UPPER LOWER LETTER WHOLE LINE FILE WORD START END BEGIN // keywords CASELESS NOT AT LEAST MOST BETWEEN AND EXACTLY MAYBE FEWEST NAMED IN OR IF THEN ELSE DEBUG RETURN HEAD TAIL LOOP BREAK CONTINUE TRUE FALSE )
type VBufferedFile ¶
type VBufferedFile struct {
// contains filtered or unexported fields
}
func NewVBufferedFile ¶
func NewVBufferedFile(file *os.File, fileSize int64) *VBufferedFile
func (*VBufferedFile) Close ¶
func (v *VBufferedFile) Close() error
type VReader ¶
type VReader struct {
// contains filtered or unexported fields
}
func VReaderFromFile ¶
func VReaderFromFileToMemory ¶
func VReaderFromString ¶
type VWriter ¶
type VWriter struct {
// contains filtered or unexported fields
}
func VWriterFromFile ¶
func VWriterFromMemory ¶
func VWriterFromMemory() *VWriter
type Value ¶
type Value interface { String() ValueString Hashmap() ValueHashMap Copy() Value // contains filtered or unexported methods }
type ValueHashMap ¶
func NewValueHashMap ¶
func NewValueHashMap() ValueHashMap
func (ValueHashMap) Add ¶
func (v ValueHashMap) Add(name string, value Value)
func (ValueHashMap) Copy ¶
func (v ValueHashMap) Copy() Value
func (ValueHashMap) Hashmap ¶
func (v ValueHashMap) Hashmap() ValueHashMap
func (ValueHashMap) Keys ¶
func (v ValueHashMap) Keys() []string
func (ValueHashMap) Len ¶
func (v ValueHashMap) Len() int
func (ValueHashMap) String ¶
func (v ValueHashMap) String() ValueString
type ValueString ¶
type ValueString struct {
Value string
}
func NewValueString ¶
func NewValueString(value string) ValueString
func (ValueString) Copy ¶
func (v ValueString) Copy() Value
func (ValueString) Hashmap ¶
func (v ValueString) Hashmap() ValueHashMap
func (ValueString) String ¶
func (v ValueString) String() ValueString
type VariableRecord ¶
type VariableRecord struct {
// contains filtered or unexported fields
}
type VoreError ¶
func NewFileError ¶
func NewGenError ¶
func NewLexErrorCustomMsg ¶
func NewLexErrorUnknown ¶
func NewParseError ¶
Click to show internal directories.
Click to hide internal directories.