diff options
author | Jari Vetoniemi <mailroxas@gmail.com> | 2017-05-13 01:50:39 +0300 |
---|---|---|
committer | Jari Vetoniemi <mailroxas@gmail.com> | 2018-02-23 12:53:53 +0200 |
commit | 22fb54a917676e61f19d773cc4f931300ace925e (patch) | |
tree | de709d6ad2e433a59cee0c7dcaa904c78a30e01f /src | |
parent | 98b2d4911644a8e206fe9de692e4ccaa6e3e0cb3 (diff) |
lexer.rl: hex can be as long as we want
hex expression shared the esc_hex expression before.
But esc_hex is limited to 2 hexdecimal characters, and thus poor choice
for parsing hexdecimal numbers in source. (This is different from C
which allows "n" length hex escapes causing problems when you mix hex
escapes with strings for example)
Diffstat (limited to 'src')
-rw-r--r-- | src/fspec/lexer.rl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fspec/lexer.rl b/src/fspec/lexer.rl index 8fdc960..51d1a54 100644 --- a/src/fspec/lexer.rl +++ b/src/fspec/lexer.rl @@ -530,7 +530,7 @@ state_finish_declaration(struct state *state, const enum fspec_declaration decl) esc = [abfnrtv\\'"e]; esc_chr = '\\'; esc_hex = 'x' <: xdigit{2}; - hex = '0' <: esc_hex; + hex = '0x' <: xdigit{1,}; oct = [0-7]{1,3}; dec = [\-+]? <: (([1-9] <: digit*) | '0'); valid = ^cntrl; |