[antlr-interest] antlr-2007-12-31.14 was a great pre-release

Mark Wright markwright at internode.on.net
Mon Feb 11 06:57:15 PST 2008


Hi,

ANTLR is great.  I am really happy that it can compile my grammar.

My favourite pre-release is antlr-2007-12-31.14.  antlr-2007-12-31.14
is more than 10 times faster than the antlr-2007-12-31.17 pre-release
and all subsequent pre-releases up to the latest I could download
antlr-2008-02-05.15 (fisheye never works for me).

My ANTLR grammar is slightly over 2000 lines, the generated parser is
about 2.7 MB:

goanna% wc Tntdbo.g TntdboParser.java
    2134    4975   79049 Tntdbo.g
   46561  117928 2681755 TntdboParser.java
   48695  122903 2760804 total
goanna% 

Times for antlr to compile it with java 1.5.0_14-b03 on a 2.8 GHz
Opteron are:

 25416 ms - antlr-2007-12-31.14 - love this pre-release!
405494 ms - antlr-2008-02-05.15 - its great that it compiles it!

The grammar has 149 dis-ambiguating semantic predicates, no other
predicates. There is no use of ANTLR backtracking.

Thanks, Mark

antlr-2007-12-31.14
-------------------

gmake p
java -Xmx512m
-classpath /h/goanna/2/eng/dev/tntdbo/java_src:/h/goanna/2/eng/dev/tntdbo:/h/goanna/2/ts/antlr/antlr-2007-12-31.14/lib/antlr-2007-12-31.14.jar:/h/goanna/2/ts/antlr/antlr-2007-12-31.14/lib/runtime-2007-12-31.14.jar:/h/goanna/2/ts/antlr/antlr-2007-12-31.14/lib/stringtemplate-3.1b1.jar:/h/goanna/2/ts/antlr/antlr-2007-12-31.14/lib/antlr-2.7.7.jar
org.antlr.Tool -Xconversiontimeout 600000 -report Tntdbo.g ANTLR Parser
Generator  Version 3.1b1 (??)  1989-2007 ANTLR Grammar Report; Stats
Version 4 Grammar: Tntdbo Type: combined
Target language: Java
Output: AST
Grammar option k: none
Grammar option backtrack: false
Rules: 193
Productions: 484
Decisions: 266
Cyclic DFA decisions: 0
LL(1) decisions: 167
Min fixed k: -1
Max fixed k: 5
Average fixed k: 0.462406015037594
Standard deviation of fixed k: 1.060658499894118
Min acyclic DFA states: 0
Max acyclic DFA states: 88
Average acyclic DFA states: 8.101503759398497
Standard deviation of acyclic DFA states: 15.430948979548202
Total acyclic DFA states: 2155
Min cyclic DFA states: 0
Max cyclic DFA states: 0
Average cyclic DFA states: 0.0
Standard deviation of cyclic DFA states: 0.0
Total cyclic DFA states: 0
Vocabulary size: 297
DFA creation time in ms: 25416
Number of semantic predicates found: 149
Number of manual fixed lookahead k=value options: 68
Number of nondeterministic decisions: 109
Number of nondeterministic decisions resolved with predicates: 109
Number of DFA conversions terminated early: 0
Number of errors: 0
Number of warnings: 0
Number of infos: 0
Number of syntactic predicates found: 0
Decisions with syntactic predicates: 0
Decision DFAs using syntactic predicates: 0
Decisions with semantic predicates: 69
Decision DFAs using semantic predicates: 109

Backtracking report:
Number of decisions that backtrack: 0

NFA conversion early termination report:
Number of NFA conversions that terminated early: 0

rm -f TntdboParser.java.orig
mv TntdboParser.java TntdboParser.java.orig
sed -f sed_fix_dot_tree.sed TntdboParser.java.orig
>TntdboParser.java.missing_right_curly_brace cat
>TntdboParser.java.missing_right_curly_brace
>missing_right_curly_brace.txt >TntdboParser.java

Compilation finished at Tue Feb 12 00:36:39

-- 

antlr-2008-02-05.15
-------------------

-*- mode: compilation; default-directory:
"/h/goanna/2/eng/dev/tntdbo/java_src/tntdbo/dboc/" -*- Compilation
started at Tue Feb 12 00:50:28

gmake p
java -Xmx512m
-classpath /h/goanna/2/eng/dev/tntdbo/java_src:/h/goanna/2/eng/dev/tntdbo:/h/goanna/2/ts/antlr/antlr-2008-02-05.15/lib/antlr-2008-02-05.15.jar:/h/goanna/2/ts/antlr/antlr-2008-02-05.15/lib/runtime-2008-02-05.15.jar:/h/goanna/2/ts/antlr/antlr-2008-02-05.15/lib/stringtemplate-3.1b1.jar:/h/goanna/2/ts/antlr/antlr-2008-02-05.15/lib/antlr-2.7.7.jar
org.antlr.Tool -Xconversiontimeout 600000 -report Tntdbo.g ANTLR Parser
Generator  Version 3.1b1 (??)  1989-2007 ANTLR Grammar Report; Stats
Version 4 Grammar: Tntdbo Type: combined
Target language: Java
Output: AST
Grammar option k: none
Grammar option backtrack: false
Rules: 193
Productions: 484
Decisions: 266
Cyclic DFA decisions: 0
LL(1) decisions: 167
Min fixed k: -1
Max fixed k: 5
Average fixed k: 0.462406015037594
Standard deviation of fixed k: 1.060658499894118
Min acyclic DFA states: 0
Max acyclic DFA states: 88
Average acyclic DFA states: 8.101503759398497
Standard deviation of acyclic DFA states: 15.430948979548202
Total acyclic DFA states: 2155
Min cyclic DFA states: 0
Max cyclic DFA states: 0
Average cyclic DFA states: 0.0
Standard deviation of cyclic DFA states: 0.0
Total cyclic DFA states: 0
Vocabulary size: 297
DFA creation time in ms: 405494
Number of semantic predicates found: 149
Number of manual fixed lookahead k=value options: 68
Number of nondeterministic decisions: 109
Number of nondeterministic decisions resolved with predicates: 109
Number of DFA conversions terminated early: 0
Number of errors: 0
Number of warnings: 0
Number of infos: 1
Number of syntactic predicates found: 0
Decisions with syntactic predicates: 0
Decision DFAs using syntactic predicates: 0
Decisions with semantic predicates: 69
Decision DFAs using semantic predicates: 109

Backtracking report:
Number of decisions that backtrack: 0

NFA conversion early termination report:
Number of NFA conversions that terminated early: 0


Compilation finished at Tue Feb 12 00:57:27


-- 


More information about the antlr-interest mailing list