diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2009-11-12 16:34:27 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2009-11-12 16:34:27 -0800 |
commit | aa4420347f132039a3e37d6996d1e31096fc10de (patch) | |
tree | cfebd82beda9e272899efae5e5f5dcfb0fc767fd /parser.l | |
parent | 52501f18487dbefaf0282f1bf1cc328b3fe1ab00 (diff) | |
download | txr-aa4420347f132039a3e37d6996d1e31096fc10de.tar.gz txr-aa4420347f132039a3e37d6996d1e31096fc10de.tar.bz2 txr-aa4420347f132039a3e37d6996d1e31096fc10de.zip |
Documenting extended characters in man page.
Cleaned up some more issues related to extended characters.
Diffstat (limited to 'parser.l')
-rw-r--r-- | parser.l | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -399,6 +399,11 @@ UONLY {U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U} yyerrorf("bad character in directive: '%s'", yytext); } +<SPECIAL,NESTED>. { + yyerrorf("non-UTF-8 byte in directive: '\\x%02x'", + (unsigned char) yytext[0]); + } + <REGEX>[/] { yy_pop_state(); if (yy_top_state() == INITIAL @@ -452,6 +457,11 @@ UONLY {U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U} return REGCHAR; } +<REGEX>. { + yyerrorf("non-UTF-8 byte in regex: '\\x%02x'", + (unsigned char) yytext[0]); + } + <INITIAL>({UONLY}|[^@\n])+ { yylval.lexeme = utf8_dup_from(yytext); return TEXT; @@ -536,4 +546,9 @@ UONLY {U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U} return LITCHAR; } +<STRLIT,CHRLIT,QSILIT>. { + yyerrorf("non-UTF-8 byte in literal: '\\x%02x'", + (unsigned char) yytext[0]); + } + %% |