Navigation Menu

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

Lexer becomes very slow for large tokens #3211

Closed
vicuna opened this issue Feb 18, 2002 · 1 comment
Closed

Lexer becomes very slow for large tokens #3211

vicuna opened this issue Feb 18, 2002 · 1 comment
Labels

Comments

@vicuna
Copy link

vicuna commented Feb 18, 2002

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

Bug description

Full_Name: Gerd Stolpmann
Version: 3.04
OS: Linux
Submission from: pd9e26ad1.dip.t-dialin.net (217.226.106.209)

Hello,

I recently noticed a problem with ocamllex and very long tokens. Although
the lexing buffer grows as needed, this is done in a very unfortunate way
(see lexing.ml in stdlib). The lex_refill function fills the buffer from
the end to the beginning, and moves the whole contents every time the
next 512 bytes are added. Are there any good reasons for doing so? It
seems to be that it would be almost trivial to fill the buffer from the
beginning to the end.

The real world problem are XML files with large text sections that are
usually parsed as one token. A user of my XML parser has complained that
he cannot parse such files that seem to actually occur in practice.

Thank you in advance,

Gerd

@vicuna
Copy link
Author

vicuna commented Mar 6, 2002

Comment author: administrator

see #3216 for a possible fix

@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