Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
POTTIER Francois
menhir
Commits
2352844c
Commit
2352844c
authored
May 09, 2017
by
POTTIER Francois
Browse files
Always include line number directives in generated .ml files.
parent
15021b8a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/back.ml
View file @
2352844c
...
...
@@ -35,16 +35,16 @@ let write program =
let
filename
=
Settings
.
base
^
".ml"
let
f
=
open_out
filename
let
locate_stretches
=
if
Settings
.
infer
then
(* Typechecking should not fail at this stage. Omit #line directives. *)
None
else
(* 2011/10/19: do not use [Filename.basename]. The [#] annotations that
we insert in the [.ml] file must retain their full path. This does
mean that the [#] annotations depend on how menhir is invoked -- e.g.
[menhir foo/bar.mly] and [cd foo && menhir bar.mly] will produce
different files. Nevertheless, this seems
useful/reasonable. *)
Some
filename
(* 2017/05/09: always include line number directives in generated .ml
files. Indeed, they affect the semantics of [assert] instructions
in the semantic actions. *)
(* 2011/10/19: do not use [Filename.basename]. The line number
directives that we insert in the [.ml] file must retain their full
path. This does mean that the line number directives depend on how
menhir is invoked -- e.g. [menhir foo/bar.mly] and [cd foo && menhir
bar.mly] will produce different files. Nevertheless, this seems
useful/reasonable. *)
Some
filename
end
)
in
P
.
program
program
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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