Commit Graph

2705 Commits

Author SHA1 Message Date
Sam Harwell 0968498f3e Merge pull request #593 from sharwell/fix-590
Fix support for element options on semantic predicates in LR rules
2014-06-01 22:36:34 -05:00
Sam Harwell e7a1d84197 Fix support for element options on semantic predicates in left recursive rules (fixes #590) 2014-06-01 22:33:43 -05:00
Sam Harwell be16c71e56 Merge pull request #583 from sharwell/atn-profiler
Atn profiler
2014-06-01 22:30:39 -05:00
Terence Parr 68b186e77d Add utility methods and track token indexes through the left recursive rule transformation to allow external tools to associate ATN states and transitions with original locations in the grammar source file 2014-06-01 22:30:33 -05:00
Sam Harwell 6245f1383d Merge pull request #592 from sharwell/rm-unnecessary-call
Remove unnecessary call to input.index()
2014-06-01 22:29:56 -05:00
Sam Harwell 1a56da626f Merge pull request #591 from sharwell/xpath-tests
Simplify common code in XPath tests
2014-06-01 22:29:38 -05:00
Terence Parr e570489d33 Simplify common code in XPath tests 2014-06-01 22:29:35 -05:00
Terence Parr d5aba146f0 Remove unnecessary call to input.index() 2014-06-01 22:28:57 -05:00
Terence Parr fb49d7c6a2 initial profiler 2014-06-01 22:15:12 -05:00
Terence Parr aa9bceaa7b Merge pull request #587 from sharwell/getoperands
Add the SemanticContext.Operator interface
2014-05-31 16:48:54 -07:00
Sam Harwell 31f3c2eb5b Add the SemanticContext.Operator base class to provide consistent API access to the operands of AND and OR contexts 2014-05-31 18:48:38 -05:00
Terence Parr 63fb71cc9f Merge pull request #586 from sharwell/getalts
Add utility method ATNConfigSet.getAlts
2014-05-31 16:48:29 -07:00
Terence Parr 43b04f02f6 Merge pull request #585 from sharwell/grammar-ast
Simplify the GrammarAST constructors
2014-05-31 16:48:20 -07:00
Terence Parr b80c10c56c Merge pull request #584 from sharwell/clear-dfa
Add ATNSimulator.clearDFA
2014-05-31 16:48:09 -07:00
Sam Harwell 27ce016d3d Add utility method ATNConfigSet.getAlts 2014-05-31 18:20:06 -05:00
Sam Harwell 46e1bad7b4 Simplify the GrammarAST constructors, and correct the token start/stop index not being set 2014-05-31 18:14:41 -05:00
Sam Harwell ab7319ab15 Add ATNSimulator.clearDFA, and implement for LexerATNSimulator and ParserATNSimulator 2014-05-31 18:11:38 -05:00
Terence Parr f3fcf5a712 Merge pull request #569 from parrt/runtime-tool-version-sync
add tool-template and generatedcode-runtime version compatibility check
2014-05-28 18:02:14 -07:00
Terence Parr 6500b26c14 get good message 2014-05-28 18:01:05 -07:00
Terence Parr 2d8ffee5e2 damn intellij/git always loses changes but just with antlr repo. DAMN! commiting last files manually 2014-05-28 17:56:43 -07:00
Terence Parr 9e77e28bc1 should not be a default version lest all targets pass by default. make sure java target and tool move in lockstep. Fixes #572 2014-05-28 17:55:32 -07:00
Terence Parr 0b8a70a2a4 tweaks per Sam's comment. define default version so targets don't fail to compile. 2014-05-28 11:26:44 -07:00
Terence Parr db0830e00d To get static checking I converted the version template to a method and also moved the compatibility check into the target so that in the worst-case target developers can override the compatibility check per their needs. I have also decided to throw an exception for the Java target when the code generation and runtime library versions are incompatible. Change the tool message per Sam's request. 2014-05-28 11:14:00 -07:00
Terence Parr 038fa850ed Merge pull request #575 from sharwell/fix-561
Qualify references to ATN class in generated code if it would alias a token
2014-05-24 14:48:35 -07:00
Sam Harwell 938a39c057 Qualify references to the ATN class to avoid symbol conflicts with tokens named ATN (fixes #561) 2014-05-24 16:49:38 -05:00
Sam Harwell e0937a6322 Add regression test for #561 (token named ATN breaks reference to ATN.INVALID_ALT_NUMBER) 2014-05-24 13:14:08 -05:00
Sam Harwell 4ae0161f1a Merge pull request #566 from parrt/args-as-templates
Args as templates
2014-05-24 12:36:30 -05:00
Terence Parr 813fefdbb7 Fixes #554 2014-05-24 12:13:31 -05:00
Terence Parr 4aec5aeac2 add basic code generation testing rig and 1st test. 2014-05-24 12:10:47 -05:00
ericvergnaud 77defbdc70 Git hygiene
Marked .DS_Store files as ignored
2014-05-21 00:19:35 +08:00
Terence Parr a3d4ba53a3 add tool-template and generatedcode-runtime version compatibility check. Target authors add a VERSION template and supply a RuntimeMetaData.checkVersion() method. 2014-05-19 17:25:01 -07:00
Terence Parr 3111db7a76 Merge pull request #548 from sharwell/invalid-names
Improve consistency of Grammar methods for names of rules and tokens
2014-04-13 16:50:51 -07:00
Sam Harwell 65b176a36d Return predefined values instead of null for Grammar methods getTokenNames, getTokenDisplayNames, and getRuleNames
Improve consistency of Grammar methods for names of rules and tokens
2014-04-13 18:46:28 -05:00
Sam Harwell 747fb0ba2e Merge pull request #541 from sharwell/release/4.2.2
Release/4.2.2
2014-04-06 21:20:55 -05:00
Sam Harwell 7e2bf4a2d5 [maven-release-plugin] prepare for next development iteration 2014-04-06 21:19:40 -05:00
Sam Harwell 736a5f5905 [maven-release-plugin] prepare release 4.2.2 2014-04-06 21:18:12 -05:00
Sam Harwell 9c6023b385 Merge pull request #540 from sharwell/fix-528
Updated documentation for ParserATNSimulator.getConflictingAlts
2014-04-06 16:51:21 -05:00
Sam Harwell faf011ce8a Updated documentation for ParserATNSimulator.getConflictingAlts (fixes #528) 2014-04-06 16:51:34 -05:00
Sam Harwell 857c40318f Merge pull request #539 from sharwell/quick-fix
Remove comment that was only meant for testing
2014-04-06 16:34:10 -05:00
Sam Harwell d209bd0ef0 Remove comment that was only meant for testing 2014-04-06 16:34:32 -05:00
Sam Harwell b175d7b223 Merge pull request #537 from sharwell/multiple-eof
Multiple EOF
2014-04-06 16:29:24 -05:00
Sam Harwell d9ec5c02fb Merge pull request #538 from sharwell/polish
Polish
2014-04-06 16:29:06 -05:00
Sam Harwell fb66202820 Improved documentation for Transition.isEpsilon 2014-04-06 16:27:09 -05:00
Sam Harwell f233f6eaae Fix build warning due to use of generics 2014-04-06 16:27:09 -05:00
Sam Harwell f9e9a6ab38 Fix handling of multiple EOF symbols in parser rules 2014-04-06 16:25:14 -05:00
Sam Harwell 88c7d09c24 Add unit tests for grammars with multiple EOF transitions 2014-04-06 16:23:57 -05:00
Terence Parr 14f446f3f8 Update the comment to reflect the new method I put it on. 2014-04-02 09:56:19 -07:00
Terence Parr da9186ed63 Merge pull request #134 from parrt/eval-preds-when-delaying-errors
When delaying error reporting because prediction escapes the decision en...
2014-04-02 09:41:09 -07:00
Terence Parr 8f000d273d If there is no syntactically and semantically valid alternative that reaches the end of the decision entry rule upon no viable alt, choose the first alternative that is syntactically valid but semantically invalid. Refactor into separate method for clarity. 2014-04-02 09:38:26 -07:00
Terence Parr 9652d0059c add Sam's comment. 2014-04-02 08:26:38 -07:00