Commit Graph

1239 Commits

Author SHA1 Message Date
Sam Harwell a972a4dc24 Add error 148: left recursive rule 'a' contains a left recursive alternative which can be followed by the empty string 2013-01-16 13:23:20 -06:00
Sam Harwell 9ccdca49bb Add error 147: left recursive rule 'a' must contain an alternative which is not left recursive; fixes antlr/antlr4#140 2013-01-16 12:38:55 -06:00
Sam Harwell 8e32d7b695 Clean up imports 2013-01-16 12:37:39 -06:00
Sam Harwell 425df2c595 Ensure the token stream is always properly set for Grammar, GrammarRootAST, and LeftRecursiveRuleAnalyzer 2013-01-16 12:37:10 -06:00
Sam Harwell 5d489ccbbe Update documentation 2013-01-15 09:18:07 -06:00
Sam Harwell 0a6d1bff7e Fix invalid escape sequences generated for literals containing backslashes 2013-01-15 09:17:56 -06:00
Sam Harwell 98c29943e5 Make TokenVocabParser fields `protected final` 2013-01-15 08:54:39 -06:00
Sam Harwell 758e2422f5 Updated error message, updated TestAttributeChecks 2013-01-15 08:54:07 -06:00
Sam Harwell df7fb3de2f Call grammarError instead of toolError to provide proper error location 2013-01-15 08:53:39 -06:00
Sam Harwell 48c1a8d433 Forgot to update GrammarTreeVisitor to support modes with no rules 2013-01-14 18:43:23 -06:00
Sam Harwell 3521a00dbb Add error 146: non-fragment lexer rule can match the empty string 2013-01-14 18:03:21 -06:00
Sam Harwell 9edec91022 Add error 145: lexer mode must contain at least one non-fragment rule 2013-01-14 18:03:13 -06:00
Sam Harwell c1f831aed1 Parser allows empty options{} block, empty element options, modes with no rules, and empty lexer alternatives 2013-01-14 18:03:09 -06:00
Sam Harwell 9f82e11431 Remove unused field 2013-01-14 18:03:08 -06:00
Sam Harwell c51bdc2fc9 Add missing listener interface methods to GrammarTreeVisitor 2013-01-14 18:03:07 -06:00
Sam Harwell 7ae67de110 Reduce size of _serializedATN by adding 2 to each element: new representation avoids embedded values 0 and 0xFFFF which are common and have multi-byte representations in Java's modified UTF-8 2013-01-11 13:34:08 -06:00
Sam Harwell b5650404e0 Error message cleanup 2013-01-11 12:47:47 -06:00
Sam Harwell ed9f52702e Use separate error messages for multi-character literals (always illegal) and rule references (not yet supported) in lexer sets 2013-01-11 12:46:42 -06:00
Sam Harwell 538f66a194 Documentation and cleanup in AttributeDict 2013-01-11 11:49:51 -06:00
Sam Harwell 40a40e0fee Add detailed errors for the various types of conflicts between names of rules, tokens, parameters, return values, locals, and labels 2013-01-11 11:45:24 -06:00
Sam Harwell 47dcd4881c Report conflicting argument error at specific location in input 2013-01-11 10:17:07 -06:00
Sam Harwell 0496cff256 Add field Attribute.token to hold a pseudo-token with specific location information for the attribute; track this position in ScopeParser 2013-01-11 09:49:38 -06:00
Sam Harwell 260115fa23 The ARG_ACTION token for a rule's locals is always an ActionAST 2013-01-11 09:46:33 -06:00
Sam Harwell 6b3d102ba1 Also check rule list labels 2013-01-10 14:57:51 -06:00
Sam Harwell 899d15aa5a Handle null scope 2013-01-10 14:49:04 -06:00
Sam Harwell 19f861ee81 Added error message 135: cannot assign a value to list label: $label 2013-01-10 14:48:59 -06:00
Sam Harwell f59a08c172 Maven build: reference jUnit 4.10, ANTLR 3.5 final, ST 4.0.7 final 2013-01-05 06:08:12 -06:00
Sam Harwell fb865cec3b Maven builds: if mvn is not run with -Psonatype-oss-release, then 1) javadocs are not generated, 2) source jar is not generated, 3) artifacts are not signed, 4) shaded (complete) jar is not generated. Development cycle install ~4:1 faster, clean+install ~2:1 faster 2013-01-05 05:40:11 -06:00
Sam Harwell 98d2ba8fb5 Correct link to GitHub issue for unit test documentation 2013-01-03 02:46:58 -06:00
Sam Harwell 51437b7eed Fix handling of rule stop states in full context mode 2013-01-02 13:45:59 -06:00
Sam Harwell fbfa61c3dd Remove tree parser reference 2013-01-02 12:48:58 -06:00
Sam Harwell 922fe53bdd Ignore testStartRuleWithoutEOF until we decide on the desired behavior 2013-01-02 09:06:00 -06:00
Sam Harwell 4040dc0d6d After consuming EOF, only configurations in a RuleStopState are viable 2013-01-02 09:03:14 -06:00
Sam Harwell 61b872377c Add timeout to unit test due to highlight non-termination of prediction algorithm without resorting to @Ignore 2013-01-02 08:33:54 -06:00
Sam Harwell e3383ecb61 Add unit test for start rule without EOF 2013-01-02 08:30:05 -06:00
Sam Harwell 274d566be6 TestPerformance.DEBUG_TEMPLATES should default to false 2013-01-02 06:50:05 -06:00
Sam Harwell c462547ff3 Support the -XdbgST and -XdbgSTWait options in TestPerformance 2013-01-02 06:41:19 -06:00
Sam Harwell 26d267ca38 Add the -XdbgSTWait command line option to block the tool execution until the STViz inspection dialog is closed 2013-01-02 06:41:18 -06:00
Sam Harwell b6a824ddd5 No need to override method - bug was fixed in V3 runtime 2013-01-02 06:40:49 -06:00
Terence Parr bd46ac1c3f I altered Target.getTargetStringLiteralFromANTLRStringLiteral() so that it converts \uXXXX in an ANTLR string to \uXXXX, thus, avoiding Java's conversion to a single character before compilation. Fixes antlr/antlr#111 2012-12-31 15:06:34 -08:00
Sam Harwell 7811ad9e49 Also copy command line options to lexer in combined grammars 2012-12-25 08:06:56 -06:00
Terence Parr c93970207e gen grammar name and antlr version into gen'd files 2012-12-24 13:35:25 -08:00
Terence Parr f43166bb45 pull version from manifest file or use 4.x. 2012-12-24 13:25:28 -08:00
Sam Harwell 73e2a31d36 Call visitChildren by default 2012-12-24 14:04:32 -06:00
Terence Parr 36c3b2341c add unit test for case when SLL needs to see EOF 2012-12-23 15:31:35 -08:00
Terence Parr dc3279cf23 assertNotEquals wasn't found (I upgraded to junit 4.10 too). weird. 2012-12-20 16:33:26 -08:00
Sam Harwell 068075f1c4 Fix usage of BufferedTokenStream: cannot consume EOF 2012-12-17 22:09:50 -06:00
Sam Harwell 9ec75650e3 Optimize ATNState.getStateType 2012-12-17 13:20:47 -06:00
Sam Harwell 116c58bec6 Show all warnings and errors for V3 compatibility issues so the user has a list of all the items to fix 2012-12-16 17:18:51 -06:00
Sam Harwell 9865d03347 Tweak comments and messages in ErrorType 2012-12-16 17:18:17 -06:00