Commit Graph

5389 Commits

Author SHA1 Message Date
runner 1b7fc4119d sign cla
sign cla
2016-11-05 19:58:22 +08:00
parrt 85f2a87840 rm recognizerName field where possible 2016-11-04 16:07:45 -07:00
parrt 95dbf7b44b look for go in path during tests 2016-11-04 16:06:41 -07:00
Peter Boyer f553056a2b Fix unused import error 2016-11-04 14:40:15 -04:00
Peter Boyer 8b67d2418c Move go target docs 2016-11-04 14:36:02 -04:00
Peter Boyer 0541f34a7e Merge with origin/master 2016-11-04 14:08:12 -04:00
Peter Boyer aa568711d9 Remove PortDebug 2016-11-04 13:55:39 -04:00
Wolfgang Johannes Kohnen d9c6ca4a35 Travix: Update to current stable Go version. 2016-11-04 17:09:58 +00:00
Sebastian Kürten 3e1c0282a2 Update contributors.txt
Add Sebastian Kürten
2016-11-01 14:38:55 +01:00
Sebastian Kürten f134ef930f Fix the expected error message in test 2016-11-01 13:02:14 +01:00
Sebastian Kürten 2f628a1106 Fix another typo 2016-11-01 11:56:46 +01:00
Sebastian Kürten 6a8a93286f Move a @since tag to start of a new line
Javadoc requires block tags to appear at the start of lines.
2016-11-01 11:46:16 +01:00
Sebastian Kürten 8b16ff180a Fix a few typos in Javadoc 2016-11-01 11:46:04 +01:00
Mike Lischke b9f81ab04e Merge pull request #45 from RYDB3RG/master
small rule attribute fixes
2016-11-01 10:45:13 +01:00
kai stammerjohann af624e1321 contributors.txt update 2016-11-01 09:48:57 +01:00
kai stammerjohann f3c55be33c fix RulePropertyRef_stopHeaderHeader typo 2016-11-01 09:17:46 +01:00
kai stammerjohann 1feef18e3e ParserRuleContext init members 2016-11-01 09:06:27 +01:00
Mike Lischke f794820aaf Reworked mutex handling + updated C++ template for a var init
- Mutexes have been consolidated. Instead of one per DFA (which can easily get to hundreds of them) we only have one mutex in the Recognizer class and all other parties use this for serialization. It's only about protected the DFA anyway, which is stored in a recognizer (lexer/parser).
- ATNState::getStateType() returns a size_t value now (actually an enum).
- Replaced checks via RTTI for transitions by the (serialization) type of the transition, for simplicity.
- Added some missing initialization for fields in certain ATN state classes.
- Fixed mem leak in DFA by shadowing the s0 field. That way still have a ref to the self created instance, even is s0 was replaced later.
- Added variable init in code generation for a rule context declaration (e.g. for labels).
2016-10-29 14:46:38 +02:00
Peter Boyer 48e1f060d7 Merge pull request #78 from pemcconnell/master
http:// not allowed in go import path
2016-10-27 19:42:11 -04:00
Peter McConnell 0463e14e55 http:// not allowed in go import path 2016-10-26 14:55:19 +01:00
Mike Lischke c9f85f1d6a Merge pull request #41 from FloorGoddijn/master
cpp runtime: updated the vs2013 project reflecting the last changes
2016-10-22 16:10:35 +02:00
Floor 951d0f06d7 cpp runtime: updated the vs2013 project reflecting the last changes 2016-10-21 13:07:15 +02:00
Peter Boyer adef6f690a Cleanup var statements (#73)
* Cleanup var statements

* Fix type decl
2016-10-17 12:57:26 -04:00
Peter Boyer 07f7dae78f Fix type decl 2016-10-17 12:04:05 -04:00
Peter Boyer 191b8f9d58 Cleanup var statements 2016-10-17 11:41:56 -04:00
Mike Lischke 9e77edcb34 ATNState::transactions improvements
The transaction field was access with trivial getters and setters which server no real purpose, so I made the vector public and remove all the obsolete accessor functions. This simplifies the API (e.g. use .size() instead of getNumberOfTransitions()).
This change required a few other changes in runtime.

Additionally, I radically cut down the ATN::toString method to return only what the Java runtime is doing instead of a full dump of the state and it's transitions.
2016-10-14 17:10:00 +02:00
Mike Lischke aabf4baf60 Added default c-tor to ParseTree + improved createInstance.
createInstance now use move semantics for its parameters.
2016-10-14 17:05:00 +02:00
Mike Lischke 014070de66 Converted smart pointer for the rule context in RecognitionException
Since we pass around raw pointer for volatile references now, we must not create smart pointers from them or we will get a double free.
2016-10-14 17:03:38 +02:00
Terence Parr 52523024e0 Merge pull request #1306 from parrt/master
Enhance JavaScript ParseTreeVisitor, add tests (other targets ignore this functionality)
2016-10-13 16:47:23 -07:00
parrt aabd148bf4 Merge branch 'cgudrian-dfs' 2016-10-13 16:44:04 -07:00
parrt 285c7fca6c resolve contribs conflict 2016-10-13 16:21:00 -07:00
Peter Boyer 2444386091 Remove JavaScript PORT_DEBUG, re-enable runtime tests for other language targets (#69)
* Re-enable runtime tests for other language targets

* Fix typo in js code

* Remove PORT_DEBUG statements

* Fix missing

* Fix testAltNum
2016-10-13 17:06:22 -04:00
Terence Parr 8d0ae8599e Merge pull request #1221 from ericvergnaud/javascript-consistency
Following #1218, ensure consistency of ATNConfigSet hashing strategy …
2016-10-13 14:05:36 -07:00
Terence Parr 6d59acce4c Merge pull request #1304 from nielsbasjes/EditorConfig
Add .editorconfig
2016-10-13 14:00:56 -07:00
Niels Basjes 0bf739fa73 Added Niels Basjes to the contributers list 2016-10-13 22:53:12 +02:00
parrt 4312b37828 pull test changes in 2016-10-13 10:58:19 -07:00
Terence Parr b889c49bbe Merge pull request #1305 from sharwell/line-endings
Add default .gitattributes
2016-10-13 10:49:04 -07:00
Sam Harwell 3f103dab1a Add default .gitattributes 2016-10-13 05:49:38 -05:00
Niels Basjes 5b8d262c8e Updated the editorconfig based on Sam's feedback. 2016-10-13 09:28:16 +02:00
Christian Gudrian 07f57564ec Update contributors.txt
Added cgudrian
2016-10-13 07:41:17 +02:00
Niels Basjes 57f2e0f006 Introduce EditorConfig for easier configuration of IDEs 2016-10-12 16:25:53 +02:00
Peter Boyer 5cbc1b0ba8 Merge pull request #67 from pboyer/upstreamMerge
Merge with upstream antlr/antlr4
2016-10-12 10:20:06 -04:00
Christian Gudrian 29c1a9f222 removed reference to local node installation 2016-10-12 15:56:40 +02:00
Peter Boyer 42347c078b Fix merge failure 2016-10-12 09:53:43 -04:00
Peter Boyer 60662c4b70 Fix remaining tests (#64)
* Fix pred context typo

* Adjust array lengths

* PositionAdjustLexer test fix first steps

* allow virtual method calls from Lexer

* Hopefully fix issues with dup namedActions

* Make parser members

* Fix testParserProperty

* Fix LeftRecursion test failures
2016-10-12 09:49:42 -04:00
Mike Lischke a4e343806f Some small optimizations.
- No copy of a DFA state during ATN deserialization.
- Fixed memory leak of locally created s0 state in DFAState.
2016-10-12 11:06:51 +02:00
Mike Lischke 4897bd8571 Simplified memory management for volatile parsing part.
There are 2 parts in an ANTLR genrated parser where memory is allocated: the actual parsing (with or w/o creating a parse tree) and the prediction part (via DFA/ATN etc.). The first part is highly volatile as it recreates parse tree instances (the class) on each parser run. In fact also lexer tokens belong to that part, but are already managed via unique pointers. This first part works without any smart pointer now. Instead there is a simple tracker class which holds all created references and frees them when the parser is reset or destroyed. This is a bit less optimal if the parser is set to create no parse tree, as created rule context objects are not freed immediately (like with smart pointers), but during reset. On the other hand this change gives (depending on the input) a nice speed up (0%-100%, after the warm up phase). Additionally memory consumption drops by a good amount.

Everything in the simulartors (and interpreters) remains unchanged. This is the shared prediction part.
2016-10-11 13:49:02 +02:00
Peter Boyer 145bfca692 Update lexer_action.go (#62) 2016-10-08 23:03:11 -04:00
Christian Gudrian 75dd652d7a fixed visitAtom implementation
This implementation somehow got lost in rebasing.
2016-10-07 20:37:38 +02:00
Christian Gudrian e5bab64e4b ignoring the visitors tests for Java, C# and Python
The template implementations for these languages is pending.
2016-10-06 22:53:25 +02:00