bugGrammatica - Bugs: bug #4500, Parser: Several runs should be...


You are not allowed to post comments on this tracker with your current authentication level.

bug #4500: Parser: Several runs should be possible with a single parser instance

Submitter:  Per Cederberg <cederberg>
Submitted:  Sun 27 Jul 2003 02:19:15 PM UTC
Severity:  5 - Major Item Group:  Future Improvement
Status:  Fixed Assigned to:  cederberg
Open/Closed:  Closed

Discussion locked!

Sat 14 Mar 2009 09:35:31 AM UTC, comment #2: 

Version 1.5 was released on 2009-03-07. Closing this issue.

Per Cederberg <cederberg>
Project Administrator
Thu 22 Apr 2004 10:04:12 PM UTC, comment #1: 

New reset() methods have been added to the Parser and Tokenizer classes. The Tokenizer internals had to be heavily modified, though, breaking out the character buffer into a new LookAheadReader class. The only API breakage resulting from this was in the regular expression classes, where the match method can now throw an IOException while matching an input stream. When matching normal strings this exception can be ignored (apart from the compilation error it may cause under Java).

NOTE: The API breakage ONLY affects code calling the regexp library directly, and does NOT affect normal parsers (where access is handled by the updated Tokenizer class).

These changes are available in CVS and will be released in version 1.5.

Per Cederberg <cederberg>
Project Administrator
Sun 27 Jul 2003 02:19:15 PM UTC, original submission:  

A single parser instance should be possible to use for parsing several files, something not allowed by the current API. The current solution is ineffective when parsing several files through the same parser, as the look-ahead token sets must be calculated again every time a parser is created (i.e. every time a file is parsed).

Fixing this issue requires breaking or adding to the API. Two solutions would be possible, either by keeping the current semantics of creating a new parser for each file and introducing a Grammar object or similar to hold the look-aheads. Or, by adding a new parse() method that accepts a tokenizer or similar directly.

Per Cederberg <cederberg>
Project Administrator


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by cederberg (Posted a comment)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.




    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2009-03-14 cederberg Open/ClosedOpen Closed
        Discussion LockUnlocked Locked
    2004-04-22 cederberg StatusNone Fixed
        Assigned toNone cederberg

    Back to the top

    Powered by Savane 3.11