Replies: 5 comments 8 replies
-
Similar issues: |
Beta Was this translation helpful? Give feedback.
-
OK, Java target is 5x faster than C++. |
Beta Was this translation helpful? Give feedback.
-
I don't think there's a good Antlr grammar for C. The one in grammars-v4/c requires huge lookaheads for expressions and declarations, and is ambiguous for parameterDeclarations. The expression rules are unnatural for Antlr. Similar rules in the Java Language Spec were refactored for performance. It seems as though it's derived from ISO 9899, but I can't tell what refactorings were made. |
Beta Was this translation helpful? Give feedback.
-
I used the same C grammar for both ANTLR and LRSTAR, which seemed to work fine. Unfortunately, this stuff takes time. |
Beta Was this translation helpful? Give feedback.
-
I found the C++ target to have poor performance, when parsing and creating a parse tree.
How does that compare to the Java target?
When parsing a 227,000-line file of C code the ANTLR parser required 14 seconds.
A parser generated by LRSTAR required 0.1 seconds. It looks very strange.
Has anybody compared the C++ performance to the Java performance ?
Beta Was this translation helpful? Give feedback.
All reactions