Commit Graph

2882 Commits

Author SHA1 Message Date
ericvergnaud b8a91b9e3f Preliminary changes for Python 2014-06-06 03:13:09 +08:00
Terence Parr bc566605b1 Leave just one version spec in tool. Not looking externally anymore. 2014-06-04 17:23:47 -07:00
Terence Parr ac63649b2a Merge pull request #602 from parrt/accurate-ctx-sensitive-check
track context-sensitive phrases in ambiguity reporting.
2014-06-03 22:04:23 -07:00
Terence Parr cc36281ce2 new definition of context sensitivity required change in test code. Updated profiler per Sam's comments. 2014-06-03 22:04:02 -07:00
Terence Parr eeac7bc1c8 Merge branch 'master' into accurate-ctx-sensitive-check 2014-06-03 21:51:56 -07:00
Terence Parr 40294f2270 go to 4.3 not 4.2.3 2014-06-03 21:48:03 -07:00
Terence Parr 015b9c900e Merge branch 'master' into accurate-ctx-sensitive-check 2014-06-03 21:40:07 -07:00
Terence Parr 8d17f43f57 Merge pull request #601 from sharwell/versioning-docs
Versioning updates and documentation
2014-06-03 21:39:11 -07:00
Sam Harwell b8be9aadd1 * Alter the default version mismatch behavior to throw an exception instead of write a message to System.err
* Ensure that DefaultListener is always the last listener notified (since it throws an exception)
* Update the checkVersion documentation to more clearly describe the scenarios for which version mismatches are detected
2014-06-03 22:10:55 -05:00
Terence Parr feb86e8d9b track context-sensitive phrases in ambiguity reporting. 2014-06-03 19:20:16 -07:00
Sam Harwell 80125d661e * Redefine checkVersion as version mismatch detection instead of a compatibility check
* Update notification behavior to notify callback listeners instead of throwing an exception
* Remove the distinction between regular and "extended" semantics
2014-06-03 18:31:52 -05:00
Terence Parr f37347277f Merge pull request #570 from parrt/codegen-tests
Templates LL1PlusBlock and LL1StarBlock were not used. removed. added te...
2014-06-03 07:21:28 -07:00
Sam Harwell 95596b4a52 Update ParserFactory.getLL1EBNFBlock to ensure it is correct even if additional ATN optimizations are implemented 2014-06-03 07:33:03 -05:00
Terence Parr 31a3b59576 Templates LL1PlusBlock and LL1StarBlock were not used. removed. added test for LL1OptionalBlock. 2014-06-03 07:33:00 -05:00
Terence Parr 4e84fa2824 tweak to comment 2014-06-02 21:30:12 -07:00
Terence Parr a87d3acedd Merge pull request #597 from parrt/track-all-preds
Track all preds
2014-06-02 21:21:36 -07:00
Sam Harwell e4e1cb1845 Updated the documentation and improved the flexibility for future use of RuntimeMetaData.checkVersion 2014-06-02 23:06:58 -05:00
Sam Harwell 2a25ec2fa4 Use tabs, add missing license header 2014-06-02 22:24:05 -05:00
Sam Harwell 5e93d5f7b7 Avoid creating PredicateEvalInfo events for precedence predicates 2014-06-02 20:59:31 -05:00
Sam Harwell 244c8ee0c7 Updated documentation 2014-06-02 20:59:11 -05:00
Terence Parr 59bc9faf45 Merge pull request #600 from parrt/reportAttemptingFullContext-bugfix
reportAttemptingFullContext didn't get conflicting alts unless decision ...
2014-06-02 18:40:19 -07:00
Terence Parr 3bab338ba4 change comment to be accurate with code. 2014-06-02 18:39:45 -07:00
Sam Harwell 8e6820ac60 Tweaks 2014-06-02 20:22:42 -05:00
Terence Parr 982b70fbfd reportAttemptingFullContext didn't get conflicting alts unless decision had predicates. 2014-06-02 18:02:17 -07:00
Terence Parr dba3aaf740 track all predicates, make new method that is called for all preds. 2014-06-02 19:50:39 -05:00
Sam Harwell 52fbc5edc9 Merge pull request #596 from parrt/fix-node-indexes
Fix node indexes
2014-06-02 13:45:40 -05:00
Terence Parr 742429a15d make sure that previous tree node's start/stop token indexes are correct after left-recur elim. 2014-06-02 13:45:10 -05:00
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