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

The return value for Lexing.lexeme_end is incorrectly documented #4837

Closed
vicuna opened this issue Jul 16, 2009 · 1 comment
Closed

The return value for Lexing.lexeme_end is incorrectly documented #4837

vicuna opened this issue Jul 16, 2009 · 1 comment

Comments

@vicuna
Copy link

vicuna commented Jul 16, 2009

Original bug ID: 4837
Reporter: rdr
Status: closed (set by @damiendoligez on 2011-05-31T14:17:18Z)
Resolution: fixed
Priority: normal
Severity: trivial
Version: 3.11.0
Fixed in version: 3.13.0+dev
Category: documentation

Bug description

In 12.2.5 of the Ocaml Reference Manual lexeme_end is documented as returning:

"... the absolute position in the input text of
the end of the matched string."

The offset returned is actually of the first character past the matched string. This is correctly documented in the documentation for the Lexing module.

@vicuna
Copy link
Author

vicuna commented Jul 17, 2009

Comment author: @damiendoligez

Actually, positions are not character offsets, they lie between characters. The position of the end of the substring is indeed the offset of the next character after the substring, which is also the position of the start plus the length of the substring.

Still, we need to make the doc clearer about that.

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