diff options
author | Stephen Dolan <mu@netsoc.tcd.ie> | 2012-09-22 14:03:46 +0100 |
---|---|---|
committer | Stephen Dolan <mu@netsoc.tcd.ie> | 2012-09-22 14:03:46 +0100 |
commit | a2643cc0d564033c49bffbd0de9a8e797281e73f (patch) | |
tree | e00b27b5a0bd58fb5cb1286ee988c0d128b3bac7 /lexer.l | |
parent | 359d5f33bde0df899985eac3d720f5c6a7f4d580 (diff) |
Allow underscores in IDENT tokens. Fixes #3.
IDENT syntax now includes ASCII letters and underscores, so
'.foo_bar' now works. Non-ASCII letters won't work in IDENT
tokens (it's impossible to tell which non-ascii characters are
"letters" without full unicode tables), so '.données' is still
a syntax error (the workaround is '.["données"]', since you can
put anything you like in a string).
Diffstat (limited to 'lexer.l')
-rw-r--r-- | lexer.l | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -107,7 +107,7 @@ } -[[:alnum:]]+ { yylval->literal = jv_string(yytext); return IDENT;} +[a-zA-Z_][a-zA-Z_0-9]* { yylval->literal = jv_string(yytext); return IDENT;} [ \n\t]+ {} |