If the lexer was built from scratch, the SyntaxSeparation object returned
will not be null and can be used to retrieve the parser syntax, else
null is returned, as the separation is not available in serialized Lexer.
Responsibilities of (bottom-up) parser tables, that must provide:
all terminals, without EPSILON (for the Lexer)
the syntax
the follow-state from the GOTO-table
the follow action from the PARSE-ACTION-table
a list of expected terminals
Lexer result tree element, holding texts, its line/column range, and result children.
rightSize() -
Method in class fri.patterns.interpreter.parsergenerator.syntax.Rule
Rule - class fri.patterns.interpreter.parsergenerator.syntax.Rule.
A rule is a list of String symbols on the right side
and a nonterminal on the left side: "a ::= b c d;"
A nonterminal is represented as a String with no quotes,
every terminal must appear quoted by " or ' or ` (backquote).
Rule() -
Constructor for class fri.patterns.interpreter.parsergenerator.syntax.Rule
Serializable constructor, do not use.
Rule(List) -
Constructor for class fri.patterns.interpreter.parsergenerator.syntax.Rule
Constructing a rule from a String List, first element is interpreted as nonterminal.
Rule(String[]) -
Constructor for class fri.patterns.interpreter.parsergenerator.syntax.Rule
Constructing a rule from a String array, first element is interpreted as nonterminal.
Rule(String, int) -
Constructor for class fri.patterns.interpreter.parsergenerator.syntax.Rule
The contained methods are needed to generate nonterminal names for spawned rules,
e.g. for a repeatable nullable rule "(a | b | c)" from the rule "e ::= (a | b | c)* d;".
SyntaxChecker checks a EBNF syntax (file) for following things:
unresolved nonterminals (nonterminals without rule)
singular rules (nonterminal can be substituted by its singular right symbol)
isolated rules (redundant, can be removed)
None or more than one toplevel rule
SYNTAX: java fri.patterns.interpreter.parsergenerator.util.SyntaxChecker file.syntax [file.syntax ...]
TreeBuilderSemantic example that shows the instance tree of
the EBNF file syntax/builder/examples/SyntaxBuilder.syntaxTreeBuilderExample() -
Constructor for class fri.patterns.interpreter.parsergenerator.semantics.examples.TreeBuilderExample