Sam Harwell
399a1df047
Add regression tests for #677
2014-08-09 10:55:20 -05:00
Sam Harwell
550a737acf
Make sure code generation was successful before attempting to compile
2014-08-09 10:55:19 -05:00
Sam Harwell
8e69a5b99d
Update CodeGenPipeline.process to check for errors before writing output files
2014-08-09 10:26:21 -05:00
Terence Parr
73d2f1f688
simplify; + node always points at loopback now.
2014-07-17 18:37:57 -07:00
Terence Parr
aff865d1a7
Make the plus tree node point at loopback always.
2014-07-17 17:29:35 -07:00
Terence Parr
94c1c77652
If there is no loopentry decision, have + AST point to loopback
2014-07-16 20:59:39 -07:00
Terence Parr
2ca20e00ff
Remove unneeded createATN().
2014-07-16 20:37:15 -07:00
Terence Parr
bb389782da
Fixes #661 . A parser rule reference within a lexer rule would get a bad error message and then an exception. Further, errors within the grammar tree visitor would go to standard error instead of to an error manager because none of the subclasses implemented getErrorManager(). Introduced an error type for this error PARSER_RULE_REF_IN_LEXER_RULE. Added to unit test.
2014-07-11 12:09:47 -07:00
Terence Parr
83411ef056
add test
2014-07-10 18:00:16 -07:00
Terence Parr
9b76e6423c
refine error type
2014-07-05 19:08:31 -07:00
Terence Parr
e1ba264d93
move common char encoding up to Target; same works for Python.
2014-07-03 10:54:49 -07:00
Terence Parr
07b7a4b334
I messed up the merge a bit in ErrorType. Made something into a grammar error not tool error. changed tool error back so it does not accept a token in the grammar.
2014-06-30 16:24:43 -07:00
Terence Parr
d85ea0649a
Merge branch 'err-msgs-upgrade'
...
Conflicts:
tool/src/org/antlr/v4/tool/ErrorType.java
2014-06-30 15:59:19 -07:00
Terence Parr
1b7cdc4328
move templatesExist to Target
2014-06-30 15:38:15 -07:00
Terence Parr
e3fc04bda1
put good quotes back in. rm unneeded arg to left-recur msg.
2014-06-30 15:16:20 -07:00
Terence Parr
f1d782ffe1
Add convenience methods for detecting missing targets. At a few bail out points so that we don't try anything that will need code generator if we get an improper target.
2014-06-30 11:49:30 -07:00
Terence Parr
f0ab9b1415
use assoc value's token.
2014-06-30 09:26:02 -07:00
Terence Parr
36425dd59c
Big change to error messages themselves by removing single quotes for non input text stuff. Made cannot_find_tokens_file more specific (split it). Added offending token information to a lot of the messages. It now only prints the file name and not the full path to the file in error messages. Re-factored the ANTLRMessage hierarchy to share fields. Getting the offending token required number of methods to take different arguments. removed the default ST listener in the error manager as it is apparently unused. Cannot find imported grammar is now a grammar error not a tool error.
2014-06-29 21:39:15 -07:00
Terence Parr
4f7f8538ac
add new panic() method, though not yet used. revert to java target if cannot find specified target
2014-06-29 13:02:34 -07:00
Terence Parr
2e352e2697
add unit tests for -o and -lib; improve BaseTest: refactor writeFile to Utils. -o options and others not accepted by antlr().
2014-06-29 12:21:39 -05:00
Terence Parr
a07d523c81
add comment
2014-06-29 09:43:24 -07:00
Sam Harwell
91206869c5
Prepare for next development iteration
2014-06-28 22:40:33 -05:00
Terence Parr
8937e0d16e
repl space with tabs.
2014-06-28 14:56:47 -07:00
Terence Parr
4acb1091de
refactor for reuse, make target check majorminor only.
2014-06-28 14:55:34 -07:00
Sam Harwell
7d88b0106a
[maven-release-plugin] prepare for next development iteration
2014-06-18 21:25:44 -05:00
Sam Harwell
201eeb147d
[maven-release-plugin] prepare release 4.3
2014-06-18 21:24:24 -05:00
Sam Harwell
bbac283ba2
Add @since documentation to key new exposed API types/methods
2014-06-18 19:48:07 -05:00
Sam Harwell
a72058bc67
Update dependency versions
2014-06-18 19:37:30 -05:00
Sam Harwell
3378be9c79
Update all version numbers for consistency prior to the 4.3 release
2014-06-18 19:37:29 -05:00
Sam Harwell
6949e832d9
Updated comments to clarify recent changes in code
2014-06-18 19:12:26 -05:00
Sam Harwell
7b88a6dbeb
Update the assignment of Tool.VERSION ( fixes #634 )
...
* Reference RuntimeMetaData.VERSION so there are fewer version numbers to update during a release
* Assign the value in a static initializer so it's not a compile-time constant
2014-06-18 17:43:47 -05:00
Sam Harwell
fab3a83107
Remove ability to reference enclosing rule by name, in favor of always using $ctx ( fixes #571 )
2014-06-16 18:06:09 -05:00
Terence Parr
91752af88d
Merge pull request #623 from parrt/fix-set-subtract
...
getMinElement now supports values < 0. Checked and shouldn't affect any...
2014-06-16 12:41:50 -07:00
Sam Harwell
2920ad0d1a
* Updated documentation for IntSet
...
* Reimplemented IntervalSet.subtract and IntervalSet.complement to operate over the complete range of supported values
* Expanded several methods in IntervalSet to operate on any IntSet
* Mark COMPLETE_CHAR_SET and EMPTY_SET as read-only
2014-06-16 14:23:52 -05:00
Terence Parr
0575c59fc6
Merge pull request #629 from sharwell/fix-542
...
Consistent handling of element options applied to alternatives
2014-06-16 10:44:35 -07:00
Sam Harwell
6eeafacb88
Consistent handling of element options applied to alternatives ( fixes #542 )
2014-06-16 12:41:31 -05:00
Sam Harwell
a812c32a22
Support multiple epsilon elements at the end of a left-recursive rule alternative ( fixes #625 )
2014-06-16 12:08:56 -05:00
Sam Harwell
9cbf473195
Add regression tests for #625
2014-06-16 12:08:56 -05:00
Terence Parr
51430018d0
getMinElement now supports values < 0. Checked and shouldn't affect any uses. subtract() from set with EOF, wiped out all negative values. added tests.
2014-06-14 13:14:32 -07:00
Terence Parr
633d4e2e19
Merge pull request #620 from sharwell/fix-543
...
Fix documentation comments generated for labeled alternatives
2014-06-10 16:45:21 -07:00
Terence Parr
662ef9bfac
Merge pull request #619 from sharwell/sempred
...
Updated documentation and add argument validation assertion for SemPred
2014-06-10 16:44:23 -07:00
Terence Parr
63069a571d
Merge pull request #618 from sharwell/fix-563
...
Fix cases where file encoding was not handled properly in the tool
2014-06-10 16:43:51 -07:00
Terence Parr
8abe81aaa6
Merge pull request #621 from parrt/token-names-vs-literals-fix
...
errors should display literal if no token name avail.
2014-06-10 16:37:33 -07:00
Sam Harwell
0c0fd67082
Merge pull request #616 from parrt/test-profiler-with-generated-code
...
test profiler with generated code. dump profile information using toStri...
2014-06-10 18:05:24 -05:00
Terence Parr
a1c0319b41
test profiler with generated code. dump profile information using toString as dump() no longer available.
2014-06-10 18:04:12 -05:00
Terence Parr
0355f17f04
errors should display literal if no token name avail.
2014-06-10 15:47:28 -07:00
Sam Harwell
00f95b4a29
Fix documentation comments generated for labeled alternatives ( fixes #543 )
2014-06-10 17:34:04 -05:00
Sam Harwell
50cc4ac736
Updated documentation and add argument validation assertion for SemPred
2014-06-10 17:33:31 -05:00
Sam Harwell
156696be18
Fix cases where file encoding was not handled properly in the tool ( fixes #563 )
2014-06-10 17:32:59 -05:00
Terence Parr
fdc46c53e6
Merge pull request #617 from sharwell/fix-588
...
Fix 588
2014-06-10 15:09:34 -07:00