Skip to content
GitLab
Menu
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
88c4b76d
Commit
88c4b76d
authored
Jul 10, 2007
by
Pietro Abate
Browse files
[r2003-05-14 07:58:18 by cvscast] Parsing error when type id is not capitalized
Original author: cvscast Date: 2003-05-14 07:58:18+00:00
parent
7fae07b1
Changes
1
Hide whitespace changes
Inline
Side-by-side
parser/parser.ml
View file @
88c4b76d
...
...
@@ -93,6 +93,7 @@ EXTEND
|
(
p
,
e1
)
=
let_binding
;
"in"
;
e2
=
expr
LEVEL
"top"
->
[
mk
loc
(
EvalStatement
(
exp
loc
(
Match
(
e1
,
[
p
,
e2
]))))
]
|
LIDENT
"type"
;
x
=
UIDENT
;
"="
;
t
=
pat
->
[
mk
loc
(
TypeDecl
(
x
,
t
))
]
|
LIDENT
"type"
;
x
=
LIDENT
->
[
error
loc
"Type identifiers must be capitalized"
]
|
LIDENT
"debug"
;
d
=
debug_directive
->
[
mk
loc
(
Debug
d
)
]
|
LIDENT
"include"
;
s
=
STRING2
->
let
s
=
get_string
s
in
...
...
@@ -337,7 +338,9 @@ EXTEND
pat
:
[
[
x
=
pat
;
LIDENT
"where"
;
b
=
LIST1
[
a
=
UIDENT
;
"="
;
y
=
pat
->
(
a
,
y
)]
SEP
"and"
b
=
LIST1
[
a
=
UIDENT
;
"="
;
y
=
pat
->
(
a
,
y
)
|
LIDENT
->
error
loc
"Type/pattern identifiers must be capitalized"
]
SEP
"and"
->
mk
loc
(
Recurs
(
x
,
b
))
]
|
RIGHTA
[
x
=
pat
;
"->"
;
y
=
pat
->
mk
loc
(
Arrow
(
x
,
y
))
]
|
"no_arrow"
[
x
=
pat
;
"|"
;
y
=
pat
->
mk
loc
(
Or
(
x
,
y
))
]
...
...
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