Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
POTTIER Francois
menhir
Commits
68b12c4c
Commit
68b12c4c
authored
Jun 30, 2015
by
Yann Régis-Gianas
Browse files
Lexer: Forbid producer identifier of the form _[0-9]+.
parent
c781e458
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lexer.mll
View file @
68b12c4c
...
...
@@ -312,6 +312,11 @@ rule main = parse
{
STAR
}
|
"+"
{
PLUS
}
|
"_"
[
'
0
'
-
'
9
'
]
+
{
Error
.
errorp
(
Positions
.
with_poss
(
lexeme_start_p
lexbuf
)
(
lexeme_end_p
lexbuf
)
()
)
"identifiers of the form _0, _1, _2, ..., are reserved."
}
|
(
lowercase
identchar
*
)
as
id
{
if
Hashtbl
.
mem
reserved
id
then
Error
.
errorp
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment