nitcc: do not limit accepted literal char to `~`
authorJean Privat <jean@pryen.org>
Wed, 9 Mar 2016 05:00:30 +0000 (00:00 -0500)
committerJean Privat <jean@pryen.org>
Thu, 10 Mar 2016 04:48:26 +0000 (23:48 -0500)
Signed-off-by: Jean Privat <jean@pryen.org>

contrib/nitcc/src/nitcc.sablecc

index fb535a0..18d52cc 100644 (file)
@@ -7,7 +7,7 @@ Lexer
 id = ('a'..'z')('a'..'z'|'0'..'9'|'_')*;
 
 // A printable character (inside strings)
-ch = ' ' .. '~';
+ch = ' ' ...;
 
 // Literal strings
 str = '\'' (ch-'\\'-'\''|'\\'ch)* '\'';
@@ -21,7 +21,7 @@ ch_hex = '#' ('x'|'X') ('0'..'9'|'a'..'z'|'A'..'Z')+ ;
 // A single-line comment
 comment = '//' ch* '\n'?;
 
-any = '\t'..'~';
+any = '\t' ...;
 not_star = any - '*';
 not_star_not_slash = not_star - '/';