Documentation
¶
Overview ¶
Package lpg2 Package command provides console operations, like options/arguments reading.
Package lpg2 Package gerror provides simple functions to manipulate errors.
Very note that, this package is quite a base package, which should not import extra packages except standard packages, to avoid cycle imports.
Package lpg2 Package gstr provides functions for string handling.
Index ¶
- Constants
- Variables
- func AddSlashes(str string) string
- func AppendRune(str string, c rune) string
- func Arraycopy(src []int, srcPos int, dest []int, destPos int, length int) []int
- func Cause(err error) error
- func CharAt(str string, start int) rune
- func Chr(ascii int) string
- func ChunkSplit(body string, chunkLen int, end string) string
- func Code(err error) int
- func Compare(a, b string) int
- func ContainsOpt(Name string) bool
- func Count(s, substr string) int
- func CountChars(str string, noSpace ...bool) map[string]int
- func CountI(s, substr string) int
- func CountWords(str string) map[string]int
- func Current(err error) error
- func Equal(a, b string) bool
- func EqualFoldWithoutChars(s1, s2 string) bool
- func Explode(delimiter, str string) []string
- func Fields(str string) []string
- func GetArg(index int, def ...string) string
- func GetArgAll() []string
- func GetOpt(Name string, def ...string) string
- func GetOptAll() map[string]string
- func GetOptWithEnv(key string, def ...string) string
- func HasPrefix(s, prefix string) bool
- func HasSuffix(s, suffix string) bool
- func HideStr(str string, percent int, hide string) string
- func Implode(glue string, pieces []string) string
- func InArray(a []string, s string) bool
- func Init(args ...string)
- func IsDebugEnabled() bool
- func IsLetter(b byte) bool
- func IsLetterLower(b byte) bool
- func IsLetterUpper(b byte) bool
- func IsNumeric(s string) bool
- func Join(array []string, sep string) string
- func LcFirst(s string) string
- func LenRune(str string) int
- func New(text string) error
- func NewCode(code int, text string) error
- func NewCodeSkip(code, skip int, text string) error
- func NewCodeSkipf(code, skip int, format string, args ...interface{}) error
- func NewCodef(code int, format string, args ...interface{}) error
- func NewErr(text string) error
- func NewSkip(skip int, text string) error
- func NewSkipf(skip int, format string, args ...interface{}) error
- func Newf(format string, args ...interface{}) error
- func Next(err error) error
- func Nl2Br(str string, isXhtml ...bool) string
- func Now() int
- func NumberFormat(number float64, decimals int, decPoint, thousandsSep string) string
- func ObjectArraycopy(src []interface{}, srcPos int, dest []interface{}, destPos int, length int) []interface{}
- func Ord(char string) int
- func QuoteMeta(str string, chars ...string) string
- func RemoveSymbols(s string) string
- func Repeat(input string, multiplier int) string
- func Replace(origin, search, replace string, count ...int) string
- func ReplaceByArray(origin string, array []string) string
- func ReplaceByMap(origin string, replaces map[string]string) string
- func ReplaceI(origin, search, replace string, count ...int) string
- func ReplaceIByArray(origin string, array []string) string
- func ReplaceIByMap(origin string, replaces map[string]string) string
- func Reverse(str string) string
- func RuneLen(str string) int
- func SearchArray(a []string, s string) int
- func Split(str, delimiter string) []string
- func SplitAndTrim(str, delimiter string, characterMask ...string) []string
- func SplitAndTrimSpace(str, delimiter string) []string
- func Stack(err error) string
- func Str(haystack string, needle string) string
- func StrEx(haystack string, needle string) string
- func StrLimit(str string, length int, suffix ...string) string
- func StrLimitRune(str string, length int, suffix ...string) string
- func StrTill(haystack string, needle string) string
- func StrTillEx(haystack string, needle string) string
- func StringSliceEqual(a, b []string) bool
- func StripSlashes(str string) string
- func SubStr(str string, start int, length ...int) string
- func SubStrRune(str string, start int, length ...int) (substr string)
- func SubStrRuneRange(str string, start int, length ...int) ([]rune, int, int)
- func ToLower(s string) string
- func ToUpper(s string) string
- func Trim(str string, characterMask ...string) string
- func UcFirst(s string) string
- func UcWords(str string) string
- func WordWrap(str string, width int, br string) string
- func Wrap(err error, text string) error
- func WrapCode(code int, err error, text string) error
- func WrapCodeSkip(code, skip int, err error, text string) error
- func WrapCodeSkipf(code, skip int, err error, format string, args ...interface{}) error
- func WrapCodef(code int, err error, format string, args ...interface{}) error
- func WrapSkip(skip int, err error, text string) error
- func WrapSkipf(skip int, err error, format string, args ...interface{}) error
- func Wrapf(err error, format string, args ...interface{}) error
- type AbstractToken
- func (a *AbstractToken) GetAdjunctIndex() int
- func (a *AbstractToken) GetColumn() int
- func (a *AbstractToken) GetEndColumn() int
- func (a *AbstractToken) GetEndLine() int
- func (a *AbstractToken) GetEndOffset() int
- func (a *AbstractToken) GetFollowingAdjuncts() []IToken
- func (a *AbstractToken) GetILexStream() ILexStream
- func (a *AbstractToken) GetIPrsStream() IPrsStream
- func (a *AbstractToken) GetKind() int
- func (a *AbstractToken) GetLine() int
- func (a *AbstractToken) GetPrecedingAdjuncts() []IToken
- func (a *AbstractToken) GetStartOffset() int
- func (a *AbstractToken) GetTokenIndex() int
- func (a *AbstractToken) SetAdjunctIndex(adjunctIndex int)
- func (a *AbstractToken) SetEndOffset(endOffSet int)
- func (a *AbstractToken) SetKind(kind int)
- func (a *AbstractToken) SetStartOffset(startOffSet int)
- func (a *AbstractToken) SetTokenIndex(tokenIndex int)
- func (a *AbstractToken) ToString() string
- type Adjunct
- type ArrayList
- func (a *ArrayList) Add(elem interface{}) *ArrayList
- func (a *ArrayList) At(index int) (value interface{})
- func (a *ArrayList) Clear() bool
- func (a *ArrayList) Clone() *ArrayList
- func (a *ArrayList) Contains(val interface{}) bool
- func (a *ArrayList) Get(index int) interface{}
- func (a *ArrayList) IndexOf(elem interface{}) int
- func (a *ArrayList) IsEmpty() bool
- func (a *ArrayList) LastIndexOf(elem interface{}) int
- func (a *ArrayList) Remove(value interface{}) bool
- func (a *ArrayList) RemoveAll() bool
- func (a *ArrayList) RemoveAt(index int) (value interface{}, found bool)
- func (a *ArrayList) Search(value interface{}) int
- func (a *ArrayList) Set(index int, element interface{}) bool
- func (a *ArrayList) Size() int
- func (a *ArrayList) ToArray() []interface{}
- type BacktrackingParser
- func (my *BacktrackingParser) BacktrackParse(stack []int, stack_top int, action *IntSegmentedTuple, initial_token int) int
- func (my *BacktrackingParser) BacktrackParseUpToError(initial_token int, error_token int)
- func (my *BacktrackingParser) ErrorRepair(stream IPrsStream, recovery_token int, error_token int) int
- func (my *BacktrackingParser) FindRecoveryStateIndex(start_index int) int
- func (my *BacktrackingParser) FuzzyParse() (interface{}, error)
- func (my *BacktrackingParser) FuzzyParseEntry(marker_kind int, max_error_count int) (interface{}, error)
- func (my *BacktrackingParser) FuzzyParseWithErrorCount(max_error_count int) (interface{}, error)
- func (my *BacktrackingParser) GetCurrentRule() int
- func (my *BacktrackingParser) GetFirstToken() int
- func (my *BacktrackingParser) GetFirstTokenAt(i int) int
- func (my *BacktrackingParser) GetLastToken() int
- func (my *BacktrackingParser) GetLastTokenAt(i int) int
- func (my *BacktrackingParser) GetMarkerToken(marker_kind int, start_token_index int) (int, error)
- func (my *BacktrackingParser) GetToken(i int) int
- func (my *BacktrackingParser) Lookahead(act int, token int) int
- func (my *BacktrackingParser) Parse(max_error_count int) (interface{}, error)
- func (my *BacktrackingParser) ParseActions(marker_kind int) (interface{}, error)
- func (my *BacktrackingParser) ParseEntry(marker_kind int, max_error_count int) (interface{}, error)
- func (my *BacktrackingParser) Process_backtrack_reductions(act int) int
- func (my *BacktrackingParser) Process_reductions()
- func (my *BacktrackingParser) ReallocateOtherStacks(startTokenIndex int)
- func (my *BacktrackingParser) Repairable(error_token int) bool
- func (my *BacktrackingParser) Reset(tokStream TokenStream, prs ParseTable, ra RuleAction, monitor Monitor) error
- func (my *BacktrackingParser) Reset1() error
- func (my *BacktrackingParser) Reset2(tokStream TokenStream, monitor Monitor) error
- func (my *BacktrackingParser) Reset3(tokStream TokenStream, prs ParseTable, ra RuleAction) error
- func (my *BacktrackingParser) SetMonitor(monitor Monitor)
- func (my *BacktrackingParser) TAction(act int, sym int) int
- type BadParseException
- type BadParseSymFileException
- type ConfigurationElement
- type ConfigurationStack
- func (my *ConfigurationStack) FindConfiguration(stack []int, stack_top int, curtok int) bool
- func (my *ConfigurationStack) FindOrInsertStack(root *StateElement, stack []int, index int, stack_top int) *StateElement
- func (my *ConfigurationStack) MakeStateList(parent *StateElement, stack []int, index int, stack_top int) *StateElement
- func (my *ConfigurationStack) MaxConfigurationSize() int
- func (my *ConfigurationStack) NumStateElements() int
- func (my *ConfigurationStack) Pop() *ConfigurationElement
- func (my *ConfigurationStack) Push(stack []int, stack_top int, conflict_index int, curtok int, action_length int)
- func (my *ConfigurationStack) StacksSize() int
- func (my *ConfigurationStack) Top() *ConfigurationElement
- type DeterministicParser
- func (my *DeterministicParser) ErrorReset()
- func (my *DeterministicParser) GetCurrentRule() int
- func (my *DeterministicParser) GetFirstToken() int
- func (my *DeterministicParser) GetFirstTokenAt(i int) int
- func (my *DeterministicParser) GetLastToken() int
- func (my *DeterministicParser) GetLastTokenAt(i int) int
- func (my *DeterministicParser) Lookahead(act int, token int) int
- func (my *DeterministicParser) Parse(sym []int, index int) (int, error)
- func (my *DeterministicParser) ParseActions() interface{}
- func (my *DeterministicParser) ParseEntry(marker_kind int) (interface{}, error)
- func (my *DeterministicParser) ProcessReductions()
- func (my *DeterministicParser) RecoverableState(state int) bool
- func (my *DeterministicParser) Reset(tokStream TokenStream, prs ParseTable, ra RuleAction, monitor Monitor) error
- func (my *DeterministicParser) Reset1()
- func (my *DeterministicParser) Reset2(tokStream TokenStream, monitor Monitor)
- func (my *DeterministicParser) ResetParser()
- func (my *DeterministicParser) ResetParserEntry(marker_kind int)
- func (my *DeterministicParser) SetMonitor(monitor Monitor)
- func (my *DeterministicParser) TAction(act int, sym []int, index int) int
- func (my *DeterministicParser) TAction1(act int, sym int) int
- type DiagnoseParser
- func (my *DiagnoseParser) Asb(index int) int
- func (my *DiagnoseParser) Asi(state int) int
- func (my *DiagnoseParser) BaseAction(index int) int
- func (my *DiagnoseParser) BaseCheck(index int) int
- func (my *DiagnoseParser) CheckPrimaryDistance(repair *PrimaryRepairInfo, stck []int, stack_top int)
- func (my *DiagnoseParser) Diagnose(error_token int)
- func (my *DiagnoseParser) DiagnoseEntry(marker_kind int, error_token int)
- func (my *DiagnoseParser) DiagnoseEntryWithMarkerKind(marker_kind int)
- func (my *DiagnoseParser) EmitError(msg_code int, name_index int, left_token int, right_token int, ...)
- func (my *DiagnoseParser) ErrorRecovery(error_token int) *RepairCandidate
- func (my *DiagnoseParser) GetNtermIndex(start int, sym int, buffer_position int) int
- func (my *DiagnoseParser) GetTermIndex(stck []int, stack_top int, tok int, buffer_position int) int
- func (my *DiagnoseParser) InSymb(index int) int
- func (my *DiagnoseParser) InSymbol(state int) int
- func (my *DiagnoseParser) IsNullable(symbol int) bool
- func (my *DiagnoseParser) Lhs(index int) int
- func (my *DiagnoseParser) Lookahead(act int, token int) int
- func (my *DiagnoseParser) MergeCandidate(state int, buffer_position int) int
- func (my *DiagnoseParser) MisplacementRecovery(repair *SecondaryRepairInfo, stack []int, stack_top int, last_index int, ...)
- func (my *DiagnoseParser) Misspell(sym int, tok int) int
- func (my *DiagnoseParser) Name(index int) string
- func (my *DiagnoseParser) Nasb(index int) int
- func (my *DiagnoseParser) Nasi(state int) int
- func (my *DiagnoseParser) Nasr(index int) int
- func (my *DiagnoseParser) NonterminalIndex(index int) int
- func (my *DiagnoseParser) NtAction(state int, sym int) int
- func (my *DiagnoseParser) OriginalState(state int) int
- func (my *DiagnoseParser) ParseCheck(stack []int, stack_top int, first_symbol int, buffer_position int) int
- func (my *DiagnoseParser) ParseForError(current_kind int) int
- func (my *DiagnoseParser) ParseUpToError(action *IntTuple, current_kind int, error_token int)
- func (my *DiagnoseParser) PrimaryDiagnosis(repair *PrimaryRepairInfo) *RepairCandidate
- func (my *DiagnoseParser) PrimaryPhase(error_token int) *RepairCandidate
- func (my *DiagnoseParser) ReallocateStacks()
- func (my *DiagnoseParser) Rhs(index int) int
- func (my *DiagnoseParser) ScopeLa(index int) int
- func (my *DiagnoseParser) ScopeLhs(index int) int
- func (my *DiagnoseParser) ScopePrefix(index int) int
- func (my *DiagnoseParser) ScopeRhs(index int) int
- func (my *DiagnoseParser) ScopeState(index int) int
- func (my *DiagnoseParser) ScopeStateSet(index int) int
- func (my *DiagnoseParser) ScopeSuffix(index int) int
- func (my *DiagnoseParser) ScopeTrialCheck(repair *PrimaryRepairInfo, stack []int, stack_top int, indx int)
- func (my *DiagnoseParser) SecondaryCheck(stack []int, stack_top int, buffer_position int, distance int) bool
- func (my *DiagnoseParser) SecondaryDiagnosis(repair *SecondaryRepairInfo)
- func (my *DiagnoseParser) SecondaryPhase(error_token int) *RepairCandidate
- func (my *DiagnoseParser) SecondaryRecovery(repair *SecondaryRepairInfo, stack []int, stack_top int, last_index int, ...)
- func (my *DiagnoseParser) SetMonitor(monitor Monitor)
- func (my *DiagnoseParser) SymbolIndex(index int) int
- func (my *DiagnoseParser) TAction(act int, sym int) int
- func (my *DiagnoseParser) TermAction(index int) int
- func (my *DiagnoseParser) TermCheck(index int) int
- func (my *DiagnoseParser) TerminalIndex(index int) int
- type DiagnoseParserBase
- type Error
- type ErrorToken
- func (a *ErrorToken) GetErrorToken() IToken
- func (a *ErrorToken) GetFirstRealToken() IToken
- func (a *ErrorToken) GetFirstToken() IToken
- func (a *ErrorToken) GetFollowingAdjuncts() []IToken
- func (a *ErrorToken) GetLastRealToken() IToken
- func (a *ErrorToken) GetLastToken() IToken
- func (a *ErrorToken) GetPrecedingAdjuncts() []IToken
- type IAbstractArrayList
- type IAst
- type IAstVisitor
- type ILexStream
- type IMessageHandler
- type IPrsStream
- type IToken
- type IntArrayList
- func (a *IntArrayList) Add(elem int) *IntArrayList
- func (a *IntArrayList) At(index int) (value int)
- func (a *IntArrayList) Clear() bool
- func (a *IntArrayList) Clone() *IntArrayList
- func (a *IntArrayList) Contains(val int) bool
- func (a *IntArrayList) Get(index int) int
- func (a *IntArrayList) IndexOf(elem int) int
- func (a *IntArrayList) IsEmpty() bool
- func (a *IntArrayList) LastIndexOf(elem int) int
- func (a *IntArrayList) Remove(value int) bool
- func (a *IntArrayList) RemoveAll() bool
- func (a *IntArrayList) RemoveAt(index int) (value int, found bool)
- func (a *IntArrayList) Search(value int) int
- func (a *IntArrayList) Set(index int, element int) bool
- func (a *IntArrayList) Size() int
- func (a *IntArrayList) ToArray() []int
- type IntSegmentedTuple
- func (a *IntSegmentedTuple) Add(element int)
- func (a *IntSegmentedTuple) BinarySearch(element int) int
- func (a *IntSegmentedTuple) Get(i int) int
- func (a *IntSegmentedTuple) NextIndex() int
- func (a *IntSegmentedTuple) Reset()
- func (a *IntSegmentedTuple) ResetTo(n int)
- func (a *IntSegmentedTuple) Resize()
- func (a *IntSegmentedTuple) ResizeTo(n int)
- func (a *IntSegmentedTuple) Set(i int, element int)
- func (a *IntSegmentedTuple) Size() int
- type IntTuple
- type LexParser
- func (my *LexParser) GetCurrentRule() (int, error)
- func (my *LexParser) GetFirstToken() int
- func (my *LexParser) GetFirstTokenAt(i int) int
- func (my *LexParser) GetLastToken() int
- func (my *LexParser) GetLastTokenAt(i int) int
- func (my *LexParser) GetSym(i int) int
- func (my *LexParser) GetToken(i int) int
- func (my *LexParser) LexNextCharacter(act int, kind int) int
- func (my *LexParser) LexNextToken(end_offSet int) bool
- func (my *LexParser) Lookahead(act int, token int) int
- func (my *LexParser) ParseActions()
- func (my *LexParser) ParseCharacters(start_offSet int, end_offSet int, monitor Monitor)
- func (my *LexParser) ParseCharactersWhitMonitor(monitor Monitor)
- func (my *LexParser) ParseNextCharacter(token int, kind int)
- func (my *LexParser) ReallocateStacks()
- func (my *LexParser) Reset(tokStream ILexStream, prs ParseTable, ra RuleAction)
- func (my *LexParser) ResetTokenStream(i int)
- func (my *LexParser) ScanNextToken() bool
- func (my *LexParser) ScanNextTokenFromStartOffSet(start_offSet int) bool
- func (my *LexParser) SetSym1(i int)
- func (my *LexParser) TAction(act int, sym int) int
- type LexStream
- func (my *LexStream) AfterEol(i int) bool
- func (my *LexStream) BadToken() int
- func (my *LexStream) ComputeLineOffSets()
- func (my *LexStream) GetCharValue(i int) string
- func (my *LexStream) GetColumn(i int) int
- func (my *LexStream) GetColumnOfCharAt(i int) int
- func (my *LexStream) GetEndColumn(i int) int
- func (my *LexStream) GetEndLine(i int) int
- func (my *LexStream) GetFileName() string
- func (my *LexStream) GetFileString(fileName string) (*string, error)
- func (my *LexStream) GetFirstErrorToken(i int) int
- func (my *LexStream) GetFirstRealToken(i int) int
- func (my *LexStream) GetIPrsStream() IPrsStream
- func (my *LexStream) GetInputChars() []rune
- func (my *LexStream) GetIntValue(i int) int
- func (my *LexStream) GetKind(i int) int
- func (my *LexStream) GetLastErrorToken(i int) int
- func (my *LexStream) GetLastRealToken(i int) int
- func (my *LexStream) GetLine(i int) int
- func (my *LexStream) GetLineCount() int
- func (my *LexStream) GetLineNumberOfCharAt(i int) int
- func (my *LexStream) GetLineOffSet(i int) int
- func (my *LexStream) GetLineOffSets() *IntSegmentedTuple
- func (my *LexStream) GetLocation(leftLoc int, rightLoc int) []int
- func (my *LexStream) GetMessageHandler() IMessageHandler
- func (my *LexStream) GetName(i int) string
- func (my *LexStream) GetNext(i int) int
- func (my *LexStream) GetPrevious(i int) int
- func (my *LexStream) GetStreamIndex() int
- func (my *LexStream) GetStreamLength() int
- func (my *LexStream) GetTab() int
- func (my *LexStream) GetToken() int
- func (my *LexStream) GetTokenFromEndToken(end_token int) int
- func (my *LexStream) MakeToken(startLoc int, endLoc int, kind int)
- func (my *LexStream) OrderedExportedSymbols() []string
- func (my *LexStream) Peek() int
- func (my *LexStream) ReportError(errorCode int, leftToken int, rightToken int, errorInfo []string, ...)
- func (my *LexStream) ReportLexicalError(leftLoc int, rightLoc int, errorCode int, errorLeftLoc int, errorRightLoc int, ...)
- func (my *LexStream) ReportLexicalErrorPosition(leftLoc int, rightLoc int)
- func (my *LexStream) Reset()
- func (my *LexStream) ResetTo(i int)
- func (my *LexStream) SetFileName(fileName string)
- func (my *LexStream) SetInputChars(inputChars []rune)
- func (my *LexStream) SetLineOffSet(i int)
- func (my *LexStream) SetLineOffSets(lineOffSets *IntSegmentedTuple)
- func (my *LexStream) SetMessageHandler(errMsg IMessageHandler)
- func (my *LexStream) SetPrsStream(prsStream IPrsStream)
- func (my *LexStream) SetStreamIndex(index int)
- func (my *LexStream) SetStreamLength(streamLength int)
- func (my *LexStream) SetTab(tab int)
- func (my *LexStream) ToString(startOffSet int, endOffSet int) string
- type MismatchedInputCharsException
- type Monitor
- type NotBacktrackParseTableException
- type NotDeterministicParseTableException
- type NullExportedSymbolsException
- type NullPointerException
- type NullTerminalSymbolsException
- type ObjectTuple
- type ParseTable
- type PrimaryRepairInfo
- type PrsStream
- func (my *PrsStream) AddAdjunct(adjunct IToken)
- func (my *PrsStream) AddToken(token IToken)
- func (my *PrsStream) AfterEol(i int) bool
- func (my *PrsStream) BadToken() int
- func (my *PrsStream) DumpToken(i int)
- func (my *PrsStream) DumpTokens()
- func (my *PrsStream) GetAdjuncts() *TokenArrayList
- func (my *PrsStream) GetAdjunctsFromIndex(i int) []IToken
- func (my *PrsStream) GetColumn(i int) int
- func (my *PrsStream) GetColumnOfCharAt(i int) int
- func (my *PrsStream) GetColumnOfTokenAt(i int) int
- func (my *PrsStream) GetEndColumn(i int) int
- func (my *PrsStream) GetEndColumnOfTokenAt(i int) int
- func (my *PrsStream) GetEndLine(i int) int
- func (my *PrsStream) GetEndLineNumberOfTokenAt(i int) int
- func (my *PrsStream) GetEndOffSet(i int) int
- func (my *PrsStream) GetFileName() string
- func (my *PrsStream) GetFirstErrorToken(i int) int
- func (my *PrsStream) GetFirstRealToken(i int) int
- func (my *PrsStream) GetFollowingAdjuncts(i int) []IToken
- func (my *PrsStream) GetILexStream() ILexStream
- func (my *PrsStream) GetIToken(i int) IToken
- func (my *PrsStream) GetInputChars() []rune
- func (my *PrsStream) GetKind(i int) int
- func (my *PrsStream) GetLastErrorToken(i int) int
- func (my *PrsStream) GetLastRealToken(i int) int
- func (my *PrsStream) GetLexStream() ILexStream
- func (my *PrsStream) GetLine(i int) int
- func (my *PrsStream) GetLineCount() int
- func (my *PrsStream) GetLineNumberOfCharAt(i int) int
- func (my *PrsStream) GetLineNumberOfTokenAt(i int) int
- func (my *PrsStream) GetLineOffSet(i int) int
- func (my *PrsStream) GetMessageHandler() IMessageHandler
- func (my *PrsStream) GetName(i int) string
- func (my *PrsStream) GetNext(i int) int
- func (my *PrsStream) GetPrecedingAdjuncts(i int) []IToken
- func (my *PrsStream) GetPrevious(i int) int
- func (my *PrsStream) GetSize() int
- func (my *PrsStream) GetStartOffset(i int) int
- func (my *PrsStream) GetStreamIndex() int
- func (my *PrsStream) GetStreamLength() int
- func (my *PrsStream) GetToken() int
- func (my *PrsStream) GetTokenAt(i int) IToken
- func (my *PrsStream) GetTokenAtCharacter(offSet int) IToken
- func (my *PrsStream) GetTokenFromEndToken(end_token int) int
- func (my *PrsStream) GetTokenIndexAtCharacter(offSet int) int
- func (my *PrsStream) GetTokenLength(i int) int
- func (my *PrsStream) GetTokenText(i int) string
- func (my *PrsStream) GetTokens() *TokenArrayList
- func (my *PrsStream) MakeAdjunct(startLoc int, endLoc int, kind int)
- func (my *PrsStream) MakeErrorToken(firsttok int, lasttok int, errortok int, kind int) int
- func (my *PrsStream) MakeToken(startLoc int, endLoc int, kind int)
- func (my *PrsStream) MapKind(kind int) int
- func (my *PrsStream) OrderedExportedSymbols() []string
- func (my *PrsStream) OrderedTerminalSymbols() []string
- func (my *PrsStream) Peek() int
- func (my *PrsStream) RemapTerminalSymbols(ordered_parser_symbols []string, eof_symbol int) error
- func (my *PrsStream) RemoveLastToken()
- func (my *PrsStream) ReportError(errorCode int, leftToken int, rightToken int, errorInfo []string, ...)
- func (my *PrsStream) Reset()
- func (my *PrsStream) ResetLexStream(lexStream ILexStream)
- func (my *PrsStream) ResetStreamLength()
- func (my *PrsStream) ResetTo(i int)
- func (my *PrsStream) ResetTokenStream()
- func (my *PrsStream) SetLexStream(lexStream ILexStream)
- func (my *PrsStream) SetMessageHandler(errMsg IMessageHandler)
- func (my *PrsStream) SetSize()
- func (my *PrsStream) SetStreamIndex(index int)
- func (my *PrsStream) SetStreamLength(len int)
- func (my *PrsStream) ToString(t1 IToken, t2 IToken) string
- func (my *PrsStream) ToStringFromIndex(first_token int, last_token int) string
- type RecoveryParser
- func (my *RecoveryParser) AcceptRecovery(error_token int)
- func (my *RecoveryParser) CompleteScope(action *IntSegmentedTuple, scope_rhs_index int) bool
- func (my *RecoveryParser) FixError(start_token int, error_token int) bool
- func (my *RecoveryParser) ReallocateStacks()
- func (my *RecoveryParser) Recover(marker_token int, error_token int) (int, error)
- func (my *RecoveryParser) ReportError(scope_index int, error_token int)
- type RepairCandidate
- type RuleAction
- type SecondaryRepairInfo
- type Stacks
- type StateElement
- type StateInfo
- type Token
- type TokenArrayList
- func (a *TokenArrayList) Add(elem IToken) *TokenArrayList
- func (a *TokenArrayList) At(index int) (value IToken)
- func (a *TokenArrayList) Clear() bool
- func (a *TokenArrayList) Clone() *TokenArrayList
- func (a *TokenArrayList) Contains(val IToken) bool
- func (a *TokenArrayList) Get(index int) IToken
- func (a *TokenArrayList) IndexOf(elem IToken) int
- func (a *TokenArrayList) IsEmpty() bool
- func (a *TokenArrayList) LastIndexOf(elem IToken) int
- func (a *TokenArrayList) Remove(value IToken) bool
- func (a *TokenArrayList) RemoveAll() bool
- func (a *TokenArrayList) RemoveAt(index int) (value IToken, found bool)
- func (a *TokenArrayList) Search(value IToken) int
- func (a *TokenArrayList) Set(index int, element IToken) bool
- func (a *TokenArrayList) Size() int
- func (a *TokenArrayList) ToArray() []IToken
- type TokenStream
- type TokenStreamNotIPrsStreamException
- type UnavailableParserInformationException
- type UndefinedEofSymbolException
- type UnimplementedTerminalsException
- type UnknownStreamType
Constants ¶
const BEFORE_CODE int = 2
const BUFF_SIZE int = 32
const BUFF_UBOUND int = 31
const (
CodeNil = -1 // No error code specified.
)
const DELETION_CODE int = 6
const END_COLUMN_INDEX int = 5
const END_LINE_INDEX int = 4
const EOF int = 0xffff
const EOF_CODE int = 10
const ERROR_CODE int = 1
const ERROR_RULE_ERROR_CODE int = 11
const ERROR_RULE_WARNING_CODE int = 12
const INSERTION_CODE int = 3
const INVALID_CODE int = 4
const INVALID_TOKEN_CODE int = 11
const LENGTH_INDEX int = 1
const LEX_ERROR_CODE int = 0
const MANUAL_CODE int = 14
const MAX_DISTANCE int = 30
const MERGE_CODE int = 7
const MIN_DISTANCE int = 3
const MISPLACED_CODE int = 8
const NIL int = -1
const NIL_CODE int = -1
const NO_MESSAGE_CODE int = 13
const (
// NotFoundIndex is the position index for string not found in searching functions.
NotFoundIndex = -1
)
const OFFSET_INDEX int = 0
const SCOPE_CODE int = 9
const SECONDARY_CODE int = 5
const START_COLUMN_INDEX int = 3
const START_LINE_INDEX int = 2
const SUBSTITUTION_CODE int = 5
const (
StackFilterKeyForLPG2 = "https://github.com/A-LPG" // Stack filtering key for all GoFrame module paths.
)
Variables ¶
var ( // DefaultTrimChars are the characters which are stripped by Trim* functions in default. DefaultTrimChars = string([]byte{ '\t', '\v', '\n', '\r', '\f', ' ', 0x00, 0x85, 0xA0, }) )
Functions ¶
func AppendRune ¶
func ChunkSplit ¶
ChunkSplit splits a string into smaller chunks. Can be used to split a string into smaller chunks which is useful for e.g. converting BASE64 string output to match RFC 2045 semantics. It inserts end every chunkLen characters. It considers parameter <body> and <end> as unicode string.
func Code ¶
Code returns the error code of current error. It returns -1 if it has no error code or it does not implements interface Code.
func Compare ¶
Compare returns an integer comparing two strings lexicographically. The result will be 0 if a==b, -1 if a < b, and +1 if a > b.
func ContainsOpt ¶
ContainsOpt checks whether option named `Name` exist in the arguments.
func Count ¶
Count counts the number of <substr> appears in <s>. It returns 0 if no <substr> found in <s>.
func CountChars ¶
CountChars returns information about chars' count used in a string. It considers parameter <str> as unicode string.
func CountI ¶
CountI counts the number of <substr> appears in <s>, case-insensitively. It returns 0 if no <substr> found in <s>.
func CountWords ¶
CountWords returns information about words' count used in a string. It considers parameter <str> as unicode string.
func Current ¶
Current creates and returns the current level error. It returns nil if current level error is nil.
func Equal ¶
Equal reports whether <a> and <b>, interpreted as UTF-8 strings, are equal under Unicode case-folding, case-insensitively.
func EqualFoldWithoutChars ¶
EqualFoldWithoutChars checks string `s1` and `s2` equal case-insensitively, with/without chars '-'/'_'/'.'/' '.
func Explode ¶
Explode splits string <str> by a string <delimiter>, to an array. See http://php.net/manual/en/function.explode.php.
func GetOptWithEnv ¶
GetOptWithEnv returns the command line argument of the specified `key`. If the argument does not exist, then it returns the environment variable with specified `key`. It returns the default value `def` if none of them exists.
Fetching Rules: 1. Command line arguments are in lowercase format, eg: gf.<package Name>.<variable Name>; 2. Environment arguments are in uppercase format, eg: GF_<package Name>_<variable Name>;
func HideStr ¶
HideStr replaces part of the the string <str> to <hide> by <percentage> from the <middle>. It considers parameter <str> as unicode string.
func Implode ¶
Implode joins array elements <pieces> with a string <glue>. http://php.net/manual/en/function.implode.php
func IsDebugEnabled ¶
func IsDebugEnabled() bool
IsDebugEnabled checks and returns whether debug mode is enabled. The debug mode is enabled when command argument "gf.debug" or environment "GF_DEBUG" is passed.
func IsLetterLower ¶
IsLetterLower checks whether the given byte b is in lower case.
func IsLetterUpper ¶
IsLetterUpper checks whether the given byte b is in upper case.
func IsNumeric ¶
IsNumeric checks whether the given string s is numeric. Note that float string like "123.456" is also numeric.
func Join ¶
Join concatenates the elements of <array> to create a single string. The separator string <sep> is placed between elements in the resulting string.
func LcFirst ¶
LcFirst returns a copy of the string s with the first letter mapped to its lower case.
func NewCodeSkip ¶
NewCodeSkip creates and returns an error which has error code and is formatted from given text. The parameter <skip> specifies the stack callers skipped amount.
func NewCodeSkipf ¶
NewCodeSkipf returns an error that has error code and formats as the given format and args. The parameter <skip> specifies the stack callers skipped amount.
func NewCodef ¶
NewCodef returns an error that has error code and formats as the given format and args.
func NewSkip ¶
NewSkip creates and returns an error which is formatted from given text. The parameter <skip> specifies the stack callers skipped amount.
func NewSkipf ¶
NewSkipf returns an error that formats as the given format and args. The parameter <skip> specifies the stack callers skipped amount.
func Next ¶
Next returns the next level error. It returns nil if current level error or the next level error is nil.
func Nl2Br ¶
Nl2Br inserts HTML line breaks(<br>|<br />) before all newlines in a string: \n\r, \r\n, \r, \n. It considers parameter <str> as unicode string.
func NumberFormat ¶
NumberFormat formats a number with grouped thousands. <decimals>: Sets the number of decimal points. <decPoint>: Sets the separator for the decimal point. <thousandsSep>: Sets the thousands separator. See http://php.net/manual/en/function.number-format.php.
func ObjectArraycopy ¶
func QuoteMeta ¶
QuoteMeta returns a version of str with a backslash character (\) before every character that is among: .\+*?[^]($)
func RemoveSymbols ¶
RemoveSymbols removes all symbols from string and lefts only numbers and letters.
func Replace ¶
Replace returns a copy of the string <origin> in which string <search> replaced by <replace> case-sensitively.
func ReplaceByArray ¶
ReplaceByArray returns a copy of <origin>, which is replaced by a slice in order, case-sensitively.
func ReplaceByMap ¶
ReplaceByMap returns a copy of `origin`, which is replaced by a map in unordered way, case-sensitively.
func ReplaceI ¶
ReplaceI Replace returns a copy of the string <origin> in which string <search> replaced by <replace> case-insensitively.
func ReplaceIByArray ¶
ReplaceIByArray returns a copy of <origin>, which is replaced by a slice in order, case-insensitively.
func ReplaceIByMap ¶
ReplaceIByMap returns a copy of <origin>, which is replaced by a map in unordered way, case-insensitively.
func SearchArray ¶
SearchArray searches string <s> in string slice <a> case-sensitively, returns its index in <a>. If <s> is not found in <a>, it returns -1.
func SplitAndTrim ¶
SplitAndTrim splits string <str> by a string <delimiter> to an array, and calls Trim to every element of this array. It ignores the elements which are empty after Trim.
func SplitAndTrimSpace ¶
SplitAndTrimSpace splits string <str> by a string <delimiter> to an array, and calls TrimSpace to every element of this array. Deprecated, use SplitAndTrim instead.
func Stack ¶
Stack returns the stack callers as string. It returns the error string directly if the <err> does not support stacks.
func Str ¶
Str returns part of <haystack> string starting from and including the first occurrence of <needle> to the end of <haystack>. See http://php.net/manual/en/function.strstr.php.
func StrEx ¶
StrEx returns part of <haystack> string starting from and excluding the first occurrence of <needle> to the end of <haystack>.
func StrLimit ¶
StrLimit returns a portion of string <str> specified by <length> parameters, if the length of <str> is greater than <length>, then the <suffix> will be appended to the result string.
func StrLimitRune ¶
StrLimitRune returns a portion of string <str> specified by <length> parameters, if the length of <str> is greater than <length>, then the <suffix> will be appended to the result string. StrLimitRune considers parameter <str> as unicode string.
func StrTill ¶
StrTill returns part of <haystack> string ending to and including the first occurrence of <needle> from the start of <haystack>.
func StrTillEx ¶
StrTillEx returns part of <haystack> string ending to and excluding the first occurrence of <needle> from the start of <haystack>.
func StringSliceEqual ¶
func StripSlashes ¶
StripSlashes un-quotes a quoted string by AddSlashes.
func SubStr ¶
SubStr returns a portion of string <str> specified by the <start> and <length> parameters.
func SubStrRuneRange ¶
SubStrRune returns a portion of string <str> specified by the <start> and <length> parameters. SubStrRune considers parameter <str> as unicode string.
func ToLower ¶
ToLower returns a copy of the string s with all Unicode letters mapped to their lower case.
func ToUpper ¶
ToUpper returns a copy of the string s with all Unicode letters mapped to their upper case.
func Trim ¶
Trim strips whitespace (or other characters) from the beginning and end of a string. The optional parameter <characterMask> specifies the additional stripped characters.
func UcFirst ¶
UcFirst returns a copy of the string s with the first letter mapped to its upper case.
func WordWrap ¶
WordWrap wraps a string to a given number of characters. TODO: Enable cut parameter, see http://php.net/manual/en/function.wordwrap.php.
func WrapCodeSkip ¶
WrapCodeSkip wraps error with code and text. It returns nil if given err is nil. The parameter <skip> specifies the stack callers skipped amount.
func WrapCodeSkipf ¶
WrapCodeSkipf wraps error with code and text that is formatted with given format and args. It returns nil if given err is nil. The parameter <skip> specifies the stack callers skipped amount.
func WrapCodef ¶
WrapCodef wraps error with code and format specifier. It returns nil if given <err> is nil.
func WrapSkip ¶
WrapSkip wraps error with text. It returns nil if given err is nil. The parameter <skip> specifies the stack callers skipped amount.
Types ¶
type AbstractToken ¶
type AbstractToken struct {
// contains filtered or unexported fields
}
func NewAbstractToken ¶
func NewAbstractToken(startOffSet int, endOffSet int, kind int, iPrsStream IPrsStream) *AbstractToken
func (*AbstractToken) GetAdjunctIndex ¶
func (a *AbstractToken) GetAdjunctIndex() int
func (*AbstractToken) GetColumn ¶
func (a *AbstractToken) GetColumn() int
func (*AbstractToken) GetEndColumn ¶
func (a *AbstractToken) GetEndColumn() int
func (*AbstractToken) GetEndLine ¶
func (a *AbstractToken) GetEndLine() int
func (*AbstractToken) GetEndOffset ¶
func (a *AbstractToken) GetEndOffset() int
func (*AbstractToken) GetFollowingAdjuncts ¶
func (a *AbstractToken) GetFollowingAdjuncts() []IToken
func (*AbstractToken) GetILexStream ¶
func (a *AbstractToken) GetILexStream() ILexStream
func (*AbstractToken) GetIPrsStream ¶
func (a *AbstractToken) GetIPrsStream() IPrsStream
func (*AbstractToken) GetKind ¶
func (a *AbstractToken) GetKind() int
func (*AbstractToken) GetLine ¶
func (a *AbstractToken) GetLine() int
func (*AbstractToken) GetPrecedingAdjuncts ¶
func (a *AbstractToken) GetPrecedingAdjuncts() []IToken
func (*AbstractToken) GetStartOffset ¶
func (a *AbstractToken) GetStartOffset() int
func (*AbstractToken) GetTokenIndex ¶
func (a *AbstractToken) GetTokenIndex() int
func (*AbstractToken) SetAdjunctIndex ¶
func (a *AbstractToken) SetAdjunctIndex(adjunctIndex int)
func (*AbstractToken) SetEndOffset ¶
func (a *AbstractToken) SetEndOffset(endOffSet int)
func (*AbstractToken) SetKind ¶
func (a *AbstractToken) SetKind(kind int)
func (*AbstractToken) SetStartOffset ¶
func (a *AbstractToken) SetStartOffset(startOffSet int)
func (*AbstractToken) SetTokenIndex ¶
func (a *AbstractToken) SetTokenIndex(tokenIndex int)
func (*AbstractToken) ToString ¶
func (a *AbstractToken) ToString() string
type Adjunct ¶
type Adjunct struct {
*AbstractToken
}
func NewAdjunct ¶
func NewAdjunct(startOffSet int, endOffSet int, kind int, prsStream IPrsStream) *Adjunct
func (*Adjunct) GetFollowingAdjuncts ¶
func (*Adjunct) GetPrecedingAdjuncts ¶
type ArrayList ¶
type ArrayList struct {
// contains filtered or unexported fields
}
func NewArrayList ¶
func NewArrayList() *ArrayList
func NewArrayListFrom ¶
func NewArrayListFrom(array []interface{}) *ArrayList
func NewArrayListFromCopy ¶
func NewArrayListFromCopy(array []interface{}) *ArrayList
func NewArrayListSize ¶
func (*ArrayList) LastIndexOf ¶
type BacktrackingParser ¶
type BacktrackingParser struct { *Stacks START_STATE int NUM_RULES int NT_OFFSET int LA_STATE_OFFSET int EOFT_SYMBOL int ERROR_SYMBOL int ACCEPT_ACTION int ERROR_ACTION int // contains filtered or unexported fields }
func NewBacktrackingParser ¶
func NewBacktrackingParser(tokStream TokenStream, prs ParseTable, ra RuleAction, monitor Monitor) (*BacktrackingParser, error)
func (*BacktrackingParser) BacktrackParse ¶
func (my *BacktrackingParser) BacktrackParse(stack []int, stack_top int, action *IntSegmentedTuple, initial_token int) int
This method is intended to be used by the type RecoveryParser. Note that the action tuple passed here must be the same action tuple that was passed down to RecoveryParser. It is passed back to my method as documention.
func (*BacktrackingParser) BacktrackParseUpToError ¶
func (my *BacktrackingParser) BacktrackParseUpToError(initial_token int, error_token int)
func (*BacktrackingParser) ErrorRepair ¶
func (my *BacktrackingParser) ErrorRepair(stream IPrsStream, recovery_token int, error_token int) int
func (*BacktrackingParser) FindRecoveryStateIndex ¶
func (my *BacktrackingParser) FindRecoveryStateIndex(start_index int) int
func (*BacktrackingParser) FuzzyParse ¶
func (my *BacktrackingParser) FuzzyParse() (interface{}, error)
FuzzyParse Always attempt to recover
func (*BacktrackingParser) FuzzyParseEntry ¶
func (my *BacktrackingParser) FuzzyParseEntry(marker_kind int, max_error_count int) (interface{}, error)
func (*BacktrackingParser) FuzzyParseWithErrorCount ¶
func (my *BacktrackingParser) FuzzyParseWithErrorCount(max_error_count int) (interface{}, error)
FuzzyParseWithErrorCount Recover up to max_error_count times and then quit
func (*BacktrackingParser) GetCurrentRule ¶
func (my *BacktrackingParser) GetCurrentRule() int
func (*BacktrackingParser) GetFirstToken ¶
func (my *BacktrackingParser) GetFirstToken() int
func (*BacktrackingParser) GetFirstTokenAt ¶
func (my *BacktrackingParser) GetFirstTokenAt(i int) int
func (*BacktrackingParser) GetLastToken ¶
func (my *BacktrackingParser) GetLastToken() int
func (*BacktrackingParser) GetLastTokenAt ¶
func (my *BacktrackingParser) GetLastTokenAt(i int) int
func (*BacktrackingParser) GetMarkerToken ¶
func (my *BacktrackingParser) GetMarkerToken(marker_kind int, start_token_index int) (int, error)
A starting marker indicates that we are dealing with an entry point for a given nonterminal. We need to execute a shift action on the marker in order to parse the entry point in question.
func (*BacktrackingParser) GetToken ¶
func (my *BacktrackingParser) GetToken(i int) int
Override the GetToken function in Stacks.
func (*BacktrackingParser) Lookahead ¶
func (my *BacktrackingParser) Lookahead(act int, token int) int
keep looking ahead until we compute a valid action
func (*BacktrackingParser) Parse ¶
func (my *BacktrackingParser) Parse(max_error_count int) (interface{}, error)
Parse input allowing up to max_error_count Error token recoveries. When max_error_count is 0, no Error token recoveries occur. When max_error is > 0, it limits the number of Error token recoveries. When max_error is < 0, the number of error token recoveries is unlimited. Also, such recoveries only require one token to be parsed beyond the recovery point. (normally two tokens beyond the recovery point must be parsed) Thus, a negative max_error_count should be used when error productions are used to skip tokens.
func (*BacktrackingParser) ParseActions ¶
func (my *BacktrackingParser) ParseActions(marker_kind int) (interface{}, error)
Now do the final parse of the input based on the actions in the list "action" and the sequence of tokens in list "tokens".
func (*BacktrackingParser) ParseEntry ¶
func (my *BacktrackingParser) ParseEntry(marker_kind int, max_error_count int) (interface{}, error)
Parse input allowing up to max_error_count Error token recoveries. When max_error_count is 0, no Error token recoveries occur. When max_error is > 0, it limits the int of Error token recoveries. When max_error is < 0, the int of error token recoveries is unlimited. Also, such recoveries only require one token to be parsed beyond the recovery point. (normally two tokens beyond the recovery point must be parsed) Thus, a negative max_error_count should be used when error productions are used to skip tokens.
func (*BacktrackingParser) Process_backtrack_reductions ¶
func (my *BacktrackingParser) Process_backtrack_reductions(act int) int
Process reductions and continue...
func (*BacktrackingParser) Process_reductions ¶
func (my *BacktrackingParser) Process_reductions()
Process reductions and continue...
func (*BacktrackingParser) ReallocateOtherStacks ¶
func (my *BacktrackingParser) ReallocateOtherStacks(startTokenIndex int)
Allocate or reallocate all the stacks. Their sizes should always be the same.
func (*BacktrackingParser) Repairable ¶
func (my *BacktrackingParser) Repairable(error_token int) bool
func (*BacktrackingParser) Reset ¶
func (my *BacktrackingParser) Reset(tokStream TokenStream, prs ParseTable, ra RuleAction, monitor Monitor) error
func (*BacktrackingParser) Reset1 ¶
func (my *BacktrackingParser) Reset1() error
func (*BacktrackingParser) Reset2 ¶
func (my *BacktrackingParser) Reset2(tokStream TokenStream, monitor Monitor) error
func (*BacktrackingParser) Reset3 ¶
func (my *BacktrackingParser) Reset3(tokStream TokenStream, prs ParseTable, ra RuleAction) error
func (*BacktrackingParser) SetMonitor ¶
func (my *BacktrackingParser) SetMonitor(monitor Monitor)
type BadParseException ¶
type BadParseException struct { ErrorToken int // contains filtered or unexported fields }
func NewBadParseException ¶
func NewBadParseException(errorToken int) *BadParseException
func (*BadParseException) Error ¶
func (a *BadParseException) Error() string
Error implements the interface of Error, it returns all the error as string.
func (*BadParseException) ToString ¶
func (a *BadParseException) ToString() string
type BadParseSymFileException ¶
type BadParseSymFileException struct {
// contains filtered or unexported fields
}
func NewBadParseSymFileException ¶
func NewBadParseSymFileException(info string) *BadParseSymFileException
func (*BadParseSymFileException) Error ¶
func (a *BadParseSymFileException) Error() string
Error implements the interface of Error, it returns all the error as string.
func (*BadParseSymFileException) ToString ¶
func (a *BadParseSymFileException) ToString() string
type ConfigurationElement ¶
type ConfigurationElement struct {
// contains filtered or unexported fields
}
func NewConfigurationElement ¶
func NewConfigurationElement() *ConfigurationElement
func (*ConfigurationElement) RetrieveStack ¶
func (a *ConfigurationElement) RetrieveStack(stack []int)
type ConfigurationStack ¶
type ConfigurationStack struct { TABLE_SIZE int // contains filtered or unexported fields }
func NewConfigurationStack ¶
func NewConfigurationStack(prs ParseTable) *ConfigurationStack
func (*ConfigurationStack) FindConfiguration ¶
func (my *ConfigurationStack) FindConfiguration(stack []int, stack_top int, curtok int) bool
func (*ConfigurationStack) FindOrInsertStack ¶
func (my *ConfigurationStack) FindOrInsertStack(root *StateElement, stack []int, index int, stack_top int) *StateElement
func (*ConfigurationStack) MakeStateList ¶
func (my *ConfigurationStack) MakeStateList(parent *StateElement, stack []int, index int, stack_top int) *StateElement
func (*ConfigurationStack) MaxConfigurationSize ¶
func (my *ConfigurationStack) MaxConfigurationSize() int
func (*ConfigurationStack) NumStateElements ¶
func (my *ConfigurationStack) NumStateElements() int
func (*ConfigurationStack) Pop ¶
func (my *ConfigurationStack) Pop() *ConfigurationElement
func (*ConfigurationStack) StacksSize ¶
func (my *ConfigurationStack) StacksSize() int
func (*ConfigurationStack) Top ¶
func (my *ConfigurationStack) Top() *ConfigurationElement
type DeterministicParser ¶
type DeterministicParser struct { *Stacks START_STATE int NUM_RULES int NT_OFFSET int LA_STATE_OFFSET int EOFT_SYMBOL int ACCEPT_ACTION int ERROR_ACTION int ERROR_SYMBOL int // contains filtered or unexported fields }
func NewDeterministicParser ¶
func NewDeterministicParser(tokStream TokenStream, prs ParseTable, ra RuleAction, monitor Monitor) (*DeterministicParser, error)
func (*DeterministicParser) ErrorReset ¶
func (my *DeterministicParser) ErrorReset()
Reset the parser at a point where it can legally process the error token. If we can't do that, Reset it to the beginning.
func (*DeterministicParser) GetCurrentRule ¶
func (my *DeterministicParser) GetCurrentRule() int
The following functions can be invoked only when the parser is processing actions. Thus, they can be invoked when the parser was entered via the main entry point (parse()). When using the incremental parser (via the entry point parse(int [], int)), an Exception is thrown if any of these functions is invoked? However, note that when ParseActions() is invoked after successfully parsing an input with the incremental parser, then they can be invoked.
func (*DeterministicParser) GetFirstToken ¶
func (my *DeterministicParser) GetFirstToken() int
func (*DeterministicParser) GetFirstTokenAt ¶
func (my *DeterministicParser) GetFirstTokenAt(i int) int
func (*DeterministicParser) GetLastToken ¶
func (my *DeterministicParser) GetLastToken() int
func (*DeterministicParser) GetLastTokenAt ¶
func (my *DeterministicParser) GetLastTokenAt(i int) int
func (*DeterministicParser) Lookahead ¶
func (my *DeterministicParser) Lookahead(act int, token int) int
keep looking ahead until we compute a valid action
func (*DeterministicParser) Parse ¶
func (my *DeterministicParser) Parse(sym []int, index int) (int, error)
This is an incremental LALR(k) parser that takes as argument the next k tokens in the input. If these k tokens are valid for the current configuration, it advances past the first of the k tokens and returns either
. the last transition induced by that token . the Accept action
If the tokens are not valid, the initial configuration remains unchanged and the Error action is returned.
Note that it is the user's responsibility to start the parser in a proper configuration by initially invoking the method ResetParser prior to invoking my function.
func (*DeterministicParser) ParseActions ¶
func (my *DeterministicParser) ParseActions() interface{}
Now do the final parse of the input based on the actions in the list "action" and the sequence of tokens in the token stream.
func (*DeterministicParser) ParseEntry ¶
func (my *DeterministicParser) ParseEntry(marker_kind int) (interface{}, error)
func (*DeterministicParser) ProcessReductions ¶
func (my *DeterministicParser) ProcessReductions()
Process reductions and continue...
func (*DeterministicParser) RecoverableState ¶
func (my *DeterministicParser) RecoverableState(state int) bool
Find a state in the state stack that has a valid action on ERROR token
func (*DeterministicParser) Reset ¶
func (my *DeterministicParser) Reset(tokStream TokenStream, prs ParseTable, ra RuleAction, monitor Monitor) error
func (*DeterministicParser) Reset1 ¶
func (my *DeterministicParser) Reset1()
func (*DeterministicParser) Reset2 ¶
func (my *DeterministicParser) Reset2(tokStream TokenStream, monitor Monitor)
func (*DeterministicParser) ResetParser ¶
func (my *DeterministicParser) ResetParser()
This method is invoked when using the parser in an incremental mode using the entry point parse(int [], int).
func (*DeterministicParser) ResetParserEntry ¶
func (my *DeterministicParser) ResetParserEntry(marker_kind int)
This method is invoked when using the parser in an incremental mode using the entry point parse(int [], int).
func (*DeterministicParser) SetMonitor ¶
func (my *DeterministicParser) SetMonitor(monitor Monitor)
func (*DeterministicParser) TAction ¶
func (my *DeterministicParser) TAction(act int, sym []int, index int) int
Compute the next action defined on act and the next k tokens whose types are stored in the array sym starting at location index. The array sym is a circular buffer. If we reach the last element of sym and we need more Lookahead, we proceed to the first element.
assert(sym.length == prs.GetMaxLa())
type DiagnoseParser ¶
type DiagnoseParser struct { ERROR_SYMBOL int SCOPE_SIZE int MAX_NAME_LENGTH int NT_OFFSET int LA_STATE_OFFSET int NUM_RULES int NUM_SYMBOLS int START_STATE int EOFT_SYMBOL int EOLT_SYMBOL int ACCEPT_ACTION int ERROR_ACTION int STACK_INCREMENT int // contains filtered or unexported fields }
func NewDiagnoseParser ¶
func NewDiagnoseParser(tokStream TokenStream, prs ParseTable, maxErrors int, maxTime int, monitor Monitor) *DiagnoseParser
func NewDiagnoseParserExt ¶
func NewDiagnoseParserExt(dispatch DiagnoseParserBase, tokStream TokenStream, prs ParseTable, maxErrors int, maxTime int, monitor Monitor) *DiagnoseParser
func (*DiagnoseParser) Asb ¶
func (my *DiagnoseParser) Asb(index int) int
func (*DiagnoseParser) Asi ¶
func (my *DiagnoseParser) Asi(state int) int
func (*DiagnoseParser) BaseAction ¶
func (my *DiagnoseParser) BaseAction(index int) int
func (*DiagnoseParser) BaseCheck ¶
func (my *DiagnoseParser) BaseCheck(index int) int
func (*DiagnoseParser) CheckPrimaryDistance ¶
func (my *DiagnoseParser) CheckPrimaryDistance(repair *PrimaryRepairInfo, stck []int, stack_top int)
func (*DiagnoseParser) Diagnose ¶
func (my *DiagnoseParser) Diagnose(error_token int)
func (*DiagnoseParser) DiagnoseEntry ¶
func (my *DiagnoseParser) DiagnoseEntry(marker_kind int, error_token int)
func (*DiagnoseParser) DiagnoseEntryWithMarkerKind ¶
func (my *DiagnoseParser) DiagnoseEntryWithMarkerKind(marker_kind int)
func (*DiagnoseParser) ErrorRecovery ¶
func (my *DiagnoseParser) ErrorRecovery(error_token int) *RepairCandidate
This routine is invoked when an error is encountered. It
tries to Diagnose the error and recover from it. If it is successful, the state stack, the current token and the buffer are readjusted i.e., after a successful recovery, state_stack_top points to the location in the state stack that contains the state on which to recover current_token identifies the symbol on which to recover.
Up to three configurations may be available when my routine is invoked. PREV_STACK may contain the sequence of states preceding any action on prevtok, STACK always contains the sequence of states preceding any action on current_token, and NEXT_STACK may contain the sequence of states preceding any action on the successor of current_token.
func (*DiagnoseParser) GetNtermIndex ¶
func (my *DiagnoseParser) GetNtermIndex(start int, sym int, buffer_position int) int
This function takes as parameter a starting state number: start, a nonterminal symbol, A (candidate), and an integer, buffer_position, which points to the position of the next input token in the BUFFER. It returns the highest level non-terminal B such that B =>*rm A. I.e., there does not exists a nonterminal C such that C =>+rm B. (Recall that for an LALR(k) grammar if C =>+rm B, it cannot be the case that B =>+rm C)
func (*DiagnoseParser) GetTermIndex ¶
This function takes as parameter an integer STACK_TOP that points to a STACK element containing the state on which a primary recovery will be made the terminal candidate on which to recover and an integer: buffer_position, which points to the position of the next input token in the BUFFER. The parser is simulated until a shift (or shift-reduce) action is computed on the candidate. Then we proceed to compute the the Name index of the highest level nonterminal that can directly or indirectly produce the candidate.
func (*DiagnoseParser) InSymb ¶
func (my *DiagnoseParser) InSymb(index int) int
func (*DiagnoseParser) InSymbol ¶
func (my *DiagnoseParser) InSymbol(state int) int
func (*DiagnoseParser) IsNullable ¶
func (my *DiagnoseParser) IsNullable(symbol int) bool
func (*DiagnoseParser) Lhs ¶
func (my *DiagnoseParser) Lhs(index int) int
func (*DiagnoseParser) Lookahead ¶
func (my *DiagnoseParser) Lookahead(act int, token int) int
keep looking ahead until we compute a valid action
func (*DiagnoseParser) MergeCandidate ¶
func (my *DiagnoseParser) MergeCandidate(state int, buffer_position int) int
This function checks whether or not a given state has a
candidate, whose string representaion is a merging of the two tokens at positions buffer_position and buffer_position+1 in the buffer. If so, it returns the candidate in question otherwise it returns 0.
func (*DiagnoseParser) MisplacementRecovery ¶
func (my *DiagnoseParser) MisplacementRecovery(repair *SecondaryRepairInfo, stack []int, stack_top int, last_index int, stack_flag bool)
This bool function checks whether or not a given configuration yields a better misplacement recovery than the best misplacement recovery computed previously.
func (*DiagnoseParser) Misspell ¶
func (my *DiagnoseParser) Misspell(sym int, tok int) int
Check whether or not there is a high probability that a
given string is a misspelling of another. Certain singleton symbols (such as ":" and "") are also considered to be misspellings of each other.
func (*DiagnoseParser) Name ¶
func (my *DiagnoseParser) Name(index int) string
func (*DiagnoseParser) Nasb ¶
func (my *DiagnoseParser) Nasb(index int) int
func (*DiagnoseParser) Nasi ¶
func (my *DiagnoseParser) Nasi(state int) int
func (*DiagnoseParser) Nasr ¶
func (my *DiagnoseParser) Nasr(index int) int
func (*DiagnoseParser) NonterminalIndex ¶
func (my *DiagnoseParser) NonterminalIndex(index int) int
func (*DiagnoseParser) OriginalState ¶
func (my *DiagnoseParser) OriginalState(state int) int
func (*DiagnoseParser) ParseCheck ¶
func (my *DiagnoseParser) ParseCheck(stack []int, stack_top int, first_symbol int, buffer_position int) int
Try to parse until first_symbol and all tokens in BUFFER have been consumed, or an error is encountered. Return the number of tokens that were expended before the parse blocked.
func (*DiagnoseParser) ParseForError ¶
func (my *DiagnoseParser) ParseForError(current_kind int) int
Given the configuration consisting of the states in tempStack and the sequence of tokens (current_kind, followed by the tokens in tokStream), keep parsing until either the parse completes successfully or it encounters an error. If the parse is not succesful, we return the farthest token on which an error was encountered. Otherwise, we return 0.
func (*DiagnoseParser) ParseUpToError ¶
func (my *DiagnoseParser) ParseUpToError(action *IntTuple, current_kind int, error_token int)
Given the configuration consisting of the states in tempStack and the sequence of tokens (current_kind, followed by the tokens in tokStream), parse up to error_token in the tokStream and store all the parsing actions executed in the "action" tuple.
func (*DiagnoseParser) PrimaryDiagnosis ¶
func (my *DiagnoseParser) PrimaryDiagnosis(repair *PrimaryRepairInfo) *RepairCandidate
This procedure is invoked to issue a diagnostic message and adjust the input buffer. The recovery in question is either the insertion of one or more scopes, the merging of the error token with its successor, the deletion of the error token, the insertion of a single token in front of the error token or the substitution of another token for the error token.
func (*DiagnoseParser) PrimaryPhase ¶
func (my *DiagnoseParser) PrimaryPhase(error_token int) *RepairCandidate
This function tries primary and scope recovery on each available configuration. If a successful recovery is found and no secondary phase recovery can do better, a diagnosis is issued, the configuration is updated and the function returns "true". Otherwise, it returns "false".
func (*DiagnoseParser) ReallocateStacks ¶
func (my *DiagnoseParser) ReallocateStacks()
func (*DiagnoseParser) Rhs ¶
func (my *DiagnoseParser) Rhs(index int) int
func (*DiagnoseParser) ScopeLa ¶
func (my *DiagnoseParser) ScopeLa(index int) int
func (*DiagnoseParser) ScopeLhs ¶
func (my *DiagnoseParser) ScopeLhs(index int) int
func (*DiagnoseParser) ScopePrefix ¶
func (my *DiagnoseParser) ScopePrefix(index int) int
func (*DiagnoseParser) ScopeRhs ¶
func (my *DiagnoseParser) ScopeRhs(index int) int
func (*DiagnoseParser) ScopeState ¶
func (my *DiagnoseParser) ScopeState(index int) int
func (*DiagnoseParser) ScopeStateSet ¶
func (my *DiagnoseParser) ScopeStateSet(index int) int
func (*DiagnoseParser) ScopeSuffix ¶
func (my *DiagnoseParser) ScopeSuffix(index int) int
func (*DiagnoseParser) ScopeTrialCheck ¶
func (my *DiagnoseParser) ScopeTrialCheck(repair *PrimaryRepairInfo, stack []int, stack_top int, indx int)
func (*DiagnoseParser) SecondaryCheck ¶
func (my *DiagnoseParser) SecondaryCheck(stack []int, stack_top int, buffer_position int, distance int) bool
This function computes the ParseCheck distance for the best possible secondary recovery for a given configuration that either deletes none or only one symbol in the forward context. If the recovery found is more effective than the best primary recovery previously computed, then the function returns true. Only misplacement, scope and manual recoveries are attempted simple insertion or substitution of a nonterminal are tried in CHECK_PRIMARY_DISTANCE as part of primary recovery.
func (*DiagnoseParser) SecondaryDiagnosis ¶
func (my *DiagnoseParser) SecondaryDiagnosis(repair *SecondaryRepairInfo)
This procedure is invoked to issue a secondary diagnosis and adjust the input buffer. The recovery in question is either an automatic scope recovery, a manual scope recovery, a secondary substitution or a secondary deletion.
func (*DiagnoseParser) SecondaryPhase ¶
func (my *DiagnoseParser) SecondaryPhase(error_token int) *RepairCandidate
Secondary_phase is a bool function that checks whether or not some form of secondary recovery is applicable to one of the error configurations. First, if "next_stack" is available, misplacement and secondary recoveries are attempted on it. Then, in any case, these recoveries are attempted on "stack". If a successful recovery is found, a diagnosis is issued, the configuration is updated and the function returns "true". Otherwise, the function returns false.
func (*DiagnoseParser) SecondaryRecovery ¶
func (my *DiagnoseParser) SecondaryRecovery(repair *SecondaryRepairInfo, stack []int, stack_top int, last_index int, stack_flag bool)
This function checks whether or not a given configuration yields a better secondary recovery than the best misplacement recovery computed previously.
func (*DiagnoseParser) SetMonitor ¶
func (my *DiagnoseParser) SetMonitor(monitor Monitor)
func (*DiagnoseParser) SymbolIndex ¶
func (my *DiagnoseParser) SymbolIndex(index int) int
func (*DiagnoseParser) TAction ¶
func (my *DiagnoseParser) TAction(act int, sym int) int
Compute the next action defined on act and sym. If my action requires more Lookahead, these Lookahead symbols are in the token stream beginning at the next token that is yielded by Peek().
func (*DiagnoseParser) TermAction ¶
func (my *DiagnoseParser) TermAction(index int) int
func (*DiagnoseParser) TermCheck ¶
func (my *DiagnoseParser) TermCheck(index int) int
func (*DiagnoseParser) TerminalIndex ¶
func (my *DiagnoseParser) TerminalIndex(index int) int
type DiagnoseParserBase ¶
type DiagnoseParserBase interface {
ReallocateStacks()
}
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
Error is custom error for additional features.
func (*Error) Current ¶
Current creates and returns the current level error. It returns nil if current level error is nil.
func (*Error) Format ¶
Format formats the frame according to the fmt.Formatter interface.
%v, %s : Print all the error string; %-v, %-s : Print current level error string; %+s : Print full stack error list; %+v : Print the error string and full stack error list;
func (*Error) MarshalJSON ¶
MarshalJSON implements the interface MarshalJSON for json.Marshal. Note that do not use pointer as its receiver here.
type ErrorToken ¶
type ErrorToken struct { *Token // contains filtered or unexported fields }
func NewErrorToken ¶
func (*ErrorToken) GetErrorToken ¶
func (a *ErrorToken) GetErrorToken() IToken
func (*ErrorToken) GetFirstRealToken ¶
func (a *ErrorToken) GetFirstRealToken() IToken
func (*ErrorToken) GetFirstToken ¶
func (a *ErrorToken) GetFirstToken() IToken
func (*ErrorToken) GetFollowingAdjuncts ¶
func (a *ErrorToken) GetFollowingAdjuncts() []IToken
func (*ErrorToken) GetLastRealToken ¶
func (a *ErrorToken) GetLastRealToken() IToken
func (*ErrorToken) GetLastToken ¶
func (a *ErrorToken) GetLastToken() IToken
func (*ErrorToken) GetPrecedingAdjuncts ¶
func (a *ErrorToken) GetPrecedingAdjuncts() []IToken
type IAbstractArrayList ¶
type IAstVisitor ¶
type ILexStream ¶
type ILexStream interface { TokenStream GetIPrsStream() IPrsStream SetPrsStream(stream IPrsStream) GetLineCount() int OrderedExportedSymbols() []string GetLineOffSet(i int) int GetLineNumberOfCharAt(i int) int GetColumnOfCharAt(i int) int GetCharValue(i int) string GetInputChars() []rune GetIntValue(i int) int MakeToken(startLoc int, endLoc int, kind int) SetMessageHandler(handler IMessageHandler) GetMessageHandler() IMessageHandler GetLocation(leftLoc int, rightLoc int) []int ReportLexicalErrorPosition(leftLoc int, rightLoc int) ReportLexicalError(leftLoc int, rightLoc int, errorCode int, errorLeftLoc int, errorRightLoc int, errorInfo []string) ToString(startOffSet int, endOffSet int) string }
type IMessageHandler ¶
type IPrsStream ¶
type IPrsStream interface { TokenStream GetMessageHandler() IMessageHandler SetMessageHandler(handler IMessageHandler) GetILexStream() ILexStream SetLexStream(lexStream ILexStream) MakeToken(startLoc int, endLoc int, kind int) MakeAdjunct(startLoc int, endLoc int, kind int) RemoveLastToken() GetLineCount() int GetSize() int RemapTerminalSymbols(ordered_parser_symbols []string, eof_symbol int) error OrderedTerminalSymbols() []string MapKind(kind int) int ResetTokenStream() GetStreamIndex() int ResetStreamLength() SetStreamIndex(index int) SetStreamLength(length int) AddToken(token IToken) AddAdjunct(adjunct IToken) OrderedExportedSymbols() []string GetTokens() *TokenArrayList GetAdjuncts() *TokenArrayList GetFollowingAdjuncts(i int) []IToken GetPrecedingAdjuncts(i int) []IToken GetIToken(i int) IToken GetTokenText(i int) string GetStartOffset(i int) int GetEndOffSet(i int) int GetLineOffSet(i int) int GetLineNumberOfCharAt(i int) int GetColumnOfCharAt(i int) int GetTokenLength(i int) int GetLineNumberOfTokenAt(i int) int GetEndLineNumberOfTokenAt(i int) int GetColumnOfTokenAt(i int) int GetEndColumnOfTokenAt(i int) int GetInputChars() []rune ToStringFromIndex(first_token int, last_token int) string ToString(t1 IToken, t2 IToken) string GetTokenIndexAtCharacter(offSet int) int GetTokenAtCharacter(offSet int) IToken GetTokenAt(i int) IToken DumpTokens() DumpToken(i int) MakeErrorToken(first int, last int, error int, kind int) int }
type IToken ¶
type IToken interface { GetKind() int SetKind(kind int) GetStartOffset() int SetStartOffset(startOffset int) GetEndOffset() int SetEndOffset(endOffset int) GetTokenIndex() int SetTokenIndex(i int) GetAdjunctIndex() int SetAdjunctIndex(i int) GetPrecedingAdjuncts() []IToken GetFollowingAdjuncts() []IToken GetILexStream() ILexStream GetIPrsStream() IPrsStream GetLine() int GetColumn() int GetEndLine() int GetEndColumn() int ToString() string }
type IntArrayList ¶
type IntArrayList struct {
// contains filtered or unexported fields
}
func NewIntArrayList ¶
func NewIntArrayList() *IntArrayList
func NewIntArrayListFrom ¶
func NewIntArrayListFrom(array []int) *IntArrayList
func NewIntArrayListFromCopy ¶
func NewIntArrayListFromCopy(array []int) *IntArrayList
func NewIntArrayListSize ¶
func NewIntArrayListSize(size int, cap int) *IntArrayList
func (*IntArrayList) Add ¶
func (a *IntArrayList) Add(elem int) *IntArrayList
func (*IntArrayList) At ¶
func (a *IntArrayList) At(index int) (value int)
func (*IntArrayList) Clear ¶
func (a *IntArrayList) Clear() bool
func (*IntArrayList) Clone ¶
func (a *IntArrayList) Clone() *IntArrayList
func (*IntArrayList) Contains ¶
func (a *IntArrayList) Contains(val int) bool
func (*IntArrayList) Get ¶
func (a *IntArrayList) Get(index int) int
func (*IntArrayList) IndexOf ¶
func (a *IntArrayList) IndexOf(elem int) int
func (*IntArrayList) IsEmpty ¶
func (a *IntArrayList) IsEmpty() bool
func (*IntArrayList) LastIndexOf ¶
func (a *IntArrayList) LastIndexOf(elem int) int
func (*IntArrayList) Remove ¶
func (a *IntArrayList) Remove(value int) bool
func (*IntArrayList) RemoveAll ¶
func (a *IntArrayList) RemoveAll() bool
func (*IntArrayList) Search ¶
func (a *IntArrayList) Search(value int) int
func (*IntArrayList) Size ¶
func (a *IntArrayList) Size() int
func (*IntArrayList) ToArray ¶
func (a *IntArrayList) ToArray() []int
type IntSegmentedTuple ¶
type IntSegmentedTuple struct {
// contains filtered or unexported fields
}
func NewIntSegmentedTuple ¶
func NewIntSegmentedTuple(logBlksize int, baseSize int) *IntSegmentedTuple
func NewIntSegmentedTupleDefault ¶
func NewIntSegmentedTupleDefault() *IntSegmentedTuple
func (*IntSegmentedTuple) Add ¶
func (a *IntSegmentedTuple) Add(element int)
Add an element to the dynamic array and return a reference to that element.
func (*IntSegmentedTuple) BinarySearch ¶
func (a *IntSegmentedTuple) BinarySearch(element int) int
If array is sorted, a function will find the index location of a given element if it is contained in the array. Otherwise, it will return the negation of the index of the element prior to which the element would be inserted in the array.
func (*IntSegmentedTuple) Get ¶
func (a *IntSegmentedTuple) Get(i int) int
Return a reference to the ith element of the dynamic array.
Note that no check is made here to ensure that 0 <= i < top. Such a check might be useful for debugging and a range exception should be thrown if it yields true.
func (*IntSegmentedTuple) NextIndex ¶
func (a *IntSegmentedTuple) NextIndex() int
NextIndex Add an element to the dynamic array and return the top index.
func (*IntSegmentedTuple) Reset ¶
func (a *IntSegmentedTuple) Reset()
This function is used to Reset the size of a dynamic array without allocating or deallocting space. It may be invoked with an integer argument n which indicates the size or with no argument which indicates that the size should be Reset to 0.
func (*IntSegmentedTuple) ResetTo ¶
func (a *IntSegmentedTuple) ResetTo(n int)
func (*IntSegmentedTuple) Resize ¶
func (a *IntSegmentedTuple) Resize()
This function is invoked with an integer argument n. It ensures that enough space is allocated for n elements in the dynamic array. I.e., that the array will be indexable in the range (0..n-1){
Note that a function can be used as a garbage collector. When invoked with no argument(or 0){, it frees up all dynamic space that was allocated for the array.
func (*IntSegmentedTuple) ResizeTo ¶
func (a *IntSegmentedTuple) ResizeTo(n int)
func (*IntSegmentedTuple) Set ¶
func (a *IntSegmentedTuple) Set(i int, element int)
Insert an element in the dynamic array at the location indicated.
func (*IntSegmentedTuple) Size ¶
func (a *IntSegmentedTuple) Size() int
type IntTuple ¶
type IntTuple struct {
// contains filtered or unexported fields
}
func NewIntTupleWithEstimate ¶
func (*IntTuple) Get ¶
Return a reference to the ith element of the dynamic array.
Note that no check is made here to ensure that 0 <= i < top. Such a check might be useful for debugging and a range exception should be thrown if it yields true.
func (*IntTuple) ResetTo ¶
This function is used to Reset the size of a dynamic array without allocating or deallocting space. It may be invoked with an integer argument n which indicates the size or with no argument which indicates that the size should be Reset to 0.
type LexParser ¶
type LexParser struct { STACK_INCREMENT int START_STATE int LA_STATE_OFFSET int EOFT_SYMBOL int ACCEPT_ACTION int ERROR_ACTION int START_SYMBOL int NUM_RULES int // contains filtered or unexported fields }
func NewLexParser ¶
func NewLexParser() *LexParser
func NewLexParserAndInit ¶
func NewLexParserAndInit(tokStream ILexStream, prs ParseTable, ra RuleAction) *LexParser
func (*LexParser) GetCurrentRule ¶
func (*LexParser) GetFirstToken ¶
func (*LexParser) GetFirstTokenAt ¶
The following functions can be invoked only when the parser is processing actions. Thus, they can be invoked when the parser was entered via the main entry point (ParseCharacters()). When using the incremental parser (via the entry point ScanNextToken(int [], int)), they always return 0 when invoked. // TODO Should we throw an Exception instead? However, note that when ParseActions() is invoked after successfully parsing an input with the incremental parser, then they can be invoked.
func (*LexParser) GetLastToken ¶
func (*LexParser) GetLastTokenAt ¶
func (*LexParser) GetToken ¶
Given a rule of the form A = x1 x2 ... xn n > 0
the function GetToken(i) yields the symbol xi, if xi is a terminal or ti, if xi is a nonterminal that produced a string of the form xi => ti w. If xi is a nullable nonterminal, then ti is the first
symbol that immediately follows xi in the input (the Lookahead).
func (*LexParser) LexNextCharacter ¶
This function takes as argument a configuration ([my.stack, stackTop], [my.tokStream, my.curtok]) and determines whether or not the reduce my.action the my.curtok can be validly parsed in my configuration.
func (*LexParser) LexNextToken ¶
func (*LexParser) ParseActions ¶
func (my *LexParser) ParseActions()
Now do the final parse of the input based on the actions in the list "my.action" and the sequence of tokens in the token stream.
func (*LexParser) ParseCharacters ¶
Parse the input and create a stream of tokens.
func (*LexParser) ParseCharactersWhitMonitor ¶
Parse the input and create a stream of tokens.
func (*LexParser) ParseNextCharacter ¶
This function takes as argument a configuration ([stack, stackTop], [tokStream, curtok]) and determines whether or not curtok can be validly parsed in my configuration. If so, it parses curtok and returns the final shift or shift-reduce action on it. Otherwise, it leaves the configuration unchanged and returns ERROR_ACTION.
func (*LexParser) ReallocateStacks ¶
func (my *LexParser) ReallocateStacks()
func (*LexParser) Reset ¶
func (my *LexParser) Reset(tokStream ILexStream, prs ParseTable, ra RuleAction)
func (*LexParser) ResetTokenStream ¶
func (*LexParser) ScanNextToken ¶
func (*LexParser) ScanNextTokenFromStartOffSet ¶
type LexStream ¶
type LexStream struct { DEFAULT_TAB int // contains filtered or unexported fields }
func NewLexStream ¶
func NewLexStreamExt ¶
func NewLexStreamExt(dispatch ILexStream, fileName string, inputChars []rune, tab int, lineOffSets *IntSegmentedTuple) (*LexStream, error)
func (*LexStream) ComputeLineOffSets ¶
func (my *LexStream) ComputeLineOffSets()
func (*LexStream) GetCharValue ¶
func (*LexStream) GetColumnOfCharAt ¶
func (*LexStream) GetEndColumn ¶
func (*LexStream) GetEndLine ¶
func (*LexStream) GetFileName ¶
func (*LexStream) GetFileString ¶
func (*LexStream) GetFirstErrorToken ¶
func (*LexStream) GetFirstRealToken ¶
func (*LexStream) GetIPrsStream ¶
func (my *LexStream) GetIPrsStream() IPrsStream
func (*LexStream) GetInputChars ¶
func (*LexStream) GetIntValue ¶
func (*LexStream) GetLastErrorToken ¶
func (*LexStream) GetLastRealToken ¶
func (*LexStream) GetLineCount ¶
func (*LexStream) GetLineNumberOfCharAt ¶
func (*LexStream) GetLineOffSet ¶
func (*LexStream) GetLineOffSets ¶
func (my *LexStream) GetLineOffSets() *IntSegmentedTuple
func (*LexStream) GetMessageHandler ¶
func (my *LexStream) GetMessageHandler() IMessageHandler
func (*LexStream) GetPrevious ¶
func (*LexStream) GetStreamIndex ¶
func (*LexStream) GetStreamLength ¶
func (*LexStream) GetTokenFromEndToken ¶
func (*LexStream) OrderedExportedSymbols ¶
func (*LexStream) ReportError ¶
func (*LexStream) ReportLexicalError ¶
func (*LexStream) ReportLexicalErrorPosition ¶
func (*LexStream) SetFileName ¶
func (*LexStream) SetInputChars ¶
func (*LexStream) SetLineOffSet ¶
func (*LexStream) SetLineOffSets ¶
func (my *LexStream) SetLineOffSets(lineOffSets *IntSegmentedTuple)
func (*LexStream) SetMessageHandler ¶
func (my *LexStream) SetMessageHandler(errMsg IMessageHandler)
Here is where we report errors. The default method is simply to print the error message to the console. However, the user may supply an error message handler to process error messages. To support that a message handler interface is provided that has a single method HandleMessage(). The user has his error message handler class implement the IMessageHandler interface and provides an object of this type to the runtime using the SetMessageHandler(errorMsg) method. If the message handler object is Set, the ReportError methods will invoke its HandleMessage() method.
func (*LexStream) SetPrsStream ¶
func (my *LexStream) SetPrsStream(prsStream IPrsStream)
func (*LexStream) SetStreamIndex ¶
func (*LexStream) SetStreamLength ¶
type MismatchedInputCharsException ¶
type MismatchedInputCharsException struct {
// contains filtered or unexported fields
}
func NewMismatchedInputCharsException ¶
func NewMismatchedInputCharsException(info string) *MismatchedInputCharsException
func (*MismatchedInputCharsException) Error ¶
func (a *MismatchedInputCharsException) Error() string
Error implements the interface of Error, it returns all the error as string.
func (*MismatchedInputCharsException) ToString ¶
func (a *MismatchedInputCharsException) ToString() string
type NotBacktrackParseTableException ¶
type NotBacktrackParseTableException struct {
// contains filtered or unexported fields
}
func NewNotBacktrackParseTableException ¶
func NewNotBacktrackParseTableException(info string) *NotBacktrackParseTableException
func (*NotBacktrackParseTableException) Error ¶
func (a *NotBacktrackParseTableException) Error() string
Error implements the interface of Error, it returns all the error as string.
func (*NotBacktrackParseTableException) ToString ¶
func (a *NotBacktrackParseTableException) ToString() string
type NotDeterministicParseTableException ¶
type NotDeterministicParseTableException struct {
// contains filtered or unexported fields
}
func NewNotDeterministicParseTableException ¶
func NewNotDeterministicParseTableException(info string) *NotDeterministicParseTableException
func (*NotDeterministicParseTableException) Error ¶
func (a *NotDeterministicParseTableException) Error() string
Error implements the interface of Error, it returns all the error as string.
func (*NotDeterministicParseTableException) ToString ¶
func (a *NotDeterministicParseTableException) ToString() string
type NullExportedSymbolsException ¶
type NullExportedSymbolsException struct {
// contains filtered or unexported fields
}
func NewNullExportedSymbolsException ¶
func NewNullExportedSymbolsException(info string) *NullExportedSymbolsException
func (*NullExportedSymbolsException) Error ¶
func (a *NullExportedSymbolsException) Error() string
Error implements the interface of Error, it returns all the error as string.
func (*NullExportedSymbolsException) ToString ¶
func (a *NullExportedSymbolsException) ToString() string
type NullPointerException ¶
type NullPointerException struct {
// contains filtered or unexported fields
}
func NewNullPointerException ¶
func NewNullPointerException(info string) *NullPointerException
func (*NullPointerException) Error ¶
func (a *NullPointerException) Error() string
Error implements the interface of Error, it returns all the error as string.
func (*NullPointerException) ToString ¶
func (a *NullPointerException) ToString() string
type NullTerminalSymbolsException ¶
type NullTerminalSymbolsException struct {
// contains filtered or unexported fields
}
func NewNullTerminalSymbolsException ¶
func NewNullTerminalSymbolsException(info string) *NullTerminalSymbolsException
func (*NullTerminalSymbolsException) Error ¶
func (a *NullTerminalSymbolsException) Error() string
Error implements the interface of Error, it returns all the error as string.
func (*NullTerminalSymbolsException) ToString ¶
func (a *NullTerminalSymbolsException) ToString() string
type ObjectTuple ¶
type ObjectTuple struct {
// contains filtered or unexported fields
}
func NewObjectTupleWithEstimate ¶
func NewObjectTupleWithEstimate(estimate int) *ObjectTuple
func (*ObjectTuple) Add ¶
func (my *ObjectTuple) Add(element interface{})
Add an element to the dynamic array and return a reference to that element.
func (*ObjectTuple) Get ¶
func (my *ObjectTuple) Get(i int) interface{}
Return a reference to the ith element of the dynamic array.
Note that no check is made here to ensure that 0 <= i < top. Such a check might be useful for debugging and a range exception should be thrown if it yields true.
func (*ObjectTuple) NextIndex ¶
func (my *ObjectTuple) NextIndex() int
Add an element to the dynamic array and return the top index.
func (*ObjectTuple) Reset ¶
func (my *ObjectTuple) Reset()
func (*ObjectTuple) ResetTo ¶
func (my *ObjectTuple) ResetTo(n int)
This function is used to Reset the size of a dynamic array without allocating or deallocting space. It may be invoked with an integer argument n which indicates the size or with no argument which indicates that the size should be Reset to 0.
func (*ObjectTuple) Set ¶
func (my *ObjectTuple) Set(index int, value interface{})
Insert an element in the dynamic array at the location indicated.
type ParseTable ¶
type ParseTable interface { BaseCheck(index int) int Rhs(index int) int BaseAction(index int) int Lhs(index int) int TermCheck(index int) int TermAction(index int) int Asb(index int) int Asr(index int) int Nasb(index int) int Nasr(index int) int TerminalIndex(index int) int NonterminalIndex(index int) int ScopePrefix(index int) int ScopeSuffix(index int) int ScopeLhs(index int) int ScopeLa(index int) int ScopeStateSet(index int) int ScopeRhs(index int) int ScopeState(index int) int InSymb(index int) int Name(index int) string OriginalState(state int) int Asi(state int) int Nasi(state int) int InSymbol(state int) int NtAction(state int, sym int) int TAction(act int, sym int) int LookAhead(act int, sym int) int GetErrorSymbol() int GetScopeUbound() int GetScopeSize() int GetMaxNameLength() int GetNumStates() int GetNtOffset() int GetLaStateOffset() int GetMaxLa() int GetNumRules() int GetNumNonterminals() int GetNumSymbols() int GetStartState() int GetStartSymbol() int GetEoftSymbol() int GetEoltSymbol() int GetAcceptAction() int GetErrorAction() int IsNullable(symbol int) bool IsValidForParser() bool GetBacktrack() bool }
type PrimaryRepairInfo ¶
type PrimaryRepairInfo struct {
// contains filtered or unexported fields
}
func NewPrimaryRepairInfo ¶
func NewPrimaryRepairInfo() *PrimaryRepairInfo
func NewPrimaryRepairInfoAndClone ¶
func NewPrimaryRepairInfoAndClone(clone *PrimaryRepairInfo) *PrimaryRepairInfo
type PrsStream ¶
type PrsStream struct {
// contains filtered or unexported fields
}
PrsStream holds an arraylist of tokens "lexed" from the input stream.
func NewPrsStream ¶
func NewPrsStream(iLexStream ILexStream) *PrsStream
func NewPrsStreamExt ¶
func NewPrsStreamExt(dispatch IPrsStream, iLexStream ILexStream) *PrsStream
func (*PrsStream) AddAdjunct ¶
func (*PrsStream) DumpTokens ¶
func (my *PrsStream) DumpTokens()
func (*PrsStream) GetAdjuncts ¶
func (my *PrsStream) GetAdjuncts() *TokenArrayList
func (*PrsStream) GetAdjunctsFromIndex ¶
func (*PrsStream) GetColumnOfCharAt ¶
func (*PrsStream) GetColumnOfTokenAt ¶
func (*PrsStream) GetEndColumn ¶
func (*PrsStream) GetEndColumnOfTokenAt ¶
func (*PrsStream) GetEndLine ¶
func (*PrsStream) GetEndLineNumberOfTokenAt ¶
func (*PrsStream) GetEndOffSet ¶
func (*PrsStream) GetFileName ¶
func (*PrsStream) GetFirstErrorToken ¶
func (*PrsStream) GetFirstRealToken ¶
func (*PrsStream) GetFollowingAdjuncts ¶
func (*PrsStream) GetILexStream ¶
func (my *PrsStream) GetILexStream() ILexStream
func (*PrsStream) GetInputChars ¶
func (*PrsStream) GetLastErrorToken ¶
func (*PrsStream) GetLastRealToken ¶
func (*PrsStream) GetLexStream ¶
func (my *PrsStream) GetLexStream() ILexStream
func (*PrsStream) GetLineCount ¶
func (*PrsStream) GetLineNumberOfCharAt ¶
func (*PrsStream) GetLineNumberOfTokenAt ¶
func (*PrsStream) GetLineOffSet ¶
func (*PrsStream) GetMessageHandler ¶
func (my *PrsStream) GetMessageHandler() IMessageHandler
func (*PrsStream) GetPrecedingAdjuncts ¶
func (*PrsStream) GetPrevious ¶
func (*PrsStream) GetStartOffset ¶
func (*PrsStream) GetStreamIndex ¶
func (*PrsStream) GetStreamLength ¶
func (*PrsStream) GetTokenAt ¶
func (*PrsStream) GetTokenAtCharacter ¶
func (*PrsStream) GetTokenFromEndToken ¶
func (*PrsStream) GetTokenIndexAtCharacter ¶
func (*PrsStream) GetTokenLength ¶
func (*PrsStream) GetTokenText ¶
func (*PrsStream) GetTokens ¶
func (my *PrsStream) GetTokens() *TokenArrayList
func (*PrsStream) MakeAdjunct ¶
func (*PrsStream) MakeErrorToken ¶
func (*PrsStream) OrderedExportedSymbols ¶
func (*PrsStream) OrderedTerminalSymbols ¶
func (*PrsStream) RemapTerminalSymbols ¶
func (*PrsStream) RemoveLastToken ¶
func (my *PrsStream) RemoveLastToken()
func (*PrsStream) ReportError ¶
func (*PrsStream) ResetLexStream ¶
func (my *PrsStream) ResetLexStream(lexStream ILexStream)
func (*PrsStream) ResetStreamLength ¶
func (my *PrsStream) ResetStreamLength()
func (*PrsStream) ResetTokenStream ¶
func (my *PrsStream) ResetTokenStream()
func (*PrsStream) SetLexStream ¶
func (my *PrsStream) SetLexStream(lexStream ILexStream)
func (*PrsStream) SetMessageHandler ¶
func (my *PrsStream) SetMessageHandler(errMsg IMessageHandler)
Here is where we report errors. The default method is simply to fmt.Printf the error message to the console. However, the user may supply an error message handler to process error messages. To support that a message handler interface is provided that has a single method HandleMessage(). The user has his error message handler class implement the IMessageHandler interface and provides an object of my type to the runtime using the SetMessageHandler(errorMsg) method. If the message handler object is Set, the ReportError methods will invoke its HandleMessage() method.
IMessageHandler errMsg = null // the error message handler object is declared in LexStream
func (*PrsStream) SetStreamIndex ¶
func (*PrsStream) SetStreamLength ¶
type RecoveryParser ¶
type RecoveryParser struct { *DiagnoseParser // contains filtered or unexported fields }
func NewRecoveryParser ¶
func NewRecoveryParser(parser *BacktrackingParser, action *IntSegmentedTuple, tokens *IntTuple, tokStream IPrsStream, prs ParseTable, maxErrors int, maxTime int, monitor Monitor) *RecoveryParser
NewRecoveryParser maxErrors is the maximum int of errors to be repaired maxTime is the maximum amount of time allowed for diagnosing but at least one error must be diagnosed
func (*RecoveryParser) AcceptRecovery ¶
func (my *RecoveryParser) AcceptRecovery(error_token int)
func (*RecoveryParser) CompleteScope ¶
func (my *RecoveryParser) CompleteScope(action *IntSegmentedTuple, scope_rhs_index int) bool
func (*RecoveryParser) FixError ¶
func (my *RecoveryParser) FixError(start_token int, error_token int) bool
Given the configuration consisting of the states in stateStack and the sequence of tokens (current_kind, followed by the tokens in tokStream), FixError parses up to error_token in the tokStream recovers, if possible, from that error and returns the result. While doing my, it also computes the location_stack information and the sequence of actions that matches up with the result that it returns.
func (*RecoveryParser) ReallocateStacks ¶
func (my *RecoveryParser) ReallocateStacks()
func (*RecoveryParser) Recover ¶
func (my *RecoveryParser) Recover(marker_token int, error_token int) (int, error)
func (*RecoveryParser) ReportError ¶
func (my *RecoveryParser) ReportError(scope_index int, error_token int)
type RepairCandidate ¶
type RepairCandidate struct {
// contains filtered or unexported fields
}
func NewRepairCandidate ¶
func NewRepairCandidate() *RepairCandidate
type RuleAction ¶
type RuleAction interface {
RuleAction(ruleNumber int)
}
type SecondaryRepairInfo ¶
type SecondaryRepairInfo struct {
// contains filtered or unexported fields
}
func NewSecondaryRepairInfo ¶
func NewSecondaryRepairInfo() *SecondaryRepairInfo
type Stacks ¶
type Stacks struct { STACK_INCREMENT int // contains filtered or unexported fields }
func (*Stacks) AllocateOtherStacks ¶
func (a *Stacks) AllocateOtherStacks()
Allocate location and parse stacks using the size of the state stack.
func (*Stacks) GetSym ¶
Given a rule of the form A ::= x1 x2 ... xn n > 0
The function GETSYM(i): yields the AST subtree associated with symbol xi. NOTE that if xi is a terminal, GETSYM(i): is nil ! (However, see token_action below.):
SetSYM1(Object ast): is a function that allows us to assign an AST tree to GETSYM(1).
func (*Stacks) GetToken ¶
Given a rule of the form A ::= x1 x2 ... xn n > 0
the function GETTOKEN(i): yields the symbol xi, if xi is a terminal or ti, if xi is a nonterminal that produced a string of the form xi => ti w.
func (*Stacks) ReallocateStacks ¶
func (a *Stacks) ReallocateStacks()
Allocate or reallocate all the stacks. Their sizes should always be the same.
func (*Stacks) ReallocateStateStack ¶
func (a *Stacks) ReallocateStateStack()
Allocate or reallocate the state stack only.
type StateElement ¶
type StateElement struct {
// contains filtered or unexported fields
}
func NewStateElement ¶
func NewStateElement() *StateElement
type StateInfo ¶
type StateInfo struct {
// contains filtered or unexported fields
}
func NewStateInfo ¶
type Token ¶
type Token struct {
*AbstractToken
}
func NewToken ¶
func NewToken(startOffSet int, endOffSet int, kind int, iPrsStream IPrsStream) *Token
func (*Token) GetFollowingAdjuncts ¶
func (*Token) GetPrecedingAdjuncts ¶
type TokenArrayList ¶
type TokenArrayList struct {
// contains filtered or unexported fields
}
func NewTokenArrayList ¶
func NewTokenArrayList() *TokenArrayList
func NewTokenArrayListFrom ¶
func NewTokenArrayListFrom(array []IToken) *TokenArrayList
func NewTokenArrayListFromCopy ¶
func NewTokenArrayListFromCopy(array []IToken) *TokenArrayList
func NewTokenArrayListSize ¶
func NewTokenArrayListSize(size int, cap int) *TokenArrayList
func (*TokenArrayList) Add ¶
func (a *TokenArrayList) Add(elem IToken) *TokenArrayList
func (*TokenArrayList) At ¶
func (a *TokenArrayList) At(index int) (value IToken)
func (*TokenArrayList) Clear ¶
func (a *TokenArrayList) Clear() bool
func (*TokenArrayList) Clone ¶
func (a *TokenArrayList) Clone() *TokenArrayList
func (*TokenArrayList) Contains ¶
func (a *TokenArrayList) Contains(val IToken) bool
func (*TokenArrayList) Get ¶
func (a *TokenArrayList) Get(index int) IToken
func (*TokenArrayList) IndexOf ¶
func (a *TokenArrayList) IndexOf(elem IToken) int
func (*TokenArrayList) IsEmpty ¶
func (a *TokenArrayList) IsEmpty() bool
func (*TokenArrayList) LastIndexOf ¶
func (a *TokenArrayList) LastIndexOf(elem IToken) int
func (*TokenArrayList) Remove ¶
func (a *TokenArrayList) Remove(value IToken) bool
func (*TokenArrayList) RemoveAll ¶
func (a *TokenArrayList) RemoveAll() bool
func (*TokenArrayList) RemoveAt ¶
func (a *TokenArrayList) RemoveAt(index int) (value IToken, found bool)
func (*TokenArrayList) Search ¶
func (a *TokenArrayList) Search(value IToken) int
func (*TokenArrayList) Size ¶
func (a *TokenArrayList) Size() int
func (*TokenArrayList) ToArray ¶
func (a *TokenArrayList) ToArray() []IToken
type TokenStream ¶
type TokenStream interface { GetTokenFromEndToken(end_token int) int GetToken() int GetKind(i int) int GetNext(i int) int GetPrevious(i int) int GetName(i int) string Peek() int Reset() ResetTo(i int) BadToken() int GetLine(i int) int GetColumn(i int) int GetEndLine(i int) int GetEndColumn(i int) int AfterEol(i int) bool GetFileName() string GetStreamLength() int GetFirstRealToken(i int) int GetLastRealToken(i int) int ReportError(errorCode int, leftToken int, rightToken int, errorInfo []string, errorToken int) }
type TokenStreamNotIPrsStreamException ¶
type TokenStreamNotIPrsStreamException struct {
// contains filtered or unexported fields
}
func NewTokenStreamNotIPrsStreamException ¶
func NewTokenStreamNotIPrsStreamException(info string) *TokenStreamNotIPrsStreamException
func (*TokenStreamNotIPrsStreamException) Error ¶
func (a *TokenStreamNotIPrsStreamException) Error() string
Error implements the interface of Error, it returns all the error as string.
func (*TokenStreamNotIPrsStreamException) ToString ¶
func (a *TokenStreamNotIPrsStreamException) ToString() string
type UnavailableParserInformationException ¶
type UnavailableParserInformationException struct {
// contains filtered or unexported fields
}
func NewUnavailableParserInformationException ¶
func NewUnavailableParserInformationException(info string) *UnavailableParserInformationException
func (*UnavailableParserInformationException) Error ¶
func (a *UnavailableParserInformationException) Error() string
Error implements the interface of Error, it returns all the error as string.
func (*UnavailableParserInformationException) ToString ¶
func (a *UnavailableParserInformationException) ToString() string
type UndefinedEofSymbolException ¶
type UndefinedEofSymbolException struct {
// contains filtered or unexported fields
}
func NewUndefinedEofSymbolException ¶
func NewUndefinedEofSymbolException(info string) *UndefinedEofSymbolException
func (*UndefinedEofSymbolException) Error ¶
func (a *UndefinedEofSymbolException) Error() string
Error implements the interface of Error, it returns all the error as string.
func (*UndefinedEofSymbolException) ToString ¶
func (a *UndefinedEofSymbolException) ToString() string
type UnimplementedTerminalsException ¶
type UnimplementedTerminalsException struct {
// contains filtered or unexported fields
}
func NewUnimplementedTerminalsException ¶
func NewUnimplementedTerminalsException(symbols *IntArrayList) *UnimplementedTerminalsException
func (*UnimplementedTerminalsException) Error ¶
func (a *UnimplementedTerminalsException) Error() string
Error implements the interface of Error, it returns all the error as string.
func (*UnimplementedTerminalsException) GetSymbols ¶
func (a *UnimplementedTerminalsException) GetSymbols() *IntArrayList
func (*UnimplementedTerminalsException) ToString ¶
func (a *UnimplementedTerminalsException) ToString() string
type UnknownStreamType ¶
type UnknownStreamType struct {
// contains filtered or unexported fields
}
func NewUnknownStreamType ¶
func NewUnknownStreamType(info string) *UnknownStreamType
func (*UnknownStreamType) Error ¶
func (a *UnknownStreamType) Error() string
Error implements the interface of Error, it returns all the error as string.
func (*UnknownStreamType) ToString ¶
func (a *UnknownStreamType) ToString() string
Source Files
¶
- AbstractToken.go
- Adjunct.go
- ArrayList.go
- BacktrackingParser.go
- BadParseException.go
- BadParseSymFileException.go
- ConfigurationElement.go
- ConfigurationStack.go
- DeterministicParser.go
- ErrorToken.go
- IAbstractArrayList.go
- IAst.go
- IAstVisitor.go
- ILexStream.go
- IMessageHandler.go
- IPrsStream.go
- IToken.go
- IntArrayList.go
- IntSegmentedTuple.go
- IntTuple.go
- LexParser.go
- LexStream.go
- MismatchedInputCharsException.go
- Monitor.go
- NotBacktrackParseTableException.go
- NotDeterministicParseTableException.go
- NullExportedSymbolsException.go
- NullPointerException.go
- NullTerminalSymbolsException.go
- ObjectTuple.go
- ParseErrorCodes.go
- ParseTable.go
- PrsStream.go
- RecoveryParser.go
- RuleAction.go
- Stacks.go
- StateElement.go
- Token.go
- TokenArrayList.go
- TokenStream.go
- TokenStreamNotIPrsStreamException.go
- UnavailableParserInformationException.go
- UndefinedEofSymbolException.go
- UnimplementedTerminalsException.go
- UnknownStreamType.go
- Utils.go
- command.go
- diagnose.go
- error.go
- error_error.go
- error_stack.go
- gstr.go
- util_debug.go