Commit Graph

1973 Commits

Author SHA1 Message Date
parrt 0799e838bb weird. missed a few files. these are to simplify get filename functionality. 2016-11-05 09:32:04 -07:00
parrt abdb0b6a46 Merge branch 'model-updates-for-new-targets' of github.com:parrt/antlr4 into reduce-model-changes 2016-11-05 09:29:25 -07:00
parrt 2c98b5d325 incorporate in a single commit all changes needed to support generating header files. many fewer diffs with C++ target codegen now. 2016-11-05 09:25:51 -07:00
parrt 6d022379bc Pull in parrt's branch 'model-updates-for-new-targets' which appears to have freshened some non Go stuff as well. Simplify Go filename construction. 2016-11-05 08:48:37 -07:00
parrt 40e19e5d37 refactor so getRecognizerFileName() etc... delegate to Target; default is same behavior. adds "is header" arg as well in prep for C++ 2016-11-05 08:08:08 -07:00
parrt 75794a588b track different types of StructDecl elements so Go can do setters/getters. 2016-11-05 07:35:57 -07:00
parrt c0cedc424b track different types of StructDecl elements so Go can do setters/getters. 2016-11-05 07:35:39 -07:00
parrt 8b8094c044 appears to be an ST bug that doesn't see arrays of len 0 as missing; convert array to List. 2016-11-05 06:55:09 -07:00
parrt e0521400cb rm need for isRuleContext in templates; refer to underlying grammar object. 2016-11-05 06:28:58 -07: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 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
parrt 4312b37828 pull test changes in 2016-10-13 10:58:19 -07: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
Christian Gudrian cb590334bb the visit methods now return a value 2016-10-06 22:52:19 +02:00
Christian Gudrian eb292adb18 implemented templates for the JavaScript visitors 2016-10-06 22:52:19 +02:00
Peter Boyer 9b76bc6a71 Update Go.stg 2016-10-05 12:04:01 -04:00
Terence Parr e9aa00e05b Merge pull request #1172 from renatahodovan/default-pass
Add missing default pass statements to Python targets.
2016-09-25 11:24:48 -07:00
Christian Gudrian 46df58d5d7 The JavaScript ParseTreeVisitor now implements a depth-first traversal by default. 2016-09-22 08:28:11 +02:00
Will Faught 7f42bc602b Add interface build checks for tree types and generated base listeners 2016-07-18 12:19:31 -07:00
Will Faught a05dea54ec Fix test case build errors 2016-07-06 09:02:42 -07:00
Eric Vergnaud 15430d4bf9 remove unwanted semicolon in generated Python code 2016-06-23 15:06:49 +02:00
Peter Boyer c8a9d75cfe Merge pull request #21 from wjkohnen/gofmt
tool/Go: gofmt generated code.
2016-06-14 16:26:36 -04:00
Will Faught 81b464a375 fixup! Fix the layout of some generated Go code 2016-06-10 22:39:36 -07:00
Will Faught c3d6c20ee4 Fix the layout of some generated Go code
And some related fixes.

- Combined multiple blank lines between package decls into one
- Moved some doc comments to just above what they document
- Changed some doc comments to start with the documented thing's name
- Removed some redundant anchor and wrap ST options
- Changed an empty struct type containing just a newline to struct{}
- Added some missing doc comments to exported interface methods
- Removed unneeded parentheses around a single import
- Prevents generating empty const blocks
- Generates single-line package const decls if only one decl
- Indented switch case bodies
- Content checks for some template vars, e.g. if v defined then v else nothing
- Removed template redundancies, e.g. from <attrs:{a | <a>}> to <attrs>.
- Removed blank lines that group embedded types and fields separately
- Changed some trivial one-line func/method decls to mult-line
- Changed empty package slice decls to use nil, e.g. var foo []uint16
- Changed const int enums that used the ST <i> var to use iota instead
- Replaced separator in GoTarget.encodeIntAsCharEscape with a template separator
2016-06-10 14:18:02 -07:00
Wolfgang Johannes Kohnen bc5d6e9c4d tool/Go: gofmt generated code.
* gofmt can be disabled with property -Dantlr.go.disable-gofmt=true or
   setting env ANTLR_GO_DISABLE_GOFMT=true
2016-06-08 17:36:04 +00:00
Peter Boyer 6d881c395d Merge pull request #23 from willfaught/fmt
Fix whitespace in generated Go code
2016-06-05 17:49:34 -04:00
Peter Boyer 1bf006bd91 Merge pull request #22 from wjkohnen/predef-idents
tool/Go: Add predefined identifiers to list of keywords.
2016-06-05 14:51:43 -04:00
Will Faught 94ded73cba Change multi-line template signatures into one line 2016-06-04 21:54:59 -07:00
Will Faught a94377d2a5 Add space after commas separating two vars 2016-06-04 21:52:36 -07:00
Will Faught 06e4bb1cd1 Add spaces around template var binder "|" 2016-06-04 21:50:12 -07:00
Will Faught 6a89c4529e Remove line-ending semicolons 2016-06-04 21:47:48 -07:00
Will Faught fc275721b8 Add spaces around == and != 2016-06-04 21:47:14 -07:00
Will Faught d4d46b2930 Combine multiple spaces around ::= into one 2016-06-04 21:44:07 -07:00
Will Faught 4cdc421ce7 Replace 4 spaces with a tab 2016-06-04 21:40:56 -07:00
Wolfgang Johannes Kohnen 696820e2ea tool/Go: Add predefined identifiers to list of keywords. 2016-06-04 13:13:02 +00:00
Wolfgang Johannes Kohnen 4f8951e5ef tool/Go: enable -package option
see antlr/antlr4/issues/1204, pboyer/antlr4/issues/13
2016-06-03 12:20:39 +00:00
Will Faught 52028c52ce Prevent generated file header from being package doc 2016-05-31 19:09:50 -07:00
Will Faught 6515a84d63 Change generated file header to full sentence 2016-05-31 19:09:40 -07:00
Will Faught 9562d87d49 Change willfaught/antlr4 to pboyer/antlr4 2016-05-26 23:43:43 -07:00
Will Faught 8d863ea19c Change antlr/antlr4 to willfaught/antlr4 2016-05-26 23:38:51 -07:00
Will Faught b503116e12 Move runtime/Go/src/antlr to runtime/Go/antlr 2016-05-26 11:51:28 -07:00
Peter Boyer 31d21ff4db Update templates 2016-05-25 17:20:38 -04:00
Renata Hodovan 7562bb3b45 Add missing default pass statements to Python targets.
The default pass statements were missing from the LL1AltBlock's
template in case of Python targets, which generated conditional statements
without body in some cases and ended in syntax error. The patch fixes this.
2016-04-13 21:21:07 +02:00
parrt b92f22769e [maven-release-plugin] prepare for next development iteration 2016-03-30 16:25:49 -07:00
parrt 567fcc6311 [maven-release-plugin] prepare release antlr4-master-4.5.3 2016-03-30 16:25:45 -07:00
parrt cd0913712a set code string versions to 4.5.3 2016-03-30 16:21:50 -07:00
parrt b78e0e9c1e add test and a guard in action translator. minor. Relates to https://github.com/antlr/antlr4/issues/1143 2016-03-30 11:17:57 -07:00
parrt 9e98714a1d Add ability to set parse tree internal node super class with option contextSuperClass. Provide impl in Java target that has altNum backing field. Add test across targets to set/get alt num. Fixes #1152. 2016-03-30 11:00:47 -07:00