Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cduce
cduce
Commits
7a46ec72
Commit
7a46ec72
authored
Oct 05, 2007
by
Pietro Abate
Browse files
[r2005-06-08 12:12:10 by afrisch] _ is not an identifier / label
Original author: afrisch Date: 2005-06-08 12:12:10+00:00
parent
fac085f3
Changes
2
Hide whitespace changes
Inline
Side-by-side
parser/parser.ml
View file @
7a46ec72
...
...
@@ -378,7 +378,7 @@ EXTEND
tag
:
[
[
a
=
[
IDENT
|
keyword
]
->
exp
loc
(
Atom
(
ident
a
))
]
];
tag_type
:
[
[
IDENT
"_"
->
mk
loc
(
Internal
(
Types
.
atom
Atoms
.
any
))
[
"_"
->
mk
loc
(
Internal
(
Types
.
atom
Atoms
.
any
))
|
a
=
[
IDENT
|
keyword
]
->
mk
loc
(
Cst
(
Atom
(
ident
a
)))
|
t
=
ANY_IN_NS
->
mk
loc
(
NsT
(
ident
t
))
]
...
...
@@ -577,7 +577,7 @@ EXTEND
let
fields
=
[
label
"get"
,
(
get_fun
,
None
);
label
"set"
,
(
set_fun
,
None
)
]
in
mk
loc
(
Record
(
false
,
fields
))
|
IDENT
"_"
->
mk
loc
(
Internal
Types
.
any
)
|
"_"
->
mk
loc
(
Internal
Types
.
any
)
|
"("
;
a
=
IDENT
;
":="
;
c
=
expr
;
")"
->
mk
loc
(
Constant
(
ident
a
,
c
))
|
"!"
;
a
=
IDENT
->
...
...
parser/ulexer.ml
View file @
7a46ec72
...
...
@@ -45,7 +45,7 @@ let parse_char lexbuf base i =
let
regexp
ncname_char
=
xml_letter
|
xml_digit
|
[
'
-
'
'
_'
]
|
xml_combining_char
|
xml_extender
|
"
\\
."
let
regexp
ncname
=
(
xml_letter
|
'
_'
)
ncname_char
*
let
regexp
ncname
=
(
xml_letter
ncname_char
*
)
|
(
'
_'
ncname_char
+
)
let
regexp
qname
=
(
ncname
'
:
'
)
?
ncname
...
...
@@ -74,7 +74,7 @@ let rec token = lexer
return
lexbuf
(
"INT"
,
L
.
utf8_lexeme
lexbuf
)
|
[
"<>=.,:;+-*/@&{}[]()|?`!"
]
|
"->"
|
"::"
|
";;"
|
"--"
|
"//"
|
"/@"
|
":="
|
"
\\
"
|
"++"
|
"<="
|
">="
|
"<<"
|
">>"
|
"||"
|
"&&"
|
"**"
|
"<="
|
">="
|
"<<"
|
">>"
|
"||"
|
"&&"
|
"**"
|
"_"
|
".."
|
[
"?+*"
]
"?"
|
"#"
->
return
lexbuf
(
""
,
L
.
utf8_lexeme
lexbuf
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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