Fix some escape character literals & add a few more
This commit is contained in:
parent
7b6f88ea5a
commit
d17f48cf7f
1 changed files with 12 additions and 5 deletions
|
|
@ -107,13 +107,20 @@ f64 { return bp::make_f64(ctx.location); }
|
||||||
[0-9]+\.[0-9]+h { return bp::make_lit_f16(yytext, ctx.location); }
|
[0-9]+\.[0-9]+h { return bp::make_lit_f16(yytext, ctx.location); }
|
||||||
[0-9]+\.[0-9]+d { return bp::make_lit_f64(yytext, ctx.location); }
|
[0-9]+\.[0-9]+d { return bp::make_lit_f64(yytext, ctx.location); }
|
||||||
|
|
||||||
'.' { return bp::make_lit_char8(yytext[1], ctx.location); }
|
'\\0' { return bp::make_lit_char8(0, ctx.location); }
|
||||||
|
'\\a' { return bp::make_lit_char8(7, ctx.location); }
|
||||||
|
'\\b' { return bp::make_lit_char8(8, ctx.location); }
|
||||||
|
'\\t' { return bp::make_lit_char8(9, ctx.location); }
|
||||||
'\\n' { return bp::make_lit_char8(10, ctx.location); }
|
'\\n' { return bp::make_lit_char8(10, ctx.location); }
|
||||||
'\\t' { return bp::make_lit_char8(11, ctx.location); }
|
'\\v' { return bp::make_lit_char8(11, ctx.location); }
|
||||||
|
'\\f' { return bp::make_lit_char8(12, ctx.location); }
|
||||||
'\\r' { return bp::make_lit_char8(13, ctx.location); }
|
'\\r' { return bp::make_lit_char8(13, ctx.location); }
|
||||||
'\\\"' { return bp::make_lit_char8(22, ctx.location); }
|
'\\e' { return bp::make_lit_char8(27, ctx.location); }
|
||||||
'\\'' { return bp::make_lit_char8(27, ctx.location); }
|
'\\\"' { return bp::make_lit_char8(34, ctx.location); }
|
||||||
'\\\\' { return bp::make_lit_char8(134, ctx.location); }
|
'\\'' { return bp::make_lit_char8(39, ctx.location); }
|
||||||
|
'\\?' { return bp::make_lit_char8(63, ctx.location); }
|
||||||
|
'\\\\' { return bp::make_lit_char8(92, ctx.location); }
|
||||||
|
'.' { return bp::make_lit_char8(yytext[1], ctx.location); }
|
||||||
|
|
||||||
<<EOF>> { return bp::make_end(ctx.location); }
|
<<EOF>> { return bp::make_end(ctx.location); }
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue