From 665b64fee048df88159a3ff24c90386ecb0061e5 Mon Sep 17 00:00:00 2001 From: parrt Date: Sun, 7 Mar 2010 16:16:10 -0800 Subject: [PATCH] have pieces of DFA conversion working [git-p4: depot-paths = "//depot/code/antlr4/main/": change = 6742] --- .../v4/tool/templates/dot/action-edge.st | 2 + .../v4/tool/templates/dot/decision-rank.st | 3 + .../org/antlr/v4/tool/templates/dot/dfa.st | 3 +- .../org/antlr/v4/tool/templates/dot/edge.st | 3 + .../v4/tool/templates/dot/epsilon-edge.st | 2 + .../org/antlr/v4/tool/templates/dot/nfa.st | 2 + .../org/antlr/v4/tool/templates/dot/state.st | 2 + .../antlr/v4/tool/templates/dot/stopstate.st | 2 + tool/src/org/antlr/v4/Tool.java | 152 ++++++++++- .../org/antlr/v4/automata/AtomTransition.java | 4 +- .../org/antlr/v4/automata/DFASerializer.java | 2 +- tool/src/org/antlr/v4/automata/DFAState.java | 28 +- tool/src/org/antlr/v4/automata/Edge.java | 14 +- tool/src/org/antlr/v4/automata/Label.java | 5 + .../antlr/v4/automata/NFAToDFAConverter.java | 249 +++++++++++++++++- .../antlr/v4/automata/RangeTransition.java | 5 + .../org/antlr/v4/automata/SetTransition.java | 7 +- .../src/org/antlr/v4/automata/Transition.java | 3 + tool/src/org/antlr/v4/tool/DOTGenerator.java | 19 +- 19 files changed, 468 insertions(+), 39 deletions(-) diff --git a/tool/resources/org/antlr/v4/tool/templates/dot/action-edge.st b/tool/resources/org/antlr/v4/tool/templates/dot/action-edge.st index 1bb8e9611..210278de7 100644 --- a/tool/resources/org/antlr/v4/tool/templates/dot/action-edge.st +++ b/tool/resources/org/antlr/v4/tool/templates/dot/action-edge.st @@ -1 +1,3 @@ +action-edge() ::= << -> [fontsize=11, fontname="Courier", arrowsize=.7, label = "