%option noyywrap nounput batch debug noinput
int [0-9]+
blank [ \t]
+str [a-zA-Z_0-9]*
%{
// Code run each time a pattern is matched.
{blank}+ loc.step();
[\n]+ loc.lines(yyleng); loc.step();
-\'[a-zA-Z_0-9]*\' {
- // This is a string, no need to do any conversions here.
- return isc::eval::EvalParser::make_STRING(yytext, loc);
+\'{str}\' {
+ // This is a string. It contains the actual string and single quotes.
+ // We need to get those quotes out of the way.
+ std::string tmp(yytext+1);
+ tmp.resize(tmp.size() - 1);
+
+ return isc::eval::EvalParser::make_STRING(tmp, loc);
}
option\[{int}\] {