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
a8207ca1
Commit
a8207ca1
authored
Feb 11, 2015
by
POTTIER Francois
Browse files
Inlined [branches] again. No use isolating it.
parent
8cc8231b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/yacc-parser.mly
View file @
a8207ca1
/*
This
is
the
crude
version
of
the
parser
.
It
is
meant
to
be
processed
/*
This
is
the
crude
version
of
the
parser
.
It
is
meant
to
be
processed
by
ocamlyacc
.
Its
existence
is
necessary
for
bootstrapping
.
It
is
kept
by
ocamlyacc
.
Its
existence
is
necessary
for
bootstrapping
.
It
is
kept
in
sync
with
[
fancy
-
parser
]
.
The
two
parsers
accept
the
same
language
,
in
sync
with
[
fancy
-
parser
]
,
with
a
few
differences
:
but
[
fancy
-
parser
]
performs
slightly
more
refined
error
handling
.
*/
1
.
[
fancy
-
parser
]
exploits
many
features
of
Menhir
;
2
.
[
fancy
-
parser
]
performs
slightly
more
refined
error
handling
;
3
.
[
fancy
-
parser
]
supports
anonymous
rules
.
*/
%
{
%
{
...
@@ -162,7 +164,8 @@ rule:
...
@@ -162,7 +164,8 @@ rule:
symbol
symbol
optional_formal_parameters
optional_formal_parameters
COLON
COLON
branches
optional_bar
production_group
production_groups
{
{
let
public
,
inline
=
$
1
in
let
public
,
inline
=
$
1
in
{
pr_public_flag
=
public
;
{
pr_public_flag
=
public
;
...
@@ -170,14 +173,10 @@ rule:
...
@@ -170,14 +173,10 @@ rule:
pr_nt
=
Positions
.
value
$
2
;
pr_nt
=
Positions
.
value
$
2
;
pr_positions
=
[
Positions
.
position
$
2
];
pr_positions
=
[
Positions
.
position
$
2
];
pr_parameters
=
$
3
;
pr_parameters
=
$
3
;
pr_branches
=
$
5
pr_branches
=
List
.
flatten
(
$
6
::
List
.
rev
$
7
)
}
}
}
}
branches
:
optional_bar
production_group
production_groups
{
List
.
flatten
(
$
2
::
List
.
rev
$
3
)
}
flags
:
flags
:
/*
epsilon
*/
/*
epsilon
*/
{
false
,
false
}
{
false
,
false
}
...
...
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