Documentation
¶
Index ¶
- type AndPredicate
- type Exp
- type ExpressionTree
- type NonTerminal
- type NotPredicate
- type OneOrMore
- type Optional
- type OrderedChoice
- type Parser
- func (this *Parser) AndPredicate(exp Exp) *AndPredicate
- func (this *Parser) NonTerminal(name string) *NonTerminal
- func (this *Parser) NotPredicate(exp Exp) *NotPredicate
- func (this *Parser) OneOrMore(exp Exp) *OneOrMore
- func (this *Parser) Optional(exp Exp) *Optional
- func (this *Parser) OrderedChoice(exps ...Exp) *OrderedChoice
- func (this *Parser) Parse(text string) *ExpressionTree
- func (this *Parser) Range(start, end int) *OrderedChoice
- func (this *Parser) Sequence(exps ...Exp) *Sequence
- func (this *Parser) Terminal(ch int) *Terminal
- func (this *Parser) ZeroOrMore(exp Exp) *ZeroOrMore
- type Result
- type Sequence
- type Terminal
- type ZeroOrMore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AndPredicate ¶
func (*AndPredicate) Match ¶
func (this *AndPredicate) Match(start int) (int, *Result)
And Predicate
func (*AndPredicate) String ¶
func (this *AndPredicate) String() string
type ExpressionTree ¶
type ExpressionTree struct {
Name string
Children []*ExpressionTree
Value int
}
func (*ExpressionTree) String ¶
func (this *ExpressionTree) String() string
type NonTerminal ¶
func (*NonTerminal) String ¶
func (this *NonTerminal) String() string
type NotPredicate ¶
func (*NotPredicate) Match ¶
func (this *NotPredicate) Match(start int) (int, *Result)
Not Predicate
func (*NotPredicate) String ¶
func (this *NotPredicate) String() string
type OrderedChoice ¶
func (*OrderedChoice) Match ¶
func (this *OrderedChoice) Match(start int) (int, *Result)
Ordered Choice
func (*OrderedChoice) String ¶
func (this *OrderedChoice) String() string
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
func (*Parser) AndPredicate ¶
func (this *Parser) AndPredicate(exp Exp) *AndPredicate
func (*Parser) NonTerminal ¶
func (this *Parser) NonTerminal(name string) *NonTerminal
func (*Parser) NotPredicate ¶
func (this *Parser) NotPredicate(exp Exp) *NotPredicate
func (*Parser) OrderedChoice ¶
func (this *Parser) OrderedChoice(exps ...Exp) *OrderedChoice
func (*Parser) Parse ¶
func (this *Parser) Parse(text string) *ExpressionTree
func (*Parser) Range ¶
func (this *Parser) Range(start, end int) *OrderedChoice
Extensions for easier construction
func (*Parser) ZeroOrMore ¶
func (this *Parser) ZeroOrMore(exp Exp) *ZeroOrMore
type ZeroOrMore ¶
func (*ZeroOrMore) String ¶
func (this *ZeroOrMore) String() string
Click to show internal directories.
Click to hide internal directories.