/* Quoted names can contain any character except " and \ */
StringConstant \"[^\"]*\"
AtStringConstant @\"[^\"]*\"
+PctStringConstant %\"[^\"]*\"
/* LocalVarID/GlobalVarID: match an unnamed local variable slot ID. */
LocalVarID %[0-9]+
return ATSTRINGCONSTANT;
}
+{PctStringConstant} {
+ yytext[strlen(yytext)-1] = 0; // nuke end quote
+ llvmAsmlval.StrVal = strdup(yytext+2); // Nuke @, quote
+ return PCTSTRINGCONSTANT;
+ }
{PInteger} { int len = strlen(yytext);
uint32_t numBits = ((len * 64) / 19) + 1;
APInt Tmp(numBits, yytext, len, 10);
%token <PrimType> FLOAT DOUBLE LABEL
%token TYPE
-%token<StrVal> LOCALVAR GLOBALVAR LABELSTR STRINGCONSTANT ATSTRINGCONSTANT
+%token<StrVal> LOCALVAR GLOBALVAR LABELSTR
+%token<StrVal> STRINGCONSTANT ATSTRINGCONSTANT PCTSTRINGCONSTANT
%type <StrVal> LocalName OptLocalName OptLocalAssign
%type <StrVal> GlobalName OptGlobalAssign GlobalAssign
%type <UIntVal> OptAlign OptCAlign
IntType : INTTYPE;
FPType : FLOAT | DOUBLE;
-LocalName : LOCALVAR | STRINGCONSTANT;
+LocalName : LOCALVAR | STRINGCONSTANT | PCTSTRINGCONSTANT
OptLocalName : LocalName | /*empty*/ { $$ = 0; };
/// OptLocalAssign - Value producing statements have an optional assignment