Documentation ¶
Index ¶
Constants ¶
View Source
const ( M_OR byte = iota M_SEQ M_DROP M_OMIT_VERBOSITY )
View Source
const ( F_VERBOSE byte = 1 << iota F_MUTE )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CallRule ¶
type CallRule struct {
Name string
}
func (CallRule) Parse ¶
func (c CallRule) Parse(sf SyntaxFile, t *parsing.Token, d *ast.AST, e *ErrorRecorder) *parsing.Token
func (CallRule) ScanForKeyWords ¶
type ErrorRecorder ¶
type ErrorRecorder struct {
Errors []SyntaxError
}
func (*ErrorRecorder) Add ¶
func (e *ErrorRecorder) Add(err SyntaxError)
func (*ErrorRecorder) AddErr ¶
func (e *ErrorRecorder) AddErr(p interface{}, w string)
func (*ErrorRecorder) Backup ¶
func (e *ErrorRecorder) Backup() (b ErrorRecorder)
func (*ErrorRecorder) Restore ¶
func (e *ErrorRecorder) Restore(b ErrorRecorder)
type Group ¶
func (Group) Parse ¶
func (g Group) Parse(sf SyntaxFile, t *parsing.Token, d *ast.AST, e *ErrorRecorder) *parsing.Token
func (Group) ScanForKeyWords ¶
type MatchText ¶
type MatchText struct {
Text string
}
func (MatchText) Parse ¶
func (m MatchText) Parse(sf SyntaxFile, t *parsing.Token, d *ast.AST, e *ErrorRecorder) *parsing.Token
func (MatchText) ScanForKeyWords ¶
type MatchToken ¶
type MatchToken struct {
Token string
}
func (MatchToken) Parse ¶
func (m MatchToken) Parse(sf SyntaxFile, t *parsing.Token, d *ast.AST, e *ErrorRecorder) *parsing.Token
func (MatchToken) ScanForKeyWords ¶
func (m MatchToken) ScanForKeyWords(km map[string]string)
func (MatchToken) String ¶
func (m MatchToken) String() string
type Modifier ¶
func (Modifier) Parse ¶
func (m Modifier) Parse(sf SyntaxFile, t *parsing.Token, d *ast.AST, e *ErrorRecorder) *parsing.Token
func (Modifier) ScanForKeyWords ¶
type Rule ¶
type Rule interface { // Scans for keywords, used by SyntaxFile.ScanForKeyWords ScanForKeyWords(km map[string]string) // Parses an // sf SyntaxFile: its parent syntax file object // t *parsing.Token: the first token (the source is a linked list of tokens // that uses a lazy evaluation technique) // d *ast.AST: The destination for the AST // e *ErrorRecorder: The destination for the Error messages Parse(sf SyntaxFile, t *parsing.Token, d *ast.AST, e *ErrorRecorder) *parsing.Token }
A Syntax rule (general interface).
type SyntaxError ¶
type SyntaxError struct { Position interface{} What string }
type SyntaxFile ¶
A SyntaxFile object. It containes all (top-level) rules.
func (SyntaxFile) ScanForKeyWords ¶
func (sf SyntaxFile) ScanForKeyWords(km map[string]string)
Scans for keywords and stores it inside a map. It is needed for the Lexer.
func (SyntaxFile) String ¶
func (sf SyntaxFile) String() string
Click to show internal directories.
Click to hide internal directories.