meta data for this page
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
scan_statement [2020/09/25 11:02] – [The parameters of SCAN (assuming there are more than one) are not separated by a comma.] revusky | scan_statement [2021/02/08 18:09] – ↷ Links adapted because of a move operation revusky | ||
---|---|---|---|
Line 1: | Line 1: | ||
===== The new SCAN Statement ===== | ===== The new SCAN Statement ===== | ||
- | JavaCC 21 introduces a new '' | + | JavaCC 21 introduces a new '' |
Note, however, that the older '' | Note, however, that the older '' | ||
- | |||
Here is a rundown of the differences between '' | Here is a rundown of the differences between '' | ||
Line 99: | Line 98: | ||
==== The SCAN construct also allows the newer LOOKBEHIND construct. ==== | ==== The SCAN construct also allows the newer LOOKBEHIND construct. ==== | ||
- | This is [[LOOKBEHIND|outlined separately]]. | + | The [[contextual_predicates]] construct allows you to express conditions based on scanning backwards in the lookahead/ |
+ | |||
+ | You can find more information | ||
==== Addendum: the SCAN-less SCAN? ==== | ==== Addendum: the SCAN-less SCAN? ==== | ||
Line 158: | Line 159: | ||
</ | </ | ||
- | 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, | + | 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, |
+ | |||
+ | |||
+ | ==== Recap ==== | ||
+ | |||
+ | The new '' | ||
+ | * // | ||
+ | * [[semantic lookahead]], | ||
+ | * a [[contextual_predicates]] predicate | ||
+ | * [[syntactic lookahead]] | ||
+ | |||
+ | Caveats: | ||
+ | * The '' | ||
+ | * If no numerical or syntactic lookahead is specified, the generated code will scan ahead an // | ||
+ | |||
+ | Note that an empty SCAN statement can be simply written alternatively with a lone arrow, i.e. '' | ||
- | ===== The newer SCAN construct allows you to use the newer " | ||
- | This is documented separately. | ||