From 9b1aef6f2280f2d33d3492d3f79f88cea64dffeb Mon Sep 17 00:00:00 2001 From: John Colvin Date: Fri, 26 Jul 2024 04:07:57 +0000 Subject: [PATCH] fix: Define BoooleanConstant before StringConstant Otherwise the former masks the latter and prevents it from matching --- .../BooleanExpressions/BooleanExpressionTokens.lex | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/DataStreamSuite/BooleanExpressions/BooleanExpressionTokens.lex b/src/DataStreamSuite/BooleanExpressions/BooleanExpressionTokens.lex index 0ad5564d7..f2a67352d 100644 --- a/src/DataStreamSuite/BooleanExpressions/BooleanExpressionTokens.lex +++ b/src/DataStreamSuite/BooleanExpressions/BooleanExpressionTokens.lex @@ -47,11 +47,6 @@ IsOfType '/' %% -{StringConstant} { - yylval.String = yytext.Substring(1, yytext.Length - 2).Replace(@"\'", "'"); - return (int)Token.STRING_CONSTANT; -} - {BooleanConstant} { yylval.Boolean = yytext.ToLower() switch { "true" => true, @@ -62,6 +57,11 @@ IsOfType '/' return (int)Token.BOOLEAN_CONSTANT; } +{StringConstant} { + yylval.String = yytext.Substring(1, yytext.Length - 2).Replace(@"\'", "'"); + return (int)Token.STRING_CONSTANT; +} + {NullConstant} { yylval.Null = DBNull.Value; return (int)Token.NULL_CONSTANT;