File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed
Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ repositories {
3636
3737dependencies {
3838 implementation ' rhino:js:1.6R5'
39- implementation ' antlr:antlr:2.7.6 '
39+ implementation ' antlr:antlr:2.7.7 '
4040 testImplementation group : ' junit' , name : ' junit' , version : ' 4.11'
4141 antlr ' antlr:antlr:2.7.7'
4242}
Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ class ExpressionLexer extends Lexer;
161161
162162options {
163163 k= 3 ; // needed for newline junk
164- charVocabulary= ' \u 0000' .. ' \u 007F ' ; // allow ascii
164+ charVocabulary= ' \u 0000' .. ' \u 00FF ' ; // allow ISO 8859 - 1
165165}
166166
167167ASSIGN : ' =' ;
Original file line number Diff line number Diff line change 1818import antlr .RecognitionException ;
1919import antlr .TokenStreamException ;
2020import java .io .ByteArrayInputStream ;
21+ import java .nio .charset .StandardCharsets ;
2122import java .util .ArrayList ;
2223import java .util .Collection ;
2324import java .util .List ;
@@ -248,7 +249,8 @@ public Expression parseExpression(String expression) throws ParserException {
248249 try {
249250 String s = applyTransforms (expression );
250251
251- ExpressionLexer lexer = new ExpressionLexer (new ByteArrayInputStream (s .getBytes ()));
252+ ExpressionLexer lexer =
253+ new ExpressionLexer (new ByteArrayInputStream (s .getBytes (StandardCharsets .ISO_8859_1 )));
252254 ExpressionParser parser = new ExpressionParser (lexer );
253255
254256 parser .expression ();
You can’t perform that action at this time.
0 commit comments