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
b10a111f
Commit
b10a111f
authored
Jul 10, 2007
by
Pietro Abate
Browse files
[r2003-05-11 08:56:18 by cvscast] Unary minus in integer litterals
Original author: cvscast Date: 2003-05-11 08:56:18+00:00
parent
a33d893e
Changes
2
Hide whitespace changes
Inline
Side-by-side
parser/wlexer.ml
View file @
b10a111f
...
...
@@ -124,16 +124,16 @@ let lex_tables = {
\250\255\249\255\255\255\029\000\253\255\020\000\252\255\252\255
\
\251\255\010\000\003\000\253\255\247\255\246\255\019\000\049\000
\
\062\000\018\000\035\000\037\000\250\255\060\000\027\000\036\000
\
\06
3
\000\024\000\030\000\041\000\041\000\249\255\250\255\248\255
\
\0
79
\000\082\000\08
6
\000\09
9
\000\
065
\000\10
3
\000\11
6
\000\1
20
\000
\
\13
3
\000\1
37
\000\15
0
\000\0
71
\000
"
;
\06
8
\000\024\000\030\000\041\000\041\000\249\255\250\255\248\255
\
\0
65
\000\082\000\08
4
\000\09
7
\000\
101
\000\10
5
\000\11
8
\000\1
35
\000
\
\13
9
\000\1
52
\000\15
6
\000\0
69
\000
"
;
Lexing
.
lex_backtrk
=
"
\255\255\255\255\255\255\255\255\255\255\001\000\255\255\255\255
\
\255\255\255\255\255\255\004\000\255\255\255\255\255\255\255\255
\
\255\255\004\000\004\000\255\255\255\255\255\255\000\000\001\000
\
\002\000\003\000\005\000\005\000\255\255\005\000\005\000\005\000
\
\005\000\005\000\005\000\005\000\005\000\255\255\255\255\255\255
\
\255\255\004\000\255\255\004\000\
003\000\
002\000\255\255\002\000
\
\003\000
\255\255\004\000\255\255\004\000\002\000\255\255\002\000
\
\001\000\255\255\001\000\000\000
"
;
Lexing
.
lex_default
=
"
\028\000\016\000\009\000\004\000\000\000\255\255\255\255\000\000
\
...
...
@@ -147,27 +147,27 @@ let lex_tables = {
"
\020\000\021\000\021\000\022\000\023\000\024\000\025\000\023\000
\
\026\000\027\000\005\000\006\000\015\000\029\000\030\000\031\000
\
\032\000\033\000\008\000\007\000\007\000\034\000\051\000\006\000
\
\04
4
\000\035\000\013\000\036\000\033\000\017\000\037\000\007\000
\
\037\000\012\000\014\000\013\000\004\000\018\000\04
0
\000\04
1
\000
\
\04
1
\000\038\000\019\000\038\000\019\000\038\000\038\000\038\000
\
\04
0
\000\035\000\013\000\036\000\033\000\017\000\037\000\007\000
\
\037\000\012\000\014\000\013\000\004\000\018\000\04
1
\000\04
2
\000
\
\04
2
\000\038\000\019\000\038\000\019\000\038\000\038\000\038\000
\
\010\000\011\000\010\000\038\000\038\000\048\000\048\000\048\000
\
\048\000\038\000\039\000\004\000\004\000\004\000\049\000\038\000
\
\038\000\048\000\045\000\045\000\045\000\045\000\038\000\04
4
\000
\
\0
38
\000\038\000\0
51
\000\046\000\000\000\0
00
\000\045\000\0
38
\000
\
\000\000\048\000\0
4
0\000\0
41
\000\0
41\000\000
\000\041\000\04
1
\000
\
\04
1
\000\04
1
\000\04
3
\000\04
3
\000\0
43
\000\0
43
\000\045\000\0
42
\000
\
\000\000\0
00\000\041
\000\000\000\000\000\000\000\04
3
\000\04
3
\000
\
\04
3
\000\04
3
\000\04
3
\000\04
5
\000\045\000\045\000\045\000\
000\000
\
\04
2
\000\0
00
\000\04
1
\000\0
43
\000\04
6
\000\0
00
\000\04
3
\000\0
45
\000
\
\0
47
\000\047\000\047\000\047\000\047\000\0
47\000\047
\000\0
47
\000
\
\000\000\000\000\000\000\0
43\000\047
\000\04
6
\000\000\000\
045\
000
\
\0
47
\000\04
8
\000\0
48
\000\04
8
\000\04
8
\000\0
50
\000\0
50
\000\0
50
\000
\
\0
50
\000\0
00
\000\04
9
\000\000\000\04
7
\000\
048\
000\000\0
00
\000\000
\
\04
7
\000\050\000\050\000\050\000\050\000\
050\000\000\000\000\000
\
\0
0
0\000\0
0
0\000\0
0
0\000\0
49
\000\000\000\0
48\
00
0
\0
5
0\000\000\000
\
\0
0
0\000\0
50
\000\000\000\0
00
\000\0
0
0\000\000\000\000\000\000\000
\
\000\000\000\000\000\000\000\000\000\000\000\000\0
5
0\000\000\000
\
"
;
\038\000\048\000\045\000\045\000\045\000\045\000\038\000\04
0
\000
\
\0
51
\000\038\000\0
40
\000\046\000\000\000\0
38
\000\045\000\0
00
\000
\
\000\000\048\000\0
0
0\000\0
00
\000\0
38
\000\041\000\04
2\000\042
\000
\
\04
2
\000\04
2
\000\04
2
\000\04
2
\000\0
00
\000\0
00
\000\045\000\0
00
\000
\
\000\000\0
43
\000\000\000\000\000\
042\
000\0
44\
00
0
\04
4
\000\04
4
\000
\
\04
4
\000\04
4
\000\04
4
\000\04
4\000\044
\000\045\000\045\000\045\000
\
\04
5
\000\0
44
\000\04
3
\000\0
00
\000\04
2
\000\0
44
\000\04
6
\000\0
00
\000
\
\0
00\000\045
\000\047\000\047\000\047\000\047\000\0
00
\000\0
00
\000
\
\000\000\
044\
000\000\000\000\0
00\000
\000\04
4
\000\0
47\
00
0
\000\000
\
\0
00
\000\04
5
\000\0
00
\000\04
7
\000\04
7
\000\0
47
\000\0
47
\000\0
48
\000
\
\0
48
\000\0
48
\000\04
8
\000\000\000\04
6
\000\000\000\0
47
\000\
047\
000
\
\04
9\000\000\000\000\000\048
\000\050\000\050\000\050\000\050\000
\
\0
5
0\000\0
5
0\000\0
5
0\000\0
50
\000\000\000\000\0
0
0\000\000\
047\
000
\
\0
5
0\000\0
49
\000\000\000\0
48
\000\0
5
0\000\000\000\000\000\000\000
\
\000\000\000\000\000\000\000\000\000\000\000\000\0
0
0\000\000\000
\
\050\000\000\000\000\000\000\000\050\000\000\000
"
;
Lexing
.
lex_check
=
"
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000
\
\000\000\000\000\003\000\005\000\001\000\000\000\000\000\000\000
\
...
...
@@ -177,22 +177,22 @@ let lex_tables = {
\026\000\030\000\001\000\026\000\001\000\026\000\027\000\027\000
\
\002\000\002\000\002\000\031\000\033\000\023\000\023\000\023\000
\
\023\000\034\000\035\000\011\000\011\000\011\000\023\000\036\000
\
\031\000\023\000\024\000\024\000\024\000\024\000\029\000\04
4
\000
\
\0
32
\000\029\000\0
51
\000\024\000\255\255\
255\255
\024\000\
032\000
\
\255\255\023\000\
040\000\040
\000\04
0
\000\
255\255\
041\000\041\000
\
\04
1\000\041
\000\042\000\042\000\042\000\
042\000
\024\000\
041\000
\
\255\255\
255\255\
04
1
\000\255\255\255\255\
255\255
\04
2
\000\043\000
\
\043\000\04
3
\000\04
3
\000\045\000\045\000\045\000\
045\000\255\255
\
\04
3\000\255\255\041
\000\043\000\04
5
\000\255\255\042\000\04
5\000
\
\046\000\046\000\046\000\046\000\
047\000\047\000\047\000\047\000
\
\255\255\255\255\255\255\
043\000
\04
6
\000\04
7
\000\255\255\
045\000
\
\
047\000
\04
8
\000\
048\000
\04
8
\000\04
8
\000\04
9
\000\04
9
\000\04
9
\000
\
\04
9
\000\255\255\04
8
\000\255\255\046\000\04
8
\000\
255\255\255\255
\
\04
7
\000\04
9
\000\0
50
\000\0
50
\000\0
50
\000\0
50
\000\
255\255\255\255
\
\
255\255
\255\255\255\255\
050\000\
255\255\04
8
\000\
050\000\255\255
\
\255\255
\049\000\
255\255
\255\255\
255\255
\255\255\255\255\255\255
\
\255\255\255\255\255\255\255\255\255\255\255\255\
050\000
\255\255
\
"
\031\000\023\000\024\000\024\000\024\000\024\000\029\000\04
0
\000
\
\0
51
\000\029\000\0
32
\000\024\000\255\255\
032\000
\024\000\
255\255
\
\255\255\023\000\
255\255\255\255\032
\000\04
1
\000\041\000\041\000
\
\04
2
\000\042\000\042\000\042\000\
255\255\255\255
\024\000\
255\255
\
\255\255\04
2
\000\255\255\255\255\
042\000\043\000
\04
3
\000\043\000
\
\043\000\04
4
\000\04
4\000\044\000\044
\000\045\000\045\000\045\000
\
\04
5
\000\043\000\04
4
\000\255\255\042\000\04
4\000\045\000\255\255
\
\255\255\045\000
\046\000\046\000\046\000\046\000\
255\255\255\255
\
\255\255\
043\000\255\
255\255\255\255\
255
\04
4
\000\04
6
\000\255\255
\
\
255\255
\04
5
\000\
255\255
\04
7
\000\04
7
\000\04
7
\000\04
7
\000\04
8
\000
\
\04
8\000\048\000\048
\000\255\255\04
7
\000\255\255\046\000\04
7
\000
\
\04
8
\000\
255\255\255\255\
04
8
\000\0
49
\000\0
49
\000\0
49
\000\0
49
\000
\
\
050\000\050\000\050\000\050\000
\255\255\255\255\255\255\04
7
\000
\
\049\000\
050\000
\255\255\
048\000\050\000
\255\255\255\255\255\255
\
\255\255\255\255\255\255\255\255\255\255\255\255\
255\255
\255\255
\
\049\000\255\255\255\255\255\255\050\000\255\255
"
}
let
rec
token
engine
lexbuf
=
...
...
@@ -211,7 +211,7 @@ let rec token engine lexbuf =
"UIDENT"
,
Lexing
.
lexeme
lexbuf
)
|
3
->
(
#
77
"parser/wlexer.mll"
"INT"
,
Lexing
.
lexeme
lexbuf
)
"INT"
,
Lexing
.
lexeme
lexbuf
)
|
4
->
(
#
78
"parser/wlexer.mll"
...
...
parser/wlexer.mll
View file @
b10a111f
...
...
@@ -74,7 +74,7 @@ rule token = parse
if
Hashtbl
.
mem
keywords
s
then
""
,
s
else
"LIDENT"
,
s
}
|
uppercase
ident
{
"UIDENT"
,
Lexing
.
lexeme
lexbuf
}
|
ascii_digit
+
{
"INT"
,
Lexing
.
lexeme
lexbuf
}
|
'
-
'
?
ascii_digit
+
{
"INT"
,
Lexing
.
lexeme
lexbuf
}
|
"<"
blank
*
(
lowercase
|
uppercase
)
ident
{
let
s
=
Lexing
.
lexeme
lexbuf
in
"TAG"
,
tag_of_tag
s
1
...
...
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