Opened 12 years ago
Closed 12 years ago
#39 closed defect (fixed)
Parsing problems with ifpresent
Reported by: | phdmakk | Owned by: | phdmakk |
---|---|---|---|
Priority: | blocker | Milestone: | v1.0.x Series |
Component: | Common | Version: | 1.0 |
Keywords: | Cc: |
Description
For some reason ifpresent causes parsing problems when more than two parameters are used in the following example:
v_MyRecord2b.MyRecord1a := cr_MyRecord1(42, 49) ifpresent; // 2 parameters: works v_MyRecord2b.MyRecord1b := cr_MyRecord1(42, 49, 42) ifpresent; // 3 parameters: causes runtime err
On the other hand, if ifpresent is not used, three or more parameters are fine:
v_MyRecord2b.MyRecord1b := cr_MyRecord1(42, 49, 42); // 3 parameters no ifpresent: runs fine
Change History (1)
comment:1 Changed 12 years ago by phdmakk
- Resolution set to fixed
- Status changed from new to closed
Note: See
TracTickets for help on using
tickets.
The issue was caused apparently by the limited token window in ANTLR that apparently depends on calling LA(lookahead), only it gets called implicitly just once in that context. Adding automated token window expansion by explicitly calling LA() with incremental lookahead length until either desired token is found or the end of the statement or file has been reached (as it should have been working by default) seems to resolve the issue (although not in the nicest of ways). This is now resolved, but the other similar methods need to be investigated as well for potential quiet issues.