|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.h2.build.doc.BnfRailroad
public class BnfRailroad
A BNF visitor that generates HTML railroad diagrams.
Constructor Summary | |
---|---|
BnfRailroad()
|
Method Summary | |
---|---|
java.lang.String |
getHtml(Bnf bnf,
java.lang.String syntaxLines)
Generate the HTML for the given syntax. |
void |
visitRuleElement(boolean keyword,
java.lang.String name,
Rule link)
Visit a rule element. |
void |
visitRuleFixed(int type)
Visit a fixed rule. |
void |
visitRuleList(boolean or,
java.util.ArrayList<Rule> list)
Visit a rule list. |
void |
visitRuleOptional(Rule rule)
Visit an optional rule. |
void |
visitRuleRepeat(boolean comma,
Rule rule)
Visit a repeat rule. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BnfRailroad()
Method Detail |
---|
public java.lang.String getHtml(Bnf bnf, java.lang.String syntaxLines)
bnf
- the BNF parsersyntaxLines
- the syntax
public void visitRuleElement(boolean keyword, java.lang.String name, Rule link)
BnfVisitor
visitRuleElement
in interface BnfVisitor
keyword
- whether this is a keywordname
- the element namelink
- the linked rule if it's not a keywordpublic void visitRuleRepeat(boolean comma, Rule rule)
BnfVisitor
visitRuleRepeat
in interface BnfVisitor
comma
- whether the comma is repeated as wellrule
- the element to repeatpublic void visitRuleFixed(int type)
BnfVisitor
visitRuleFixed
in interface BnfVisitor
type
- the typepublic void visitRuleList(boolean or, java.util.ArrayList<Rule> list)
BnfVisitor
visitRuleList
in interface BnfVisitor
or
- true for OR, false for ANDlist
- the rulespublic void visitRuleOptional(Rule rule)
BnfVisitor
visitRuleOptional
in interface BnfVisitor
rule
- the rule
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |