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 revision
Previous revision
Next revisionBoth sides next revision
new_syntax_summary [2020/07/20 21:24] – [A list of lexical specifications, a.k.a. Token Productions can be written without the curly braces.] revuskynew_syntax_summary [2020/09/26 23:43] – [New "up to here" syntax] revusky
Line 1: Line 1:
-====== Summary of the Newer Streamlined Syntax ======+====== Overview of the Newer Streamlined Syntax ======
  
 The following is a summary of the newer streamlined syntax that was recently [[https://javacc.com/2020/07/07/announce-new-syntax/|announced here.]] The following is a summary of the newer streamlined syntax that was recently [[https://javacc.com/2020/07/07/announce-new-syntax/|announced here.]]
Line 5: Line 5:
 I anticipate that there will soon be a utility available that automatically converts the legacy syntax to the streamlined syntax. In any case, there is no need to manually convert all of your code to the more streamlined syntax, since all the legacy syntax continues to work. Moreover, the two syntaxes can co-exist perfectly well in the same file. I anticipate that there will soon be a utility available that automatically converts the legacy syntax to the streamlined syntax. In any case, there is no need to manually convert all of your code to the more streamlined syntax, since all the legacy syntax continues to work. Moreover, the two syntaxes can co-exist perfectly well in the same file.
  
-This page does not describe the new ''%%SCAN%%'' construct which is meant to supersede ''%%LOOKAHEAD%%''. That will be outlined separately. 
  
 ===== Nonterminals ===== ===== Nonterminals =====
Line 125: Line 124:
 <code> <code>
  INJECT MyNode :  INJECT MyNode :
-     import java.util.*;+     import java.util.List;
      extends AbstractBaseNode      extends AbstractBaseNode
      implements Nullable      implements Nullable
Line 133: Line 132:
     public List<Foo> getFoos() {return foos;}     public List<Foo> getFoos() {return foos;}
          
-    public void setFoos() {this.foos = foos;}+    public void setFoos(List<Foo> foos) {this.foos = foos;}
 } }
  
Line 141: Line 140:
 ===== New SCAN construct which replaces LOOKAHEAD ===== ===== New SCAN construct which replaces LOOKAHEAD =====
  
-This will be detailed in a separate page.+The new ''SCAN'' instruction is designed to supersede the legacy ''LOOKAHEAD''. See [[scan statement|here]] for more information. 
 + 
 +===== New "up to here" syntax ===== 
 + 
 +The [[up to here]] syntax provides a way to specify [[choice points|lookahead]] in a much more clean, intuitive way. See [[up to here|here]] for more information.