
| Key: |
ANTLR-144
|
| Type: |
Bug
|
| Status: |
Closed
|
| Resolution: |
Fixed
|
| Priority: |
Major
|
| Assignee: |
Jim Idle
|
| Reporter: |
Jim Idle
|
| Votes: |
0
|
| Watchers: |
0
|
|
If you were logged in you would be able to see more operations.
|
|
|
ANTLR v3
Created: 19/Jun/07 08:40 AM
Updated: 02/Jun/08 11:38 AM
Due: 24/Jun/07
|
|
| Component/s: |
C Target
|
| Affects Version/s: |
3.0
|
| Fix Version/s: |
3.0
|
|
|
Environment:
|
Any platform.
|
|
|
When trying to imlpement INCLUDE functinoality in a lexer, the setCharStrem() works properly for the actaul input but when a token is finally asked for its text, it retrieves the text from jstu the firs tinput stream. It seems that the tokens are not tracking their input stream correctly. Either that, or the way to do this in C needs to be documented.
|
|
Description
|
When trying to imlpement INCLUDE functinoality in a lexer, the setCharStrem() works properly for the actaul input but when a token is finally asked for its text, it retrieves the text from jstu the firs tinput stream. It seems that the tokens are not tracking their input stream correctly. Either that, or the way to do this in C needs to be documented. |
Show » |
|
The C example set has been updated to cater for the #include statement in the C parser example, which now uses the stacked input streams.
new macros:
PUSHSTREAM(i) - i is a pANTLR3_INPUT_STREAM
POPSTREAM() - reverts to the prior intput stream if available and handled automaticaly by the built in nextToken method.