executor's fourccs are now written differently

This commit is contained in:
Wolfgang Thaller 2019-09-07 22:24:58 +02:00
parent 405c44825b
commit c5c81bf091
2 changed files with 6 additions and 11 deletions

View file

@ -87,8 +87,6 @@ bool preambleRequested = true;
"GUEST_STRUCT" return token::GUEST_STRUCT;
"UPP" return token::UPP;
"LowMemGlobal" return token::LOWMEMGLOBAL;
"FOURCC" return token::FOURCC;
"TICK" return token::TICK;
"DISPATCHER_TRAP" return token::DISPATCHER_TRAP;
"EXTERN_DISPATCHER_TRAP" return token::EXTERN_DISPATCHER_TRAP;
@ -118,6 +116,12 @@ bool preambleRequested = true;
0x[[:xdigit:]]+L return hp::make_INTLIT(std::string(yytext,yytext+yyleng-1));
\'.\' return hp::make_CHARLIT(yytext);
\".+\"_4 {
std::string s = std::string(yytext, yytext+yyleng-2);
s[0] = s[yyleng-3] = '\'';
return hp::make_CHARLIT(s);
}
\".+\" return hp::make_STRINGLIT(yytext);
[[:alpha:]_][[:alnum:]_]* return hp::make_IDENTIFIER(yytext);

View file

@ -402,15 +402,6 @@ enum_value:
expression:
INTLIT
| CHARLIT
| "FOURCC" "(" CHARLIT "," CHARLIT "," CHARLIT "," CHARLIT ")"
{
auto q = [](const std::string& a) { return a.substr(1, a.size()-2); };
$$ = "'" + q($3) + q($5) + q($7) + q($9) + "'";
}
| "TICK" "(" STRINGLIT ")"
{
$$ = "'" + $3 + "'";
}
| IDENTIFIER
| "-" expression { $$ = "-" + $2; }
| "(" expression ")" { $$ = $2; }