You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 4200 Reporter:@dra27 Assigned to:@maranget Status: closed (set by @xavierleroy on 2009-03-31T11:02:55Z) Resolution: fixed Priority: normal Severity: text Version: 3.09.3 Fixed in version: 3.10.0 Category: ~DO NOT USE (was: OCaml general)
Bug description
If you bind a portion of a matched regular expression to a variable (e.g. [^ 'a'-'z' ]+ as name) and then don't use it in the lexer action block ({...}) then ocamlc issues Warning Y (by default) when you compile the .ml file.
The line number and file given for this warning refer to the ocamllex-compiled ML file and not to the actual source .mll file as other errors and warnings do.
ocamllex should insert additional # statements in the ML file before each "let foo = Lexing.sub_lexeme ..." line in its ML output.
Additional information
Of course, just inserting # {line} "{file}.mll" still means that the character reference number would be wrong, though I'm sure that some trickery with whitespace can be done to engineer the variable name in the ML file being at the same place as in the .mll file to fix this too!
Definitely a cosmetic change, though...
The text was updated successfully, but these errors were encountered:
Original bug ID: 4200
Reporter: @dra27
Assigned to: @maranget
Status: closed (set by @xavierleroy on 2009-03-31T11:02:55Z)
Resolution: fixed
Priority: normal
Severity: text
Version: 3.09.3
Fixed in version: 3.10.0
Category: ~DO NOT USE (was: OCaml general)
Bug description
If you bind a portion of a matched regular expression to a variable (e.g. [^ 'a'-'z' ]+ as name) and then don't use it in the lexer action block ({...}) then ocamlc issues Warning Y (by default) when you compile the .ml file.
The line number and file given for this warning refer to the ocamllex-compiled ML file and not to the actual source .mll file as other errors and warnings do.
ocamllex should insert additional # statements in the ML file before each "let foo = Lexing.sub_lexeme ..." line in its ML output.
Additional information
Of course, just inserting # {line} "{file}.mll" still means that the character reference number would be wrong, though I'm sure that some trickery with whitespace can be done to engineer the variable name in the ML file being at the same place as in the .mll file to fix this too!
Definitely a cosmetic change, though...
The text was updated successfully, but these errors were encountered: