Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
menhir
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
12
Issues
12
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
POTTIER Francois
menhir
Commits
081abe25
Commit
081abe25
authored
Feb 11, 2015
by
POTTIER Francois
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More general syntax of actuals.
Not useful in practice; preparation for further changes.
parent
eb09e1cc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
14 deletions
+11
-14
doc/main.tex
doc/main.tex
+3
-4
src/fancy-parser.mly
src/fancy-parser.mly
+4
-2
src/yacc-parser.mly
src/yacc-parser.mly
+4
-8
No files found.
doc/main.tex
View file @
081abe25
...
...
@@ -372,9 +372,8 @@ must be fully qualified.
\optional
{
\nt
{
lid
}
\dequal
}
\nt
{
actual
}
\\
\nt
{
actual
}
\is
\nt
{
id
}
\optional
{
\dlpar\sepcommalist
{
\nt
{
actual
}}
\drpar
}
\optional
{
\dquestion
\barre
\dplus
\barre
\dstar
}
\\
\nt
{
id
}
\optional
{
\dlpar\sepcommalist
{
\nt
{
actual
}}
\drpar
}
\\
&&
\nt
{
actual
}
\optional
{
\dquestion
\barre
\dplus
\barre
\dstar
}
\\
\end{tabular}
\end{center}
...
...
@@ -564,7 +563,7 @@ keyword (\kw{\$1}, etc.).
\subsubsection
{
Actuals
}
\label
{
sec:actual
}
In its simplest form, an actual
simply consists of
a terminal or nonterminal
In its simplest form, an actual
is just
a terminal or nonterminal
symbol. The optional actual parameters
$
\dlpar\sepcommalist
{
\nt
{
actual
}}
\drpar
$
and the optional modifier
(
\dquestion
,
\dplus
, or
\dstar
) are explained further on
...
...
src/fancy-parser.mly
View file @
081abe25
...
...
@@ -321,8 +321,10 @@ producer:
"*"
shortcuts
.
*/
actual_parameter
:
symbol
=
symbol
actuals
=
plist
(
actual_parameter
)
modifier
=
modifier
?
{
Parameters
.
oapp1
modifier
(
Parameters
.
app
symbol
actuals
)
}
symbol
=
symbol
actuals
=
plist
(
actual_parameter
)
{
Parameters
.
app
symbol
actuals
}
|
p
=
actual_parameter
m
=
modifier
{
ParameterApp
(
m
,
[
p
])
}
/*
-------------------------------------------------------------------------
*/
/*
Formal
or
actual
parameter
lists
are
delimited
with
parentheses
and
...
...
src/yacc-parser.mly
View file @
081abe25
...
...
@@ -217,8 +217,10 @@ actual_parameters_comma:
{
$
1
::
$
3
}
actual_parameter
:
symbol
optional_actual_parameters
optional_modifier
{
Parameters
.
oapp1
$
3
(
Parameters
.
app
$
1
$
2
)
}
symbol
optional_actual_parameters
{
Parameters
.
app
$
1
$
2
}
|
actual_parameter
modifier
{
ParameterApp
(
$
2
,
[
$
1
])
}
actual_parameters
:
/*
epsilon
*/
...
...
@@ -236,12 +238,6 @@ optional_bar:
/*
The
"?"
,
"+"
,
and
"*"
modifiers
are
short
-
hands
for
applications
of
certain
parameterized
nonterminals
,
defined
in
the
standard
library
.
*/
optional_modifier
:
/*
epsilon
*/
{
None
}
|
modifier
{
Some
$
1
}
modifier
:
QUESTION
{
unknown_pos
"option"
}
...
...
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