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
d4737ec1
Commit
d4737ec1
authored
Dec 14, 2014
by
Kim Nguyễn
Browse files
Add a missing function to the Loc module in ulexer.ml (so that the current trunk
compiles with the patched camlp4 bundled with fedora 21)
parent
912c5b2c
Changes
1
Hide whitespace changes
Inline
Side-by-side
parser/ulexer.ml
View file @
d4737ec1
...
...
@@ -14,6 +14,7 @@ module Loc = struct
let
to_tuple
_
=
assert
false
let
merge
(
x1
,
x2
)
(
y1
,
y2
)
=
(
min
x1
y1
,
max
x2
y2
)
let
smart_merge
a
b
=
merge
a
b
let
join
(
x1
,
_
)
=
(
x1
,
x1
)
let
move
_
_
_
=
assert
false
let
shift
_
_
=
assert
false
...
...
@@ -228,7 +229,7 @@ let rec token = lexer
| "
[
" ->
incr in_brackets;
return lexbuf (KEYWORD (L.utf8_lexeme lexbuf))
| "
]
" ->
| "
]
" ->
decr in_brackets;
return lexbuf (KEYWORD (L.utf8_lexeme lexbuf))
| '"
'
->
...
...
@@ -284,10 +285,10 @@ and token2 = lexer
| ".."
| ["?+*"] "?" | "#" ->
return lexbuf (KEYWORD (L.utf8_lexeme lexbuf))
| "[" ->
| "[" ->
incr in_brackets;
return lexbuf (KEYWORD (L.utf8_lexeme lexbuf))
| "]" ->
| "]" ->
decr in_brackets;
return lexbuf (KEYWORD (L.utf8_lexeme lexbuf))
| '"' ->
...
...
@@ -354,10 +355,10 @@ and token2toplevel = lexer
| ".."
| ["?+*"] "?" | "#" ->
return lexbuf (KEYWORD (L.utf8_lexeme lexbuf))
| "[" ->
| "[" ->
incr in_brackets;
return lexbuf (KEYWORD (L.utf8_lexeme lexbuf))
| "]" ->
| "]" ->
decr in_brackets;
return lexbuf (KEYWORD (L.utf8_lexeme lexbuf))
| '"' ->
...
...
@@ -442,7 +443,7 @@ and string start endchar = lexer
let token lexbuf =
if !in_brackets = 0 then token lexbuf
else if !toplevel then token2toplevel lexbuf
else if !toplevel then token2toplevel lexbuf
else token2 lexbuf
let lexbuf = ref None
...
...
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