Code Too Large For Try Statement

238 views
Skip to first unread message

Right_Then

unread,
Jul 21, 2014, 6:23:10 AM7/21/14
to
Dear Fellows,

My grammar was parsing too slow. SLL never worked for me. 
Diagnostics showed that it is going for full context search and encountering ambiguities therefore SLL always fails.

line 2:3 reportAttemptingFullContext d=821 (argValuesInFunCall), input='"clang/AST/ASTConsumer.h",'
line 2:3 reportAmbiguity d=821 (argValuesInFunCall): ambigAlts={1, 3}, input='"clang/AST/ASTConsumer.h",'

It showed maximum problem in expression rule.
Because above stated rules and other rules would lead to expression rule also.
Because almost! everything is expression in my language(attempt).
expression rule has 60 options/possibilities and 42 options are in the primary rule of expression
i.e

expression:
  primary
| expression + expression
| etc...
;

I dont know about Left factoring as much i do about Refactoring the code.
and that is how i am addressing my grammar so that it remains readable/understandable to me.
I have no background in parsing or compiler design i am just a hobbyist.

So i decided to make things easier for Antlr by coding all the possibilities for expression rule/options myself
and putting them there explicitly. Hoping speed would increase then, because Antlr wont have to spend time guessing expressions.
It turned out the possibilities for those 60 expression options are 125606 if expanded to be exact and counting!!!.
Well i did it! i wrote them all. But i have only placed first 400 expression rule options in the .g4 file. And
javac complains about the above mentioned error as.

  1. java:57461: error: code too large for try statement catch (RecognitionException re) {
                                                                                     ^
     2. java:41028: error: code too large for try statement
                try {
                    ^
     3. java:41020: error: code too large
         private ExpressionContext expression(int _p) throws RecognitionException {
                                  ^



I read Mr. Terrance suggestion in a related question https://groups.google.com/forum/#!topic/antlr-discussion/AkbmtmDtQe0
to divide such rules with many options into different rules so that not to clutter one rule with many x|y|z options.

Alright that can be done but now i am fearing that java has a limit for the size of function itself i.e 
A single method in a Java class may be at most 64KB of bytecode.

I tried it now errors are of memory heap
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.antlr.v4.runtime.misc.TestRig.process(TestRig.java:249)
at org.antlr.v4.runtime.misc.TestRig.process(TestRig.java:192)
at org.antlr.v4.runtime.misc.TestRig.main(TestRig.java:143)
Caused by: java.lang.OutOfMemoryError: Java heap space
at org.antlr.v4.runtime.misc.DoubleKeyMap.put(DoubleKeyMap.java:49)
at org.antlr.v4.runtime.atn.PredictionContext.mergeSingletons(PredictionContext.java:259)
at org.antlr.v4.runtime.atn.PredictionContext.merge(PredictionContext.java:180)
at org.antlr.v4.runtime.atn.PredictionContext.mergeArrays(PredictionContext.java:420)
at org.antlr.v4.runtime.atn.PredictionContext.merge(PredictionContext.java:199)
at org.antlr.v4.runtime.atn.ATNConfigSet.add(ATNConfigSet.java:175)
at org.antlr.v4.runtime.atn.ParserATNSimulator.closure_(ParserATNSimulator.java:1447)
at org.antlr.v4.runtime.atn.ParserATNSimulator.closureCheckingStopState(ParserATNSimulator.java:1431)
at org.antlr.v4.runtime.atn.ParserATNSimulator.closure_(ParserATNSimulator.java:1492)
at org.antlr.v4.runtime.atn.ParserATNSimulator.closureCheckingStopState(ParserATNSimulator.java:1431)
at org.antlr.v4.runtime.atn.ParserATNSimulator.closure_(ParserATNSimulator.java:1492)
at org.antlr.v4.runtime.atn.ParserATNSimulator.closureCheckingStopState(ParserATNSimulator.java:1431)
at org.antlr.v4.runtime.atn.ParserATNSimulator.closure_(ParserATNSimulator.java:1492)
at org.antlr.v4.runtime.atn.ParserATNSimulator.closureCheckingStopState(ParserATNSimulator.java:1431)
at org.antlr.v4.runtime.atn.ParserATNSimulator.closure_(ParserATNSimulator.java:1492)
at org.antlr.v4.runtime.atn.ParserATNSimulator.closureCheckingStopState(ParserATNSimulator.java:1431)
at org.antlr.v4.runtime.atn.ParserATNSimulator.closure_(ParserATNSimulator.java:1492)
at org.antlr.v4.runtime.atn.ParserATNSimulator.closureCheckingStopState(ParserATNSimulator.java:1431)
at org.antlr.v4.runtime.atn.ParserATNSimulator.closure_(ParserATNSimulator.java:1492)
at org.antlr.v4.runtime.atn.ParserATNSimulator.closureCheckingStopState(ParserATNSimulator.java:1431)
at org.antlr.v4.runtime.atn.ParserATNSimulator.closure_(ParserATNSimulator.java:1492)
at org.antlr.v4.runtime.atn.ParserATNSimulator.closureCheckingStopState(ParserATNSimulator.java:1431)
at org.antlr.v4.runtime.atn.ParserATNSimulator.closure_(ParserATNSimulator.java:1492)
at org.antlr.v4.runtime.atn.ParserATNSimulator.closureCheckingStopState(ParserATNSimulator.java:1431)
at org.antlr.v4.runtime.atn.ParserATNSimulator.closure_(ParserATNSimulator.java:1492)
at org.antlr.v4.runtime.atn.ParserATNSimulator.closureCheckingStopState(ParserATNSimulator.java:1431)
at org.antlr.v4.runtime.atn.ParserATNSimulator.closure_(ParserATNSimulator.java:1492)
at org.antlr.v4.runtime.atn.ParserATNSimulator.closureCheckingStopState(ParserATNSimulator.java:1431)
at org.antlr.v4.runtime.atn.ParserATNSimulator.closure_(ParserATNSimulator.java:1492)
at org.antlr.v4.runtime.atn.ParserATNSimulator.closureCheckingStopState(ParserATNSimulator.java:1431)
at org.antlr.v4.runtime.atn.ParserATNSimulator.closure_(ParserATNSimulator.java:1492)
at org.antlr.v4.runtime.atn.ParserATNSimulator.closureCheckingStopState(ParserATNSimulator.java:1431)


I am not a jvm guy either i am mostly on .Net .

Since code for the parser is being generated and not handwritten, would there be any attempt to solve this problem?

The C# backend gives up, by saying, code is too complicated to compile. It compiles and works very well with Java backend thou.
I am only having issues with parsing speed.


Thank You
Regards

Right_Then

Sam Harwell

unread,
Jul 21, 2014, 9:27:29 AM7/21/14
to antlr-di...@googlegroups.com
There are many reasons why a grammar could exhibit poor runtime performance. If you could send me the grammar which is too slow along with a copy of some input which demonstrates the slow performance, I could provide more detailed information about the best way to tackle the problem. 

Thanks, 
Sam
I read Mr. Terrance suggestion in a related question to divide such rules with many options into different rules 
so that not to clutter one rule with many x|y|z options.

Alright that can be done but now i am fearing that java has a limit for the size of function itself i.e 
A single method in a Java class may be at most 64KB of bytecode.

I am not a jvm guy either i am mostly on .Net .

Since code for the parser is being generated and not handwritten, would there be any attempt to solve this problem?

The C# backend gives up, by saying, code is too complicated to compile. It compiles and works very well with Java backend thou.
I am only having issues with parsing speed.


Thank You
Regards

Right_Then

--
You received this message because you are subscribed to the Google Groups "antlr-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to antlr-discussi...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Right_Then

unread,
Jul 21, 2014, 3:17:05 PM7/21/14
to antlr-di...@googlegroups.com
Thanks Sam for the reply,

I was confused whether to send it on your email or post it here on the forum 
well here it is. It is a zip file. my humble attempt.
Please read the readme first.

Thanks 
Regards

Right_Then
AndThenWas.7z

Sam Harwell

unread,
Jul 21, 2014, 7:30:45 PM7/21/14
to antlr-di...@googlegroups.com

Have you tried generating your code and running it with the 4.3-opt release instead of the reference release? For highly complex grammars like this one, it may produce better performance results.

https://github.com/sharwell/antlr4/releases/tag/4.3-opt

 

·         The only decision preventing SLL mode from parsing funSigTest.andthen is the decision in typeName. In 4 of 4 cases where SLL mode couldn’t pick a unique answer, it picked the first alternative but the second was actually the correct alternative. If you reverse the order of these two alternatives, it will get 4 of 4 correct. For Modularize.andthen, it was getting 37 of 38 wrong; after reordering it still gets 1 of 38 wrong which means SLL mode won’t work for that file. For the Modularize.andthen input file, the conditionalConstructsConstituents and allowableIdentifierTypes rules also contain decisions which are context sensitive (i.e. would cause SLL to fail, even if typeName did not cause it to fail).

·         Many decisions in your grammar are ambiguous. For these decisions, ANTLR will choose an alternative for you and it may or may not be the one you want. The following rules contain decision which always result in an ambiguity (at least for the inputs you provided):

o   allowedParametersInTypeTemplate (50 invocations) – There is only one decision in this rule; I’m not sure what the ambiguous alternatives were.

o   typeInstanceOrIdentifierInvoked (37 invocations) – The ambiguous decision is the one between identifierName and typeName, because every identifierName can also be parsed as a typeName.

o   collectionsCall (14 invocations) – The ambiguity occurs because one alternative of expressionList matches a single expression. The middle alternative of collectionsCall can be simply removed; it matches a strict subset of the input matched by the first alternative and will thus never be used.

o   expressionsNaturalHabitat (13 invocations) – The problem here is the same as the one in collectionsCall. The second alternative can be simply removed to eliminate the ambiguity.

o   enumBodyConstituents (4 invocations) – There is only one decision in this rule; I’m not sure what the ambiguous alternatives were.

o   funTemplateArgSignatureInFunCall (2 invocations)

·         The Whitespace and NewLine tokens are marked with the ->skip action. This means not only will these tokens not be created, but there is not even a token type assigned to them. The wSandNewLine parser rule creates new token types named Whitespace and NewLine, but these are not the same values as the Whitespace and NewLine lexer rules (the lexer rules with those names literally do not exist at all from the parser’s perspective). The wSandNewLine rule and all references to it can be removed from the parser, resulting in a 700kb decrease in the size of the generated parser Java code.

 

Sam

--

Right_Then

unread,
Jul 22, 2014, 7:52:00 AM7/22/14
to
Thanks Mr. Sam for the reply,

I just downloaded 4.3-opt but that is just source and ant build file with it gives some errors and i have never worked with java landscape as such on script levels. So it will take a bit of time figuring out mavens and ants.

  1. Why is Antlr having difficulties in resolving ambiguities i thought it would always go with the 1st possible match.
  2. I have converted typeName to refer to identifierName directly now. as i was  in process of refactoring the code.
  3. expressionList now does not match a single expression but multiple expression only. i forgot to remove it earlier. 
  4. About WhiteSpace and Newline being skipped, I actually wanted to put them on some channel in order to avoid the filling of GUI with whitespace NewLine matches. but that was temporary decision as i cannot avoid White Spaces entirely because they are required for some contexts where it is whitespace sensitive. 
line 14:28 reportAmbiguity d=443 (primary): ambigAlts={38, 40}, input='value ;'
in this line what does d=443 mean and by ambigAlts={38,40}  i thought that it was 38th and 40th
option of primary rule where ambiguity is occurring but many a times i have noticed that what it is 
reporting has nothing to do with the rule being interpreted or that ambiguity does not make any sense.


I am watching certain videos about left factoring. But in case of Antlr4 why is it difficult for it interpret a repetition of a segment when it is inside of a certain rule
for instance rule

abc: 
    a b c
  | a b 
  | a 
;

it knows now it is in Rule abc. So it should therefore also know that there are only 3 main options to check. Therefore as soon as it enters the rule abc
whatever it is interpreting it should record the success and failures within that rule. If my input is a b it should fail on 1st option because input does not have c.
when moving to 2nd option for check. instead of re-evaluating the input it should check what was successful in the previous option,
two rules a and b did match previously, now it should first check what are the rules in this new option it is going to match input with.
There it would realize that the rules inside this option have already been perfectly matched so it need not match anything again.
Would not that cause automatic left-factoring and also speed up the parsing.

I apologize if that or something better is already being done in this regard by the Antlr 4
simply consider it my prattle. 


Thanks
Regards

Right_Then

Sam Harwell

unread,
Jul 22, 2014, 11:19:55 PM7/22/14
to antlr-di...@googlegroups.com

The 4.3-opt release is available through Maven Central. If you aren’t using Maven, you can download the Jar files directly.

 

ANTLR 4 does not have problems resolving ambiguities. The problem with ambiguity is cases like the following “reference” rule:

 

                reference : typeReference | methodReference;

                typeReference : typeName;

                methodReference : methodName;

                typeName : Identifier;

                methodName : Identifier;

 

In this case, the typeReference and methodReference alternatives are ambiguous. ANTLR 4 will resolve the ambiguity by choosing typeReference. Despite writing it in the grammar, a reference in the parse tree produced for this language will never be a method reference. This could lead to problems processing the parse tree, where visitors might expect the tree to differentiate between type references and method references. Resolving the ambiguity in this example might look like this:

 

                reference : typeOrMethodReference;

                typeOrMethodReference : typeOrMethodName;

                typeOrMethodName : Identifier;

 

The grammar no longer pretends to differentiate between the syntactically equivalent type name and method name, making it clear that code operating on the parse tree will need to address this separately. The parse tree produced for an ambiguous grammar/input combination will be syntactically valid (according to the grammar), but may or may not be semantically valid.

 

 

The reportAmbiguity line includes the following information:

 

·         d=443 (primary): The ambiguous decision is decision #443, which appears in the rule “primary”. If the “primary” rule only contains one decision, then clearly this is a reference to that decision. Otherwise, if you pass the -atn flag to ANTLR when you generate your parser, you will find a file named GrammarName.primary.dot (or similar) containing the ATN graph for the “primary” rule in GraphViz format. Open that file to identify decision #443 within the rule.

·         ambigAlts={38, 40}: Alternatives 38 and 40 are ambiguous for the input provided. Note that the first alternative has index 1, not 0.

 

 

The reference release of ANTLR does not perform any left-factoring for you. The following rule is therefore highly inefficient:

 

                abc

                 : a b c

                 | a b

                 | a

                 ;

 

The following equivalent rule is much more efficient.

 

                abc

                  : a (b c?)?

                  ;

 

Obviously automatic left-factoring to improve performance is a desirable feature, but we just haven’t had the opportunity to implement it fully. Finally, it appears your explanation of the method by which the decision is made here follows the logic used by PEG parsers. ANTLR 4 uses a new parsing algorithm which is very different from this approach.

 

Thanks,

Sam

 

From: antlr-di...@googlegroups.com [mailto:antlr-di...@googlegroups.com]
Sent: Tuesday, July 22, 2014 6:52 AM
To: antlr-di...@googlegroups.com
Subject: [antlr-discussion] Re: Code Too Large For Try Statement

 

Thanks Mr. Sam for the reply,

 

I just downloaded 4.3-opt but that is just source and ant build file with it gives some errors and i have never worked with java landscape as such on script levels. So it will take a bit of time figuring out mavens and ants.

 

  1. Why is Antlr having difficulties in resolving ambiguities i thought it would always go with the 1st possible match.
  2. I have converted typeName to refer to identifierName directly now. as i was  in process of refactoring the code.
  3. expressionList now does not match a single expression but multiple expression only. i forgot to remove it earlier. 
  4. About WhiteSpace and Newline being skipped, I actually wanted to put them on some channel in order to avoid the filling of GUI with whitespace NewLine matches. but that was temporary decision as i cannot avoid White Spaces entirely because they are required for some contexts where it is whitespace sensitive. 

line 14:28 reportAmbiguity d=443 (primary): ambigAlts={38, 40}, input='value ;'

in this line what does d=443 mean and by ambigAlts={38,40}  i thought that it was 38th and 40th

option of primary rule where ambiguity is occurring but many a times i have noticed that what it is 

reporting has nothing to do with the rule being interpreted or that ambiguity does not make any sense.

 

 

I am watching certain videos about left factoring. But in case of Antlr4 why is it difficult for it interpret a repetition of a segment when it is inside of a certain rule

for instance rule

 

abc: 

    a b c

  | a b 

  | a 

;

 

it knows now it is in Rule abc. So it should therefore also know that there are only 3 main options to check. Therefore as soon as it enters the rule abc

whatever it is interpreting it should record the success and failures within that rule. If my input is a b it should fail on 1st option because input does not have c.

when moving to 2nd option for check. instead of re-evaluating the input it should check what was successful in the previous option,

two rules a and b did match previously, now it should first check what are the rules in this new option it is going to match input with.

There it would realize that the rules inside this option have already been perfectly match so it need not to match anything again.

Would not that cause automatic left-factoring and also speed up the parsing.

 

I apologize if that or something better is already being done in this regard by the Antlr 4

and i certainly apologize if i sound like teaching the Teacher. But that is my prattle. 

 

 

Thanks

Regards

 

Right_Then

 

--

Right_Then

unread,
Jul 23, 2014, 4:33:55 AM7/23/14
to
Thanks Mr Sam for the reply


The following equivalent rule is much more efficient.

 

                abc

                  : a (b c?)?

                  ;

 Oh my GOD!!! , and i searched all my grammar specifically for ?`s in order to replace them explicitly with what i want so that Antlr
 would not waste time guessing ahhh.... thats a lot of typing.

Thanks for the other tips.

I downloaded the jars. this is the error

Antlr43opt>> javac AndThenWas*.java -verbose
[parsing started RegularFileObject[AndThenWasBaseListener.java]]
[parsing completed 172ms]
[parsing started RegularFileObject[AndThenWasBaseVisitor.java]]
[parsing completed 42ms]
[parsing started RegularFileObject[AndThenWasLexer.java]]
[parsing completed 13ms]
[parsing started RegularFileObject[AndThenWasListener.java]]
[parsing completed 96ms]
[parsing started RegularFileObject[AndThenWasParser.java]]
[parsing completed 1021ms]
[parsing started RegularFileObject[AndThenWasVisitor.java]]
[parsing completed 103ms]
[search path for source files: .,H:\Downloads\Software\ProgrammingTools\LangGrammer\ANTLR\Antrl4\4.3\Opt\antlr4-4.3-complete.jar]
[search path for class files: C:\Program Files\Java\jdk1.7.0_45\jre\lib\resources.jar,C:\Program Files\Java\jdk1.7.0_45\jre\lib\rt.jar,C:\Program Files\Java\jdk1.7.0_45\jre\lib\sunrsasign.jar,C:\Program Files\Java\jdk1.7.0_45\jre\lib\jsse.jar,C:\Program Files\Java\jdk1.7.0_45\jre\lib\jce.jar,C:\Program Files\Java\jdk1.7.0_45\jre\lib\charsets.jar,C:\Program Files\Java\jdk1.7.0_45\jre\lib\jfr.jar,C:\Program Files\Java\jdk1.7.0_45\jre\classes,C:\Program Files\Java\jdk1.7.0_45\jre\lib\ext\access-bridge.jar,C:\Program Files\Java\jdk1.7.0_45\jre\lib\ext\dnsns.jar,C:\Program Files\Java\jdk1.7.0_45\jre\lib\ext\jaccess.jar,C:\Program Files\Java\jdk1.7.0_45\jre\lib\ext\localedata.jar,C:\Program Files\Java\jdk1.7.0_45\jre\lib\ext\sunec.jar,C:\Program Files\Java\jdk1.7.0_45\jre\lib\ext\sunjce_provider.jar,C:\Program Files\Java\jdk1.7.0_45\jre\lib\ext\sunmscapi.jar,C:\Program Files\Java\jdk1.7.0_45\jre\lib\ext\sunpkcs11.jar,C:\Program Files\Java\jdk1.7.0_45\jre\lib\ext\zipfs.jar,C:\Program Files\OpenNI\Bin\o
rg.OpenNI.jar,.,H:\Downloads\Software\ProgrammingTools\LangGrammer\ANTLR\Antrl4\4.3\Opt\antlr4-4.3-complete.jar]
[loading ZipFileIndexFileObject[H:\Downloads\Software\ProgrammingTools\LangGrammer\ANTLR\Antrl4\4.3\Opt\antlr4-4.3-complete.jar(org/antlr/v4/runtime/ParserRuleContext.class)]]
[loading ZipFileIndexFileObject[H:\Downloads\Software\ProgrammingTools\LangGrammer\ANTLR\Antrl4\4.3\Opt\antlr4-4.3-complete.jar(org/antlr/v4/runtime/Token.class)]]
[loading ZipFileIndexFileObject[H:\Downloads\Software\ProgrammingTools\LangGrammer\ANTLR\Antrl4\4.3\Opt\antlr4-4.3-complete.jar(org/antlr/v4/runtime/misc/NotNull.class)]]
[loading ZipFileIndexFileObject[H:\Downloads\Software\ProgrammingTools\LangGrammer\ANTLR\Antrl4\4.3\Opt\antlr4-4.3-complete.jar(org/antlr/v4/runtime/tree/ErrorNode.class)]]
[loading ZipFileIndexFileObject[H:\Downloads\Software\ProgrammingTools\LangGrammer\ANTLR\Antrl4\4.3\Opt\antlr4-4.3-complete.jar(org/antlr/v4/runtime/tree/TerminalNode.class)]]
[loading ZipFileIndexFileObject[H:\Downloads\Software\ProgrammingTools\LangGrammer\ANTLR\Antrl4\4.3\Opt\antlr4-4.3-complete.jar(org/antlr/v4/runtime/tree/ParseTreeListener.class)]]
[loading ZipFileIndexFileObject[C:\Program Files\Java\jdk1.7.0_45\lib\ct.sym(META-INF/sym/rt.jar/java/lang/Object.class)]]
[loading ZipFileIndexFileObject[H:\Downloads\Software\ProgrammingTools\LangGrammer\ANTLR\Antrl4\4.3\Opt\antlr4-4.3-complete.jar(org/antlr/v4/runtime/dfa/DFA.class)]]
[loading ZipFileIndexFileObject[C:\Program Files\Java\jdk1.7.0_45\lib\ct.sym(META-INF/sym/rt.jar/java/util/List.class)]]
[loading ZipFileIndexFileObject[C:\Program Files\Java\jdk1.7.0_45\lib\ct.sym(META-INF/sym/rt.jar/java/util/Iterator.class)]]
[loading ZipFileIndexFileObject[C:\Program Files\Java\jdk1.7.0_45\lib\ct.sym(META-INF/sym/rt.jar/java/util/ArrayList.class)]]
[loading ZipFileIndexFileObject[H:\Downloads\Software\ProgrammingTools\LangGrammer\ANTLR\Antrl4\4.3\Opt\antlr4-4.3-complete.jar(org/antlr/v4/runtime/Parser.class)]]
[loading ZipFileIndexFileObject[H:\Downloads\Software\ProgrammingTools\LangGrammer\ANTLR\Antrl4\4.3\Opt\antlr4-4.3-complete.jar(org/antlr/v4/runtime/Recognizer.class)]]
[loading ZipFileIndexFileObject[H:\Downloads\Software\ProgrammingTools\LangGrammer\ANTLR\Antrl4\4.3\Opt\antlr4-4.3-complete.jar(org/antlr/v4/runtime/RuleContext.class)]]
[loading ZipFileIndexFileObject[H:\Downloads\Software\ProgrammingTools\LangGrammer\ANTLR\Antrl4\4.3\Opt\antlr4-4.3-complete.jar(org/antlr/v4/runtime/tree/RuleNode.class)]]
[loading ZipFileIndexFileObject[H:\Downloads\Software\ProgrammingTools\LangGrammer\ANTLR\Antrl4\4.3\Opt\antlr4-4.3-complete.jar(org/antlr/v4/runtime/tree/ParseTree.class)]]
[loading ZipFileIndexFileObject[H:\Downloads\Software\ProgrammingTools\LangGrammer\ANTLR\Antrl4\4.3\Opt\antlr4-4.3-complete.jar(org/antlr/v4/runtime/tree/SyntaxTree.class)]]
[loading ZipFileIndexFileObject[H:\Downloads\Software\ProgrammingTools\LangGrammer\ANTLR\Antrl4\4.3\Opt\antlr4-4.3-complete.jar(org/antlr/v4/runtime/tree/Tree.class)]]
[loading ZipFileIndexFileObject[C:\Program Files\Java\jdk1.7.0_45\lib\ct.sym(META-INF/sym/rt.jar/java/lang/String.class)]]
[loading ZipFileIndexFileObject[H:\Downloads\Software\ProgrammingTools\LangGrammer\ANTLR\Antrl4\4.3\Opt\antlr4-4.3-complete.jar(org/antlr/v4/runtime/TokenStream.class)]]
[loading ZipFileIndexFileObject[H:\Downloads\Software\ProgrammingTools\LangGrammer\ANTLR\Antrl4\4.3\Opt\antlr4-4.3-complete.jar(org/antlr/v4/runtime/RecognitionException.class)]]
[loading ZipFileIndexFileObject[H:\Downloads\Software\ProgrammingTools\LangGrammer\ANTLR\Antrl4\4.3\Opt\antlr4-4.3-complete.jar(org/antlr/v4/runtime/atn/ATN.class)]]
[loading ZipFileIndexFileObject[H:\Downloads\Software\ProgrammingTools\LangGrammer\ANTLR\Antrl4\4.3\Opt\antlr4-4.3-complete.jar(org/antlr/v4/runtime/tree/ParseTreeVisitor.class)]]
[loading ZipFileIndexFileObject[H:\Downloads\Software\ProgrammingTools\LangGrammer\ANTLR\Antrl4\4.3\Opt\antlr4-4.3-complete.jar(org/antlr/v4/runtime/Lexer.class)]]
[loading ZipFileIndexFileObject[H:\Downloads\Software\ProgrammingTools\LangGrammer\ANTLR\Antrl4\4.3\Opt\antlr4-4.3-complete.jar(org/antlr/v4/runtime/CharStream.class)]]
[loading ZipFileIndexFileObject[H:\Downloads\Software\ProgrammingTools\LangGrammer\ANTLR\Antrl4\4.3\Opt\antlr4-4.3-complete.jar(org/antlr/v4/runtime/TokenSource.class)]]
[loading ZipFileIndexFileObject[C:\Program Files\Java\jdk1.7.0_45\lib\ct.sym(META-INF/sym/rt.jar/java/lang/annotation/Retention.class)]]
[loading ZipFileIndexFileObject[C:\Program Files\Java\jdk1.7.0_45\lib\ct.sym(META-INF/sym/rt.jar/java/lang/annotation/RetentionPolicy.class)]]
[loading ZipFileIndexFileObject[C:\Program Files\Java\jdk1.7.0_45\lib\ct.sym(META-INF/sym/rt.jar/java/lang/annotation/Target.class)]]
[loading ZipFileIndexFileObject[C:\Program Files\Java\jdk1.7.0_45\lib\ct.sym(META-INF/sym/rt.jar/java/lang/annotation/ElementType.class)]]
[loading ZipFileIndexFileObject[C:\Program Files\Java\jdk1.7.0_45\lib\ct.sym(META-INF/sym/rt.jar/java/lang/annotation/Annotation.class)]]
[loading ZipFileIndexFileObject[C:\Program Files\Java\jdk1.7.0_45\lib\ct.sym(META-INF/sym/rt.jar/java/lang/Override.class)]]
[loading ZipFileIndexFileObject[C:\Program Files\Java\jdk1.7.0_45\lib\ct.sym(META-INF/sym/rt.jar/java/lang/Integer.class)]]
[loading ZipFileIndexFileObject[H:\Downloads\Software\ProgrammingTools\LangGrammer\ANTLR\Antrl4\4.3\Opt\antlr4-4.3-complete.jar(org/antlr/v4/runtime/atn/LexerATNSimulator.class)]]
[loading ZipFileIndexFileObject[H:\Downloads\Software\ProgrammingTools\LangGrammer\ANTLR\Antrl4\4.3\Opt\antlr4-4.3-complete.jar(org/antlr/v4/runtime/atn/ParserATNSimulator.class)]]
Round 1:
        input files: {AndThenWasBaseListener, AndThenWasBaseVisitor, AndThenWasLexer, AndThenWasListener, AndThenWasParser, AndThenWasVisitor}
        annotations: [java.lang.Override, org.antlr.v4.runtime.misc.NotNull, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersio
n, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVe
rsion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, Ru
leVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion
, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVer
sion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, Rul
eVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion,
 RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVers
ion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, Rule
Version, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion,
RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersi
on, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleV
ersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion, RuleVersion]
        last round: false

Antlr43opt>>



Thanks
Regards

Right_Then

Sam Harwell

unread,
Jul 23, 2014, 6:54:32 AM7/23/14
to antlr-di...@googlegroups.com
I don't see any error in that output. Can you point it out? 

Thanks, 
Sam


-------- Original message --------
From: 'Right_Then' via antlr-discussion
Date:07/23/2014 3:34 AM (GMT-06:00)
Subject: [antlr-discussion] Re: Code Too Large For Try Statement

--

Right_Then

unread,
Jul 23, 2014, 9:01:29 AM7/23/14
to antlr-di...@googlegroups.com
Mr. Sam

I apologize for the context sensitivity of my question. 
The error is in the fact that javac AndThenWas*.java does not do anything
It does not produce the required *.class files therefore i tried
javac AndThenWas*.java -verbose which produced the output that is 
given in the previous post. I myself don't know what it means. I thought you
would recognise the reason it fizzles out.

Thanks As always
Regards

Right_Then

Sam Harwell

unread,
Jul 23, 2014, 12:20:05 PM7/23/14
to antlr-di...@googlegroups.com

There was a bug in the way the particular antlr4-4.3-complete.jar file is getting created for the optimized fork. Some files were left out, resulting in the behavior you observed. I’m working on a 4.3.1 patch release to resolve this issue.

 

In the meantime, try using the following two files instead of just one file:

 

1.       antlr4-runtime-4.3-complete.jar

2.       antlr4-4.3.jar

 

Thanks,

Sam

 

From: antlr-di...@googlegroups.com [mailto:antlr-di...@googlegroups.com]
Sent: Wednesday, July 23, 2014 8:01 AM
To: antlr-di...@googlegroups.com
Subject: [antlr-discussion] Re: Code Too Large For Try Statement

 

Mr. Sam

--

Sam Harwell

unread,
Jul 23, 2014, 12:39:53 PM7/23/14
to antlr-di...@googlegroups.com

I just tested this and it turns out the two files you actually need are these:

 

1.       antlr4-4.3-complete.jar

2.       antlr4-runtime-4.3-complete.jar

 

The complete runtime jar contains the files missing from antlr4-4.3-complete.jar, but does not contain all of the tool’s dependencies.

 

Sam

Sam Harwell

unread,
Jul 23, 2014, 12:52:24 PM7/23/14
to antlr-di...@googlegroups.com

You can now get antlr4-4.3.1-complete.jar from the following location, and it will work by itself:

https://oss.sonatype.org/content/repositories/releases/com/tunnelvisionlabs/antlr4/4.3.1/

 

Thanks,

Sam

Right_Then

unread,
Jul 23, 2014, 2:00:20 PM7/23/14
to antlr-di...@googlegroups.com
Thanks Mr. Sam for all the trouble

I will check it.

Thanks
Regards

Right_Then
Reply all
Reply to author
Forward
0 new messages