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
Raphaël Cauderlier
Sigmaid
Commits
9c8cd47c
Commit
9c8cd47c
authored
Jun 30, 2014
by
Raphaël Cauderlier
Browse files
print_pos don't fail, calling exception is reraised instead
parent
57c909f3
Changes
1
Hide whitespace changes
Inline
Side-by-side
sigmaid.ml
View file @
9c8cd47c
...
...
@@ -5,8 +5,7 @@ let print_pos lb =
let
cnum
=
start
.
Lexing
.
pos_cnum
-
start
.
Lexing
.
pos_bol
in
let
tok
=
Lexing
.
lexeme
lb
in
Format
.
eprintf
"File: %s, line: %d, column: %d, Token
\"
%s
\"
@
\n
@."
file
line
cnum
tok
;
exit
1
file
line
cnum
tok
let
rec
lex_prog
lb
=
try
...
...
@@ -14,8 +13,9 @@ let rec lex_prog lb =
let
lines
=
lex_prog
lb
in
(
pos
,
line
)
::
lines
with
End_of_file
->
[]
|
Parser
.
Error
->
print_pos
lb
|
e
->
print_pos
lb
;
raise
e
let
main
()
=
Arg
.
parse
[]
(
fun
file
->
...
...
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