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
3b42bafb
Commit
3b42bafb
authored
Jul 10, 2014
by
Julien Lopez
Browse files
Bug fix in lexer
parent
c6997a74
Changes
1
Hide whitespace changes
Inline
Side-by-side
parser/ulexer.ml
View file @
3b42bafb
...
...
@@ -289,9 +289,10 @@ and token2 = lexer
let
s
=
get_stored_string
()
in
return_loc
start
(
L
.
lexeme_end
lexbuf
)
(
STRING2
s
)
|
_
->
assert
false
)
()
lexbuf
|
"(
'"
ncname
")"
->
|
"(
"
[
"
\t
"
]
*
"'"
ncname
[
"
\t
"
]
*
")"
->
let
s
=
L
.
utf8_lexeme
lexbuf
in
let
s
=
String
.
sub
s
1
(
String
.
length
s
-
1
)
in
let
s
=
Str
.
global_replace
(
Str
.
regexp
"[
\t
]"
)
""
s
in
let
s
=
String
.
sub
s
2
(
String
.
length
s
-
3
)
in
return
lexbuf
(
PTYPE
s
)
|
"'"
ncname
->
let
s
=
L
.
utf8_lexeme
lexbuf
in
...
...
@@ -348,9 +349,10 @@ and token2toplevel = lexer
let
s
=
get_stored_string
()
in
return_loc
start
(
L
.
lexeme_end
lexbuf
)
(
STRING2
s
)
|
_
->
assert
false
)
()
lexbuf
|
"(
'"
ncname
")"
->
|
"(
"
[
"
\t
"
]
*
"'"
ncname
[
"
\t
"
]
*
")"
->
let
s
=
L
.
utf8_lexeme
lexbuf
in
let
s
=
String
.
sub
s
1
(
String
.
length
s
-
1
)
in
let
s
=
Str
.
global_replace
(
Str
.
regexp
"[
\t
]"
)
""
s
in
let
s
=
String
.
sub
s
2
(
String
.
length
s
-
3
)
in
return
lexbuf
(
PTYPE
s
)
|
"'"
ncname
->
let
s
=
L
.
utf8_lexeme
lexbuf
in
...
...
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