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

Genlex.make_lexer documention mentions the wrong exception #5880

Closed
vicuna opened this issue Jan 9, 2013 · 1 comment
Closed

Genlex.make_lexer documention mentions the wrong exception #5880

vicuna opened this issue Jan 9, 2013 · 1 comment

Comments

@vicuna
Copy link

vicuna commented Jan 9, 2013

Original bug ID: 5880
Reporter: prevosto
Assigned to: @xclerc
Status: closed (set by @xavierleroy on 2015-12-11T18:18:25Z)
Resolution: fixed
Priority: normal
Severity: text
Version: 4.00.1
Fixed in version: 4.00.2+dev
Category: documentation

Bug description

The online manual says that the lexer returned by Genlex.make_lexer may raise Parse_error (I suppose that it should be interpreted as Parsing.Parse_error), but this is not what the implementation does (true in 4.00.0 as well as 4.00.1)

let lex = Genlex.make_lexer [];;

val lex : char Stream.t -> Genlex.token Stream.t =

let foo = Stream.of_string "()";;

val foo : char Stream.t =

let bar = lex foo;;

val bar : Genlex.token Stream.t =

Stream.next bar;;

Exception: Stream.Error "Illegal character (".

@vicuna
Copy link
Author

vicuna commented Jan 16, 2013

Comment author: @xclerc

Fixed in both '4.00' (revision 13246) and trunk (revision 13245) branches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant