Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ident cannot start with an underscore ('_") in genlex.ml #3237

Closed
vicuna opened this issue Mar 5, 2002 · 1 comment
Closed

ident cannot start with an underscore ('_") in genlex.ml #3237

vicuna opened this issue Mar 5, 2002 · 1 comment
Labels

Comments

@vicuna
Copy link

vicuna commented Mar 5, 2002

Original bug ID: 959
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

Sorry, I accidentally send that message before it was completed.

I start again.

The documentation of genlex does not say that an ident cannot start by a
'_', whereas the code does.

from genlex.ml, line 59
let rec next_token (strm__ : _ Stream.t) =
match Stream.peek strm__ with
Some (' ' | '\010' | '\013' | '\009' | '\026' | '\012') ->
Stream.junk strm__; next_token strm__
| Some ('A'..'Z' | 'a'..'z' | '\192'..'\255' as c) ->
^^^

probably a
| '_'
is missing there, or the doc should be change.

let ss= lexer (Stream.of_string "_toto");;

val ss : Genlex.token Stream.t =

next ss;;

Exception: Stream.Error "Illegal character _".

--
R1.

@vicuna
Copy link
Author

vicuna commented Mar 11, 2002

Comment author: administrator

Fixed 2002-03-11 by XL

@vicuna vicuna closed this as completed Mar 11, 2002
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant