diff --git a/libs/parser/rules/pslang.l b/libs/parser/rules/pslang.l index 41a6998..474c597 100644 --- a/libs/parser/rules/pslang.l +++ b/libs/parser/rules/pslang.l @@ -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]+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); } -'\\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); } -'\\\"' { return bp::make_lit_char8(22, ctx.location); } -'\\'' { return bp::make_lit_char8(27, ctx.location); } -'\\\\' { return bp::make_lit_char8(134, ctx.location); } +'\\e' { return bp::make_lit_char8(27, ctx.location); } +'\\\"' { return bp::make_lit_char8(34, 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); } <> { return bp::make_end(ctx.location); }