Commit Graph

1931 Commits

Author SHA1 Message Date
parrt 79dae1e6f6 [maven-release-plugin] prepare release 4.5.1 2015-07-15 14:45:45 -07:00
Terence Parr b555099842 Merge pull request #955 from parrt/move-swing-dependency
move swing related stuff out of runtime package into org.antlr.v4.gui
2015-07-14 17:27:51 -07:00
Terence Parr b395127e73 move swing related stuff out of runtime package into org.antlr.v4.gui 2015-07-14 14:29:41 -07:00
Eric Vergnaud d1eb13cddc Fix antlr4-javascript #36.
Octal is not supported in strict mode.
2015-07-05 13:19:50 +08:00
David Sisson 7ead71d143 Enough template definitions to be dangerous (near complete). 2015-07-03 14:59:22 -07:00
David Sisson 8bb5bf0dcd Now 46% complete. 2015-07-03 14:46:38 -07:00
David Sisson dee6f88e44 A third of the templates now look like C++ (but may not match the final runtime). 2015-07-03 14:39:29 -07:00
David Sisson 083f924e25 Working on the templates 2015-07-03 09:43:48 -07:00
David Sisson fa0463fc31 Removed handled TODO. 2015-06-30 21:37:36 -07:00
David Sisson 0d1b4bffd1 Now has support for all 6 header possible header files. 2015-06-30 21:32:05 -07:00
David Sisson fccf0b4036 Now outputs headers a bit as well as code. 2015-06-30 17:17:34 -07:00
Jason van Zyl a142a5bc62 Create shaded tool JAR
Which contains:
 - Antlr runtime classes
 - String template classes
 - Tree layout classes
2015-06-30 12:07:36 -04:00
parrt b05e3ccdb8 messing with poms to get test generation in there. it doesn't seem to compiled and properly though. mvn compile works but mvn install doesn't finished compiling generated tests. 2015-06-29 18:09:38 -07:00
Sam Harwell 157749e825 Generate tests during the build
This commit enables the runtime test generator during the Maven build,
process which means the Java runtime receives the same comprehensive
testing during a Maven build as it does during a build with bild.py.
2015-06-29 18:09:38 -07:00
Terence Parr f4709f2973 tweak pom to give version of maven-jar-plugin so it doesn't fail. success reported for "maven test" but no tests run. ;) 2015-06-29 18:09:37 -07:00
parrt b3133abb21 gitignore was dropping all my target generators. ugh. 2015-06-29 18:09:37 -07:00
parrt da818c0c5c got javascript/node tests passing; folded in all js targets 2015-06-29 18:09:36 -07:00
parrt 8e89af918f all Python2 runtime tests pass 2015-06-29 18:09:35 -07:00
parrt d1f95085fe all Python3 runtime tests pass. Using same "get resource" mechanism to find runtime python code as I did for C#. 2015-06-29 18:09:35 -07:00
parrt e8c4bc4b09 Manual copy/add-to-git from antlr4-csharp repo (w/o history) to show how C# target should get injected into main antlr4 repo. Pieces go into tool for code gen, runtime-testsuite, and of course the runtime module. 2015-06-29 18:09:34 -07:00
parrt 6d892c71b5 mv JavaTarget to new target package 2015-06-29 18:09:33 -07:00
parrt fdcfe5482f mv tool tests into their own top level directory; mv test template support .stg into the runtime-testsuite area 2015-06-29 18:09:32 -07:00
David Sisson 363b640949 Now actually generates some Java-ish looking code with the following command:
LOCATION=~/GitHub/antlr4cpp/antlr4/dist/antlr-4.1.1-dev-complete.jar
java -classpath $LOCATION -jar $LOCATION -Dlanguage=Cpp T.g4
2015-06-28 12:34:47 -07:00
David Sisson 095fe36b66 Updated list of reserved keywords in C++. 2015-06-27 10:09:01 -07:00
David Sisson 0989a7d242 Added initial CppTarget so we can start trying to generate data. Does not yet have support for C++ header files (or really anything). Expect Java-like code. 2015-06-27 09:38:55 -07:00
parrt 9170f57aff tweak TestGenerator so it sorts test names so order is always same in TestX.java files. 2015-06-24 16:36:40 -07:00
Jason van Zyl 46202d98a2 Integrating tests for all supported targets
- A profile "rts" has been created which runs the integration tests. By default the the project containing the runtimes tests will not run so that users casually checking out and building the project do not have to install the tools required to test all the supported Antlr targets.

- The base test classes that are required for running the integration tests are downloaded from the other Antlr repos, dynamically added to the compile classpath and used by the currently checked in integration tests

To run the the full build with all the integration tests use the following:

mvn clean install -Prts
2015-06-24 13:45:40 -04:00
Terence Parr 6439b40d09 Merge pull request #928 from antlr/delete-legacy-tests
delete legacy test generator and generated tests
2015-06-23 10:21:45 -07:00
parrt a95666e710 add/update warning comment 2015-06-22 13:07:49 -07:00
Terence Parr 5c52288845 use template name that indicates what we're testing here. AssertIsList(v). 2015-06-22 11:03:22 -07:00
Terence Parr 162c6138a5 rm unused template 2015-06-20 12:21:51 -07:00
Terence Parr 82d0cbc3f6 add missing template 2015-06-20 11:59:44 -07:00
ericvergnaud 06730fcc6c delete legacy test generator and generated tests 2015-06-21 01:11:11 +08:00
Terence Parr 0f1516b798 Add missing copyright notices. Improve comments. Construct new temporary parsers of the same class as the original parser. a rename. 2015-06-19 13:41:31 -07:00
Sam Harwell 560b2b428e Remove the three remaining .iml files 2015-06-19 14:59:39 -05:00
Terence Parr 4115a0ad47 Merge pull request #913 from sharwell/fix-909
Move TestPerformance.testExpressionGrammar to the runtime test suite
2015-06-19 12:11:12 -07:00
Jason van Zyl 8beec18283 Add Maven build
Account for the following:
- deploying snapshots to OSSRH
- releasing to Maven Central
- Shaded JAR including the treelayout dependency
- OSGi manifest
- remove Eclipse IDE metadata for clean import
- remove IDEA IDE metadata for clean import
2015-06-19 11:13:24 -07:00
Terence Parr 2267559550 yet more ide .xml changes 2015-06-19 11:10:42 -07:00
parrt a9ca2efae5 add tests, refactor get-all-parse-tree stuff. add Trees support routines. 2015-06-18 17:25:51 -07:00
Terence Parr 1c19c70307 convert map to int[][] 2015-06-18 10:00:32 -07:00
parrt 11726e072e update the comments. 2015-06-17 18:30:29 -07:00
parrt 94bef386cb add new interpreter that knows how to track alternatives in rule nodes; some cleanup and improvement to other interpreter 2015-06-17 18:06:22 -07:00
Sam Harwell 3c9aabfb80 Move TestPerformance.testExpressionGrammar to the runtime test suite
Fixes #909
2015-06-16 20:23:44 -05:00
parrt ad0239fb32 got all tests passing for js and changed order of test gen templates 2015-06-16 16:16:16 -07:00
parrt 3ddb25919d got all but 2 tests passing for py2! 2015-06-16 14:52:08 -07:00
parrt fcc15905cc got all but 4 tests passing for py3! 2015-06-16 13:33:58 -07:00
Terence Parr e3dded6ffc Merge pull request #893 from sharwell/test-generation
Completed test generation review
2015-06-16 09:59:24 -07:00
parrt 94bb7c0af3 Fixes #897. An empty rule matched at the start got an improper interval. updated documentation for getSourceInterval(), added unit tests. fixed logic for special cases. 2015-06-11 12:39:21 -07:00
parrt 9e5cda85ed Fixes #896. EOF was not counted in source interval. 2015-06-11 10:56:59 -07:00
parrt 2da28ee5b2 add test showing EOF leaf not in source interval of tree 2015-06-11 10:37:36 -07:00
Terence Parr 8cf7082e89 add legacy bild 2015-06-07 11:43:39 -07:00
Sam Harwell 6865fd6869 Remove files which were unintentionally duplicated in commit 0c7df237 2015-06-06 18:26:17 -05:00
Sam Harwell 4455d526fe Merge branch 'test-generation' into master 2015-06-06 18:15:53 -05:00
Sam Harwell 364d984437 Verify behavior of CompositeGrammars tests, and correct discrepancies 2015-06-06 16:21:19 -05:00
Sam Harwell 2f99ca7453 Add the ability to ignore tests on a per-target basis 2015-06-06 14:30:54 -05:00
Sam Harwell 80a881e132 Disable tests which rely on carriage returns in the input
For some reason, the test generator is not currently able to create string
literals containing these characters, so the tests will fail.
2015-06-06 14:30:17 -05:00
parrt dc445af663 Improve ParserInterpreter code simplicity 2015-06-05 16:14:20 -07:00
ericvergnaud 2e06ed8360 test added to check a user issue 2015-06-04 22:57:58 +08:00
parrt 6e3484a286 add old stuff back in. 2015-06-03 10:11:33 -07:00
parrt fec97f2938 tweaks 2015-06-03 09:58:22 -07:00
Terence Parr 6333674588 bild.py works to build c# now. 2015-06-02 20:06:35 -07:00
Terence Parr 29db15736d regen_test in bild.py works now 2015-06-02 17:24:06 -07:00
parrt 1323e30fa9 moving around templates, deleting old stuff. C# and Java runtime tests work using branch intermediate-test-generation of C#. bild doesn't quite test stuff correctly. 2015-06-02 16:00:45 -07:00
parrt 0c7df237db remove old java runtime test framework; reorg dirs. bild.py test_java appears to work. 2015-06-02 11:50:08 -07:00
parrt fafc7722c8 got bild to gen java tests (others commented out) and run those tests. rm'd .stg map in Index.stg. 2015-06-02 11:40:19 -07:00
Terence Parr e3325ab606 add cmd-line interface, add map in Index.stg to targets-specific templates. 2015-06-01 18:18:44 -07:00
parrt b15e66985e add main to test gen. 2015-06-01 14:40:22 -07:00
Sam Harwell 23cdb2ee8f Merge branch 'test-generation' into parrt_master 2015-06-01 14:45:54 -05:00
parrt d73e73a091 update comments, rename var. 2015-05-29 14:10:08 -07:00
Terence Parr 3e5fc6972a Fixes #773. rule[arg] in non-lr rule alt didnt translate right 2015-05-22 16:49:31 -07:00
Sam Harwell e248be48d1 Restore missing test testAlternateQuotes 2015-05-22 15:39:35 -05:00
Sam Harwell 131599af1a Fix incorrect interpretation of test ListLabelForClosureContext 2015-05-22 15:39:08 -05:00
Sam Harwell 3fe8bf3a10 Updated maven-surefire-plugin version 2015-05-22 15:32:57 -05:00
Sam Harwell c70c1baccf Disable annotation processors during testing for performance 2015-05-22 15:32:57 -05:00
Sam Harwell 8dce2d5fb5 TestCompositeParsers for Java is working 2015-05-22 15:32:56 -05:00
Sam Harwell 99dcf93206 TestFullContextParsing for Java is working 2015-05-22 15:32:54 -05:00
Sam Harwell 4fa9ed5a6b TestParserExec for Java is working 2015-05-22 15:32:54 -05:00
Sam Harwell c9c32c2c4f TestLeftRecursion for Java is working 2015-05-22 15:32:53 -05:00
Sam Harwell 6890d0bfdd TestLexerErrors for Java is working 2015-05-22 15:32:52 -05:00
Sam Harwell 9ce5efc570 TestListeners for Java is working 2015-05-22 15:32:51 -05:00
Sam Harwell 113b72da53 TestParserErrors for Java is working 2015-05-22 15:32:50 -05:00
Sam Harwell c11b384b1d TestSemPredEvalLexer for Java is working 2015-05-22 15:32:49 -05:00
Sam Harwell 98bb519f8a TestSemPredEvalParser for Java is working 2015-05-22 15:32:49 -05:00
Sam Harwell 42ba8c4530 TestLexerExec for Java is working 2015-05-22 15:32:48 -05:00
Sam Harwell 4ec94e0fae TestParseTrees for Java is working 2015-05-22 15:32:47 -05:00
Sam Harwell 039bd22b67 TestCompositeLexers for Java is working 2015-05-22 15:32:46 -05:00
Sam Harwell 90763e5ae2 Rewrite test generator as a Maven plugin that generates tests as part of the build
This commit only updates the "TestSets" collection of tests to use the new framework.
2015-05-22 15:32:06 -05:00
Terence Parr 8f2eca5ae1 added playground stuff 2015-05-22 12:03:28 -07:00
Terence Parr 4f0afdcf8e set error number so it does not conflict with Sam's fork. 2015-05-22 11:09:54 -07:00
Terence Parr 2ad9ff6b9d Fixes #823. Report unknown rule error in proper file. 2015-05-19 17:27:04 -07:00
Terence Parr b5907498de Fixes #822, Fixes #855. We didn't check for left-recursive rules that didn't follow pattern that would lead to error. added unit tests. Passes all tests. 2015-05-19 14:44:05 -07:00
Josh Chase 108f0557fa Add goto to reserved words for java. 2015-05-12 12:31:00 -07:00
Terence Parr db8de6214e IDE missed some changed files 2015-02-14 16:44:35 -08:00
Terence Parr 5e70f94628 Somehow I missed a bunch of imports for @NotNull. Fixes #815. 2015-02-14 16:29:37 -08:00
Terence Parr d4a43684be squash all commits for this branch 2015-02-14 13:51:31 -08:00
Terence Parr 822d61ad47 Fixes #809. 2015-01-31 14:36:46 -08:00
Terence Parr 4cc275ab52 I did not have project URL in pom and the maven deploy failed again. 2015-01-23 15:33:01 -08:00
Terence Parr 3a4d53adea had license to the pom files and make sure that they use the jar packaging. 2015-01-23 14:39:36 -08:00
Terence Parr 4dcc65d452 make all 4.5 2015-01-22 17:08:19 -08:00
Terence Parr 65e4dc47e1 fix unit tests for recent bug fix so that they work with JavaScript. 2015-01-22 17:00:07 -08:00
Terence Parr be03964df3 rm @NotNull and @Nullable from codebase to simplify 2015-01-22 14:34:51 -08:00
Terence Parr 7e21ec761e freshen unit tests 2015-01-22 11:44:01 -08:00
Terence Parr 017fbc8ef7 Make new unit tests compatible with all targets; refactor Generator to take cmd-line arg or current dir. rename some methods. add some output. 2015-01-21 17:12:24 -08:00
Terence Parr e2dc5e5d2e set Generator so that it builds with the current working directory as the main root antlr4 dir like bild.py does. 2015-01-21 10:59:31 -08:00
Terence Parr 41713e1869 revert to 353235c 2015-01-21 10:15:47 -08:00
Terence Parr 136e8a6286 tweak 2015-01-20 17:16:07 -08:00
Terence Parr bab8d2cf40 Merge branch 'master' into fix-recovery 2015-01-20 17:08:47 -08:00
Michael Peyton Jones 9e09e6a9c0 Don't consume after error recovery.
recoverInline should handle making sure that the token stream is
advanced to the appropriate position. It is difficult for the caller to
do that, as recoverInline may create a "new" token that is not actually
in the stream.
2015-01-20 14:18:40 +00:00
Michael Peyton Jones dea7c768d4 Test for recovery over-consumption 2015-01-20 10:54:53 +00:00
ericvergnaud 1926a1636a maven cleanup
- added note for maven developers
 - removed maven plugins
 - updated maven dependencies for dev only
 - added antlr4 annotations
