meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
lookbehind [2020/09/25 12:02] – [Summary] revuskylookbehind [2020/10/22 02:41] – [Summary] revusky
Line 87: Line 87:
 In the above we specify that Foo must be //non-reentrant// and also that the next 2 tokens must be "bar" followed by "baz", or else we jump out of the loop. In the above we specify that Foo must be //non-reentrant// and also that the next 2 tokens must be "bar" followed by "baz", or else we jump out of the loop.
  
-NB. If you have a ''SCAN'' statement that does not specify either numerical or syntactic lookahead, then the generated code will scan ahead an //unlimited// number of tokens. (Unless the expansion to be parsed is constrained by an [[up-to-here]] marker.) This is a key characteristic of the newer [[scan statement]].+NB. If you have a ''SCAN'' statement that does not specify either numerical or syntactic lookahead, then the generated code will scan ahead an //unlimited// number of tokens. (Unless the expansion to be parsed is constrained by an [[up to here]] marker.) This is a key characteristic of the newer [[scan statement]].
  
 Note also that //lookbehind predicates//, like syntactic lookahead in JavaCC 21, can be nested arbitrarily and work in an arbitrarily nested scanahead routine. Note also that //lookbehind predicates//, like syntactic lookahead in JavaCC 21, can be nested arbitrarily and work in an arbitrarily nested scanahead routine.