| Anonymous | Login | Signup for a new account | 2013-05-26 10:19 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||||
| 0005765 | OCaml | OCaml tools (ocaml{lex,yacc,dep,browser}) | public | 2012-09-23 11:08 | 2012-09-29 22:25 | ||||||
| Reporter | Martin Jambon | ||||||||||
| Assigned To | |||||||||||
| Priority | normal | Severity | minor | Reproducibility | always | ||||||
| Status | confirmed | Resolution | open | ||||||||
| Platform | OS | OS Version | |||||||||
| Product Version | 4.00.0 | ||||||||||
| Target Version | 4.00.2+dev | Fixed in Version | |||||||||
| Summary | 0005765: ocamllex doesn't preserve line directives | ||||||||||
| Description | When ocamllex encounters a line directive in its input, it does not take it into account when outputting new line directives. This is problematic for ocamllex files that are generated from a template or extracted from a larger source file. Interestingly, errors in the input of ocamllex are reported correctly, obeying line directives. | ||||||||||
| Steps To Reproduce | martin@m1 ~/tmp $ cat toto.mll # 100 "toto.mlx" rule f = parse 'x' { true } | "" { false } martin@m1 ~/tmp $ ocamllex -v The OCaml lexer generator, version 4.00.0 martin@m1 ~/tmp $ ocamllex toto.mll 2 states, 257 transitions, table size 1040 bytes martin@m1 ~/tmp $ grep mlx toto.ml || echo nope. nope. | ||||||||||
| Tags | No tags attached. | ||||||||||
| Attached Files | |||||||||||
Notes |
|
|
(0008175) doligez (manager) 2012-09-29 22:25 |
It's even stranger than you think: the line numbers are reported correctly, but not the file name. Try this: $ cat toto.mll # 100 "toto.mlx" rule f = parse 'x' { true } | "" { false+1 } $ ocamllex toto.mll 2 states, 257 transitions, table size 1040 bytes $ ocamlc -c toto.ml File "toto.mll", line 102, characters 7-12: Error: This expression has type bool but an expression was expected of type int |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2012-09-23 11:08 | Martin Jambon | New Issue | |
| 2012-09-29 22:25 | doligez | Note Added: 0008175 | |
| 2012-09-29 22:25 | doligez | Status | new => confirmed |
| 2012-09-29 22:25 | doligez | Target Version | => 4.00.2+dev |
| Copyright © 2000 - 2011 MantisBT Group |