public interface GrammarBuilder extends GrammarMapper
map, map, mapTerminal addTerminal(String name, AstType type, SourceElement origin)
Nonterminal addNonterminal(String name, SourceElement origin)
Nonterminal addAnonymous(String nameHint, SourceElement origin)
Nonterminal addShared(RhsPart part, String nameHint)
Terminal getEoi()
NamedPattern addPattern(String name, RegexPart regexp, SourceElement origin)
LexerState addState(String name, SourceElement origin)
LexerRule addLexerRule(int kind, Terminal sym, RegexPart regexp, Iterable<LexerState> states, int priority, LexerRule classLexerRule, SourceElement origin)
RhsSymbol symbol(Symbol sym, SourceElement origin)
RhsAssignment assignment(String name, RhsPart inner, boolean isAddition, SourceElement origin)
RhsCast cast(Symbol asSymbol, RhsPart inner, SourceElement origin)
RhsChoice choice(Collection<RhsPart> parts, SourceElement origin)
RhsSequence sequence(String name, Collection<RhsPart> parts, SourceElement origin)
RhsSequence empty(SourceElement origin)
RhsUnordered unordered(Collection<RhsPart> parts, SourceElement origin)
RhsOptional optional(RhsPart inner, SourceElement origin)
RhsList list(RhsSequence inner, RhsPart separator, boolean nonEmpty, SourceElement origin)
RhsIgnored.ParenthesisPair parenthesisPair(Terminal opening, Terminal closing)
RhsIgnored ignored(RhsPart inner, Collection<RhsIgnored.ParenthesisPair> parentheses, SourceElement origin)
RhsSet set(RhsSet.Operation operation, Symbol symbol, Collection<RhsSet> parts, SourceElement origin)
void addRule(Nonterminal left, RhsPart rhSide, Terminal prio)
InputRef addInput(Nonterminal inputSymbol, boolean hasEoi, SourceElement origin)
Prio addPrio(int prio, Collection<Terminal> symbols, SourceElement origin)
Grammar create()
Copyright © 2014. All rights reserved.