Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
why3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Monitor
Service Desk
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Why3
why3
Commits
ae1037fb
Commit
ae1037fb
authored
14 years ago
by
Andrei Paskevich
Browse files
Options
Downloads
Patches
Plain Diff
labels w/ location: "label" ` lnum ` bol ` cnum1 ` cnum2 ` "filename"
parent
7d4be12e
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/parser/lexer.mll
+2
-0
2 additions, 0 deletions
src/parser/lexer.mll
src/parser/parser.mly
+22
-3
22 additions, 3 deletions
src/parser/parser.mly
with
24 additions
and
3 deletions
src/parser/lexer.mll
+
2
−
0
View file @
ae1037fb
...
...
@@ -171,6 +171,8 @@ rule token = parse
{
comment_start_loc
:=
loc
lexbuf
;
comment
lexbuf
;
token
lexbuf
}
|
"'"
{
QUOTE
}
|
"`"
{
BACKQUOTE
}
|
","
{
COMMA
}
|
"("
...
...
This diff is collapsed.
Click to expand it.
src/parser/parser.mly
+
22
−
3
View file @
ae1037fb
...
...
@@ -72,6 +72,15 @@
let
infix
s
=
"infix "
^
s
let
prefix
s
=
"prefix "
^
s
let
user_loc
fname
lnum
bol
cnum1
cnum2
=
let
pos
=
{
Lexing
.
pos_fname
=
fname
;
Lexing
.
pos_lnum
=
lnum
;
Lexing
.
pos_bol
=
bol
;
Lexing
.
pos_cnum
=
cnum1
}
in
pos
,
{
pos
with
Lexing
.
pos_cnum
=
cnum2
}
let
()
=
Exn_printer
.
register
(
fun
fmt
exn
->
match
exn
with
|
Parsing
.
Parse_error
->
Format
.
fprintf
fmt
"syntax error"
...
...
@@ -98,7 +107,7 @@
/*
symbols
*/
%
token
ARROW
ASYM_AND
ASYM_OR
%
token
BAR
%
token
BACKQUOTE
BAR
%
token
COLON
COMMA
%
token
DOT
EQUAL
LTGT
%
token
LEFTPAR
LEFTPAR_STAR_RIGHTPAR
LEFTSQ
...
...
@@ -441,8 +450,8 @@ lexpr:
{
mk_pp
(
PPif
(
$
2
,
$
4
,
$
6
))
}
|
quant
list1_param_var_sep_comma
triggers
DOT
lexpr
{
mk_pp
(
PPquant
(
$
1
,
$
2
,
$
3
,
$
5
))
}
|
STRING
lexpr
%
prec
prec_named
{
mk_pp
(
PPnamed
(
Ident
.
label
~
loc
:
(
loc
()
)
$
1
,
$
2
))
}
|
label
lexpr
%
prec
prec_named
{
mk_pp
(
PPnamed
(
$
1
,
$
2
))
}
|
LET
pattern
EQUAL
lexpr
IN
lexpr
{
match
$
2
.
pat_desc
with
|
PPpvar
id
->
mk_pp
(
PPlet
(
id
,
$
4
,
$
6
))
...
...
@@ -694,6 +703,16 @@ qualid:
/*
Misc
*/
label
:
|
STRING
{
Ident
.
label
$
1
}
|
STRING
BACKQUOTE
INTEGER
BACKQUOTE
INTEGER
BACKQUOTE
INTEGER
BACKQUOTE
INTEGER
BACKQUOTE
STRING
{
let
loc
=
user_loc
$
11
(
int_of_string
$
3
)
(
int_of_string
$
5
)
(
int_of_string
$
7
)
(
int_of_string
$
9
)
in
Ident
.
label
~
loc
$
1
}
;
bar_
:
|
/*
epsilon
*/
{
()
}
|
BAR
{
()
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment