User Tools

Site Tools


scan_statement

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
scan_statement [2020/09/26 22:29]
revusky [The newer SCAN construct allows you to use the newer "lookbehind" construct]
scan_statement [2021/02/08 18:16] (current)
revusky
Line 96: Line 96:
  
  
-==== The SCAN construct also allows the newer LOOKBEHIND construct. ====+==== The SCAN construct also you to use contextual predicates. ====
  
-The [[lookbehind]] construct allows you to express conditions based on scanning backwards in the lookahead/call stack. This can only be used in conjunction with the newer ''SCAN'' statement, not with the legacy ''LOOKAHEAD'' construct. +The [[contextual_predicates]] construct allows you to express conditions based on scanning backwards in the lookahead/call stack. This can only be used in conjunction with the newer ''SCAN'' statement, not with the legacy ''LOOKAHEAD'' construct. 
  
-You can find more information [[lookbehind|here]].+You can find more information [[contextual_predicates|here]].
  
 ==== Addendum: the SCAN-less SCAN? ==== ==== Addendum: the SCAN-less SCAN? ====
Line 159: Line 159:
 </code> </code>
  
-In this case, because I think it is so common, we decided to allow this. And, in fact, you can see that this is already used in internal development, for example [[https://github.com/javacc21/javacc21/blob/master/src/main/grammars/JavaCC.javacc#L1028|here]].+In this case, because I think it is so common, we decided to allow this. And, in fact, you can see that this is already used in internal development, for example [[https://github.com/javacc21/javacc21/blob/master/src/main/grammars/JavaCC.javacc#L1950|here]].
  
  
Line 167: Line 167:
   * //numerical// lookahead, i.e. the maximum number of tokens to scan ahead   * //numerical// lookahead, i.e. the maximum number of tokens to scan ahead
   * [[semantic lookahead]], i.e. arbitrary java code enclosed in {..}   * [[semantic lookahead]], i.e. arbitrary java code enclosed in {..}
-  * a [[lookbehind]] predicate+  * a [[contextual_predicates]] predicate
   * [[syntactic lookahead]]   * [[syntactic lookahead]]
  
scan_statement.1601159347.txt.gz · Last modified: 2020/09/26 22:29 by revusky