diff options
Diffstat (limited to 'Source/LexerParser/cmExprLexer.in.l')
-rw-r--r-- | Source/LexerParser/cmExprLexer.in.l | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/LexerParser/cmExprLexer.in.l b/Source/LexerParser/cmExprLexer.in.l index e5f177a..0c4eb9e 100644 --- a/Source/LexerParser/cmExprLexer.in.l +++ b/Source/LexerParser/cmExprLexer.in.l @@ -28,6 +28,8 @@ Modify cmExprLexer.cxx: /* Include the set of tokens from the parser. */ #include "cmExprParserTokens.h" +#include <string> + /*--------------------------------------------------------------------------*/ %} @@ -38,8 +40,9 @@ Modify cmExprLexer.cxx: %pointer %% +[ \t] {} -[0-9][0-9]* { yylvalp->Number = atoi(yytext); return exp_NUMBER; } +[0-9][0-9]* { yylvalp->Number = std::stoll(yytext, nullptr, 10); return exp_NUMBER; } "+" { return exp_PLUS; } "-" { return exp_MINUS; } @@ -54,5 +57,6 @@ Modify cmExprLexer.cxx: ">>" { return exp_SHIFTRIGHT; } "(" { return exp_OPENPARENT; } ")" { return exp_CLOSEPARENT; } +. {return exp_UNEXPECTED;} %% |