2015-01-19 23:04:46 +08:00
Terence Parr 8af4afc058 add intellij project files 2015-01-14 11:20:08 -08:00
Terence Parr 6d9d60ccda Copy stuff from the root pom to the individual poms and remove the root. Remove dependency on the annotations artifact which no longer exists. hardcode the version number everywhere to make sure I don't use a variable that doesn't exist. update bild so that it uses a new maven_deploy() function I put into bilder.py 2015-01-13 17:29:38 -08:00
Terence Parr 4f0f361d93 Fixes #670. Left recursive rules imported into a root grammar caused an error. All tests pass in all targets. 2015-01-12 13:05:03 -08:00
Terence Parr 64f6e196b2 add unit test that reproduces issue #670 2015-01-12 13:00:15 -08:00
Terence Parr 0c2a693638 remove unnecessary check for missing RULES node as that node is apparently always present; the tree construction rule is: -> ^(RULES rule*) 2015-01-12 12:59:36 -08:00
Terence Parr c9a51b98ae add nullptr check 2015-01-12 12:58:50 -08:00
Terence Parr 8c05364099 set versions to 4.5 2015-01-10 10:12:02 -08:00
Terence Parr a4909b3f52 remove constant word size in *code gen* for inline set testing. 2014-12-26 12:15:49 -08:00
Terence Parr 2a28a9b4f3 simplify. no need for listeners as System.err can be reset. 2014-12-17 10:57:20 -08:00
Terence Parr 49a8029985 allow 4.4-generated parsers to work with new 4.5 runtime. 2014-12-16 19:09:17 -08:00
Terence Parr eb9ee1bd80 urlloader.close() doesn't exist in java 1.6; removing for 1.6 compatibility. 2014-12-16 18:40:07 -08:00
ericvergnaud 38c4e2b002 moved from $self to $parser
- also adjusted generated tests for the above
- also adjusted generated tests for recent changes in Python/JavaScript
targets (token types are nos class members like Java/C#)
2014-12-02 23:44:21 +08:00
ericvergnaud a47ee4d853 add support for $self 2014-11-30 16:28:36 +08:00
ericvergnaud c4ec9e5e35 generate tests for IE 2014-11-23 18:46:14 +08:00
ericvergnaud 78027ed0f0 add edit warnings + fix chrome location + make locations relative 2014-11-23 15:50:31 +08:00
Terence Parr 958f2fdf6e merge from master into release branch 2014-11-22 10:47:29 -08:00
ericvergnaud 8228987b4f prepare release
all tests pass (commented out performance and alternate quotes)
added test for complement set
tests regenerated to fix results after bug fixes and « huge string »
issue in java 1.7+
bild.py review to fix numerous bugs
2014-11-23 02:06:47 +08:00
ericvergnaud 8a87b70859 add test generation for all existing targets 2014-11-16 18:46:13 +08:00
Terence Parr 53c53948df Merge branch 'issue-TokenStreamRewriter' of github.com:parrt/antlr4 into parrt-issue-TokenStreamRewriter 2014-11-15 18:19:41 -08:00
Terence Parr 29c2712ae1 fetched runtime-tests-generator branch into master and did a manual merge. Fixes #76 as I was right there anyway. 2014-11-15 18:13:22 -08:00
ericvergnaud 5847fd6995 preparing for CSharp 2014-11-09 13:22:52 +08:00
ericvergnaud 86fc7fd44d Tests generator and generated tests for Java
As of commit, the generator produces tests for Java, Python 2 and 3,
NodeJS and Safari.
It’s a great relief to seethe full set of runtime tests pas identically
on all targets
The previous tests are now located at org.antlr.v4.test.tool, the files
have been cleaned up to remove duplicates
2014-11-01 01:47:19 +08:00
ericvergnaud 97a2946a2d latest selenium driver 2014-10-29 04:33:37 +08:00
Michael Peyton Jones f3abfb79b7 Remove special offset handling for EOFs.
They can just use the position provided by the lexer.
2014-10-27 17:38:25 +00:00
ericvergnaud 537819ba47 minor changes for Safari support 2014-10-27 03:38:24 +08:00
ericvergnaud 129cbbbece java tests validated 2014-10-25 04:07:49 +08:00
ericvergnaud ba76b053a7 validate SemPredEvalParser tests 2014-10-25 03:40:35 +08:00
ericvergnaud 2716bbd62d validated ParseTrees tests 2014-10-25 02:49:22 +08:00
ericvergnaud 5ee6990f8c validated Listeners tests 2014-10-25 02:39:39 +08:00
ericvergnaud 740c30d21d validated LeftRecursion tests 2014-10-25 02:21:41 +08:00
ericvergnaud 31812721c8 validate FullContextParsing tests 2014-10-25 01:07:31 +08:00
ericvergnaud e39ac5a197 validated CompositeParsers tests 2014-10-25 00:56:08 +08:00
ericvergnaud 0c112e97c8 validate ParserErrors tests 2014-10-25 00:30:20 +08:00
ericvergnaud 6067aee458 validated ParserExec tests 2014-10-25 00:06:47 +08:00
ericvergnaud e03c7d44e5 validated Sets tests 2014-10-24 22:46:12 +08:00
ericvergnaud f99acb7202 validated CompositeLexers 2014-10-24 22:26:34 +08:00
ericvergnaud e97083fd81 validated SemPredEvalLexer 2014-10-24 22:15:05 +08:00
ericvergnaud a683f05f6a add missing test in LexerExec, fix LexerErrors 2014-10-24 08:17:28 +08:00
ericvergnaud 809bac2591 generation of TestLexerExec for Java 2014-10-24 01:12:36 +08:00
ericvergnaud 85388803c6 test templates complete 2014-10-19 11:53:00 +08:00