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
53a4ae1c
Commit
53a4ae1c
authored
Oct 05, 2007
by
Pietro Abate
Browse files
[r2002-11-25 16:10:56 by cvscast] Empty log message
Original author: cvscast Date: 2002-11-25 16:11:30+00:00
parent
40b9f4e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
parser/wlexer.mll
View file @
53a4ae1c
...
...
@@ -35,6 +35,12 @@ classes
let
c
=
int_of_string
s
in
assert
(
c
<
256
);
(* TODO: handle Unicode *)
Char
.
chr
c
let
rec
tag_of_tag
s
i
=
match
s
.
[
i
]
with
|
'\008'
|
'\009'
|
'\010'
|
'\013'
|
'\032'
->
tag_of_tag
s
(
i
+
1
)
|
_
->
String
.
sub
s
i
(
String
.
length
s
-
i
)
}
...
...
@@ -48,9 +54,9 @@ rule token = parse
}
|
uppercase
identchar
*
(
'
:
'
identchar
+
)
*
{
"UIDENT"
,
Lexing
.
lexeme
lexbuf
}
|
ascii_digit
+
{
"INT"
,
Lexing
.
lexeme
lexbuf
}
|
"<"
(
lowercase
|
uppercase
)
identchar
*
{
|
"<"
blank
*
(
lowercase
|
uppercase
)
identchar
*
{
let
s
=
Lexing
.
lexeme
lexbuf
in
"TAG"
,
String
.
sub
s
1
(
String
.
length
s
-
1
)
"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