anchor.diff:        "*)"                  {_ttype = Token.SKIP;}
       ;
   
  +LATEX_COMMENT
  +    : ("\\section{"
  +       | "\\subsection{"
  +       | "\\document{"
  +       | "\\end{spec}"
  +      )
  +      (// '\r' '\n' can be matched in one alternative or by matching
  +       // '\r' in one iteration and '\n' in another.  The language
  +       // that allows both "\r\n" and "\r" and "\n" to be valid
  +       // newlines is ambiguous.  Consequently, the resulting grammar
  +       // must be ambiguous.  This warning is shut off.
  +       options {generateAmbigWarnings=false;}
  +       : { LA(2)!=')' }? '*'
  +	 | '\r' '\n'		{newline();}
  +	 | '\r'			{newline();}
  +	 | '\n'			{newline();}
  +	 | ~('\n'|'\r')
  +      )*
  +      "\\begin{spec}"                  {_ttype = Token.SKIP;}
  +    ;
  +
   //-----------------------------
   //==== SPECIFIC CHARACTERS  ===
   //-----------------------------
  
positive.code:        )*)?
        RPAREN                {params = (String[]) paramList.toArray(new String[]{});}
      ;
  */
  
  private closedPattern[List patternList]
      : variablePattern[patternList]
      | wildcardPattern[patternList]
      | literalPattern[patternList]
  //TODO    | listPattern[patternList]
  //    | tuplePattern[patternList]
  //    | recordPattern[patternList]
  //    | parenthesizedPattern[patternList]
      ;
  
  private variablePattern[List patternList]
  {
      String pattern = null;
  }
      : pattern=idName          {patternList.add(pattern);}
      ;
  
  private wildcardPattern[List patternList]
      : nonWordSymbol["_"]    {patternList.add("_");}
      ;
  
  private literalPattern[List patternList]
  {
      String pattern = null;
  }
      : pattern=literal         {patternList.add(pattern);}
      ;
  
  /*TODO private listPattern[List patternList]
  {
      
  }*/
  
  
  private pattern[List patternList]
      : annotatedPattern[patternList]
      | tightPattern[patternList]
      ;
  
  private annotatedPattern[List patternList]
      : pattern[patternList]
        nonWordSymbol[":"]
        //TODO - fix sort to match grammar: sort
      ;
        
  
  //---------------------------------------------------------------------------
  private specialSymbol returns[String text]
  {
  
negative.code:  *
   *
   * $Log$
   * Revision 1.16  2003/03/07 23:44:24  weilyn
   * Added most top level terms
   *
   * Revision 1.15  2003/02/20 23:17:41  weilyn
   * Fixed parsing of assertions and options in prove term
   *
  