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
f6577c1f
Commit
f6577c1f
authored
Nov 05, 2015
by
POTTIER Francois
Browse files
More tests of positions.
parent
d76cc109
Changes
3
Show whitespace changes
Inline
Side-by-side
quicktest/positions/aux.ml
View file @
f6577c1f
...
...
@@ -13,7 +13,7 @@ type optional_comma =
positions
*
nothing
option
type
annotations
=
positions
*
position
*
position
*
optional_dot
*
optional_comma
positions
*
position
*
position
*
int
*
optional_dot
*
optional_comma
type
raw_expr
=
|
EInt
...
...
@@ -66,10 +66,11 @@ module Print = struct
positions
"optional_comma"
poss
;
iter
nothing
no
let
annotations
(
poss
,
pos1
,
pos2
,
odot
,
ocomma
)
=
let
annotations
(
poss
,
pos1
,
pos2
,
ofs3
,
odot
,
ocomma
)
=
positions
"annotations"
poss
;
position
"annotations: $endpos($1)"
pos1
;
position
"annotations: $startpos($2)"
pos2
;
offset
"annotations: $startofs"
ofs3
;
optional_dot
odot
;
optional_comma
ocomma
...
...
quicktest/positions/parser-menhir.mly
View file @
f6577c1f
...
...
@@ -39,7 +39,7 @@ optional_dot:
%
inline
annotations
:
optional_dot
optional_comma
{
(
$
startpos
,
$
endpos
)
,
$
endpos
(
$
1
)
,
$
startpos
(
$
2
)
,
$
endpos
(
$
1
)
,
$
startpos
(
$
2
)
,
$
startofs
,
$
1
,
$
2
}
raw_expr
:
...
...
quicktest/positions/parser-ocamlyacc.mly
View file @
f6577c1f
...
...
@@ -46,7 +46,7 @@ optional_comma:
annotations
:
optional_dot
optional_comma
{
(
Parsing
.
rhs_start_pos
1
,
Parsing
.
symbol_end_pos
()
)
,
Parsing
.
rhs_end_pos
1
,
Parsing
.
rhs_start_pos
2
,
Parsing
.
rhs_end_pos
1
,
Parsing
.
rhs_start_pos
2
,
Parsing
.
rhs_start
1
,
$
1
,
$
2
}
raw_expr
:
...
...
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