public class C4GraphParseTreeListener extends Object implements C4L1ParserListenerDecorator, C4L2ParserListenerDecorator, C4L3ParserListenerDecorator
ParseTreeListener that translates the C4 syntax tree to a JAXB model..| Constructor and Description |
|---|
C4GraphParseTreeListener(GraphMLModel model)
A constructor that turns off the failing of the process on syntax errors.
|
C4GraphParseTreeListener(GraphMLModel model,
boolean throwOnParseError)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
enterEveryRule(org.antlr.v4.runtime.ParserRuleContext ctx)
Does nothing.
|
void |
exitEveryRule(org.antlr.v4.runtime.ParserRuleContext ctx)
Does nothing.
|
org.thewonderlemming.c4plantuml.grammars.generated.C4L1ParserListener |
getDecoratedC4L1ParserListener()
returns the instance of the
C4L1ParserListener being decorated. |
org.thewonderlemming.c4plantuml.grammars.generated.C4L2ParserListener |
getDecoratedC4L2ParserListener()
returns the instance of the
C4L2ParserListener being decorated. |
org.thewonderlemming.c4plantuml.grammars.generated.C4L3ParserListener |
getDecoratedC4L3ParserListener()
returns the instance of the
C4L3ParserListener being decorated. |
void |
parseTree(org.antlr.v4.runtime.tree.ParseTree tree,
Path currentPath)
Initializes the inner parsers and walks through the given
ParseTree to fill in the GraphMLModel. |
void |
visitErrorNode(org.antlr.v4.runtime.tree.ErrorNode node)
Logs syntax errors and throws a
C4ParseException if the
throwOnParseError flag is truned on. |
void |
visitTerminal(org.antlr.v4.runtime.tree.TerminalNode node)
Does nothing.
|
void |
wrapUp()
Merges the computes graphs into the given
GraphMLModel instance. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitenterBoundary, enterCloud, enterComma, enterDiagram, enterEnterprise_boundary, enterFooter, enterInclude, enterL1_title, enterLayout, enterPerson_ext, enterPerson, enterRelationship, enterStatement, enterSystem_ext, enterSystem, enterTitle, exitBoundary, exitCloud, exitComma, exitDiagram, exitEnterprise_boundary, exitFooter, exitInclude, exitL1_title, exitLayout, exitPerson_ext, exitPerson, exitRelationship, exitStatement, exitSystem_ext, exitSystem, exitTitleenterBoundary, enterCloud, enterComma, enterContainer, enterDiagram, enterEnterprise_boundary, enterFooter, enterInclude, enterL2_title, enterLayout, enterPerson_ext, enterPerson, enterRelationship, enterStatement, enterSystem_boundary, enterSystem_ext, enterSystem, enterTitle, exitBoundary, exitCloud, exitComma, exitContainer, exitDiagram, exitEnterprise_boundary, exitFooter, exitInclude, exitL2_title, exitLayout, exitPerson_ext, exitPerson, exitRelationship, exitStatement, exitSystem_boundary, exitSystem_ext, exitSystem, exitTitleenterBoundary, enterCloud, enterComma, enterComponent, enterContainer_boundary, enterContainer, enterDiagram, enterEnterprise_boundary, enterFooter, enterInclude, enterL3_title, enterLayout, enterPerson_ext, enterPerson, enterRelationship, enterStatement, enterSystem_ext, enterSystem, enterTitle, exitBoundary, exitCloud, exitComma, exitComponent, exitContainer_boundary, exitContainer, exitDiagram, exitEnterprise_boundary, exitFooter, exitInclude, exitL3_title, exitLayout, exitPerson_ext, exitPerson, exitRelationship, exitStatement, exitSystem_ext, exitSystem, exitTitlepublic C4GraphParseTreeListener(GraphMLModel model)
model - the empty JAXB model instance to fill in.public C4GraphParseTreeListener(GraphMLModel model, boolean throwOnParseError)
model - the empty JAXB model instance to fill in.throwOnParseError - a flag that tells whether or not the process should stop and throw on syntax errors.public void enterEveryRule(org.antlr.v4.runtime.ParserRuleContext ctx)
enterEveryRule in interface org.antlr.v4.runtime.tree.ParseTreeListenerpublic void exitEveryRule(org.antlr.v4.runtime.ParserRuleContext ctx)
exitEveryRule in interface org.antlr.v4.runtime.tree.ParseTreeListenerpublic org.thewonderlemming.c4plantuml.grammars.generated.C4L1ParserListener getDecoratedC4L1ParserListener()
C4L1ParserListener being decorated.getDecoratedC4L1ParserListener in interface C4L1ParserListenerDecoratorC4L1ParserListener.public org.thewonderlemming.c4plantuml.grammars.generated.C4L2ParserListener getDecoratedC4L2ParserListener()
C4L2ParserListener being decorated.getDecoratedC4L2ParserListener in interface C4L2ParserListenerDecoratorC4L2ParserListener.public org.thewonderlemming.c4plantuml.grammars.generated.C4L3ParserListener getDecoratedC4L3ParserListener()
C4L3ParserListener being decorated.getDecoratedC4L3ParserListener in interface C4L3ParserListenerDecoratorC4L3ParserListener.public void parseTree(org.antlr.v4.runtime.tree.ParseTree tree,
Path currentPath)
ParseTree to fill in the GraphMLModel.tree - the ParseTree instance that represents the current C4 source file (an AST).currentPath - the path to the current C4 source file.public void visitErrorNode(org.antlr.v4.runtime.tree.ErrorNode node)
visitErrorNode in interface org.antlr.v4.runtime.tree.ParseTreeListenerpublic void visitTerminal(org.antlr.v4.runtime.tree.TerminalNode node)
visitTerminal in interface org.antlr.v4.runtime.tree.ParseTreeListenerpublic void wrapUp()
throws Throwable
GraphMLModel instance.Throwable - if any exception was collected during the process.Copyright © 2020. All rights reserved.