-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More accurate error messages #1724
Conversation
…sets, fixed Java.g4 grammar: [+-] -> [+\-]
Tests fixed.
@@ -1140,7 +1140,7 @@ SignedInteger | |||
|
|||
fragment | |||
Sign | |||
: [+-] | |||
: [+\-] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this is no longer possible without escaping the minus? It worked when the minus was at the end of the set list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, not possible. Old syntax was a bit incorrect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KvanTTT Old syntax was pretty common. I expect it to remain valid. It's by far the most common way I include a -
in a set.
@@ -147,6 +150,29 @@ private static void optimizeSets(Grammar g, ATN atn) { | |||
// System.out.println("ATN optimizer removed " + removedStates + " states by collapsing sets."); | |||
} | |||
|
|||
private static String getIntervalSetEscapedString(IntervalSet intervalSet) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure this belongs in this class. maybe it goes in CharSupport?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I'll move it to CharSupport
.
Much better :) |
Pretty easy. |
ok, let's do that. thanks! |
No description provided.