summaryrefslogtreecommitdiff
path: root/yacc
diff options
context:
space:
mode:
authorDemi Obenour <demiobenour@gmail.com>2017-01-15 15:15:28 -0500
committerDavid Allsopp <david.allsopp@metastack.com>2017-05-17 09:48:41 +0100
commit28767a90aea7dc423e75e74173c5acc34e21716b (patch)
treeeed2808d509997a4271c4ed85ce673a700512ef7 /yacc
parent795f1bb37a5a1c83cea2474a4608e0b0e53a4a64 (diff)
downloadocaml-28767a90aea7dc423e75e74173c5acc34e21716b.tar.gz
Fix parsing for a corner case in ocamlyacc
A'"'" was misparsed (the ' was not associated with the A as it should be)
Diffstat (limited to 'yacc')
-rw-r--r--yacc/reader.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/yacc/reader.c b/yacc/reader.c
index 58d4c3514b..616a1c92e2 100644
--- a/yacc/reader.c
+++ b/yacc/reader.c
@@ -1282,13 +1282,13 @@ loop:
goto loop;
}
}
- if (isalpha(c) || c == '_' || c == '$')
+ if (isalpha(c) || c == '_' || c == '$' || In_bitmap(caml_ident_start, c))
{
do
{
putc(c, f);
c = *++cptr;
- } while (isalnum(c) || c == '_' || c == '$');
+ } while (isalnum(c) || c == '_' || c == '$' || c == '\'' || In_bitmap(caml_ident_body, c));
goto loop;
}
if (c == '}' && depth == 1) {