
C:\proj\xqed2\grammar\parser>java -jar xquery.jar "2<3"        

Test[0]: 2<3
Call:   XPath2
  Call:   QueryList
    Call:   Module
      Call:   VersionDecl(LOOKING AHEAD...)
<DEFAULT>Current character : 2 (50)
   No string literal matches possible.
   Starting NFA to match one of : { <StringLiteral>, <PredefinedEntityRef>, <CharRef>, <StarColonNCName>, 
     <Char>, <IntegerLiteral>, <DecimalLiteral>, <token of kind 120>, <NCNameColonStar> }
<DEFAULT>Current character : 2 (50)
   Currently matched the first 1 characters as a <IntegerLiteral> token.
   Possible kinds of longer matches : { <IntegerLiteral>, <DecimalLiteral>, <DoubleLiteral>, <NotNumber> }
<DEFAULT>Current character : < (60)
   Currently matched the first 1 characters as a <IntegerLiteral> token.
   Putting back 1 characters into the input stream.
****** FOUND A <IntegerLiteral> MATCH (2) ******

        Visited token: <<IntegerLiteral>: "2">; Expected token: <"xquery">
      Return: VersionDecl(LOOKAHEAD FAILED)
      Call:   LibraryModule(LOOKING AHEAD...)
        Call:   ModuleDecl(LOOKING AHEAD...)
          Visited token: <<IntegerLiteral>: "2">; Expected token: <"module">
        Return: ModuleDecl(LOOKAHEAD FAILED)
      Return: LibraryModule(LOOKAHEAD FAILED)
      Call:   MainModule
        Call:   Prolog
          Call:   DefaultNamespaceDecl(LOOKING AHEAD...)
            Visited token: <<IntegerLiteral>: "2">; Expected token: <"declare">
          Return: DefaultNamespaceDecl(LOOKAHEAD FAILED)
          Call:   Setter(LOOKING AHEAD...)
            Call:   BoundarySpaceDecl(LOOKING AHEAD...)
              Visited token: <<IntegerLiteral>: "2">; Expected token: <"declare">
            Return: BoundarySpaceDecl(LOOKAHEAD FAILED)
            Call:   DefaultCollationDecl(LOOKING AHEAD...)
              Visited token: <<IntegerLiteral>: "2">; Expected token: <"declare">
            Return: DefaultCollationDecl(LOOKAHEAD FAILED)
            Call:   BaseURIDecl(LOOKING AHEAD...)
              Visited token: <<IntegerLiteral>: "2">; Expected token: <"declare">
            Return: BaseURIDecl(LOOKAHEAD FAILED)
            Call:   ConstructionDecl(LOOKING AHEAD...)
              Visited token: <<IntegerLiteral>: "2">; Expected token: <"declare">
            Return: ConstructionDecl(LOOKAHEAD FAILED)
            Call:   OrderingModeDecl(LOOKING AHEAD...)
              Visited token: <<IntegerLiteral>: "2">; Expected token: <"declare">
            Return: OrderingModeDecl(LOOKAHEAD FAILED)
            Call:   EmptyOrderDecl(LOOKING AHEAD...)
              Visited token: <<IntegerLiteral>: "2">; Expected token: <"declare">
            Return: EmptyOrderDecl(LOOKAHEAD FAILED)
            Call:   CopyNamespacesDecl(LOOKING AHEAD...)
              Visited token: <<IntegerLiteral>: "2">; Expected token: <"declare">
            Return: CopyNamespacesDecl(LOOKAHEAD FAILED)
          Return: Setter(LOOKAHEAD FAILED)
          Call:   NamespaceDecl(LOOKING AHEAD...)
            Visited token: <<IntegerLiteral>: "2">; Expected token: <"declare">
          Return: NamespaceDecl(LOOKAHEAD FAILED)
          Call:   Import(LOOKING AHEAD...)
            Call:   SchemaImport(LOOKING AHEAD...)
              Visited token: <<IntegerLiteral>: "2">; Expected token: <"import">
            Return: SchemaImport(LOOKAHEAD FAILED)
            Call:   ModuleImport(LOOKING AHEAD...)
              Visited token: <<IntegerLiteral>: "2">; Expected token: <"import">
            Return: ModuleImport(LOOKAHEAD FAILED)
          Return: Import(LOOKAHEAD FAILED)
          Call:   VarDecl(LOOKING AHEAD...)
            Visited token: <<IntegerLiteral>: "2">; Expected token: <"declare">
          Return: VarDecl(LOOKAHEAD FAILED)
          Call:   FunctionDecl(LOOKING AHEAD...)
            Visited token: <<IntegerLiteral>: "2">; Expected token: <"declare">
          Return: FunctionDecl(LOOKAHEAD FAILED)
          Call:   OptionDecl(LOOKING AHEAD...)
            Visited token: <<IntegerLiteral>: "2">; Expected token: <"declare">
          Return: OptionDecl(LOOKAHEAD FAILED)
        Return: Prolog
        Call:   QueryBody
          Call:   Expr
            Call:   ExprSingle
              Call:   FLWORExpr(LOOKING AHEAD...)
                Call:   ForClause(LOOKING AHEAD...)
                  Visited token: <<IntegerLiteral>: "2">; Expected token: <"for">
                Return: ForClause(LOOKAHEAD FAILED)
                Call:   LetClause(LOOKING AHEAD...)
                  Visited token: <<IntegerLiteral>: "2">; Expected token: <"let">
                Return: LetClause(LOOKAHEAD FAILED)
              Return: FLWORExpr(LOOKAHEAD FAILED)
              Call:   QuantifiedExpr(LOOKING AHEAD...)
                Visited token: <<IntegerLiteral>: "2">; Expected token: <"some">
                Visited token: <<IntegerLiteral>: "2">; Expected token: <"every">
              Return: QuantifiedExpr(LOOKAHEAD FAILED)
              Call:   TypeswitchExpr(LOOKING AHEAD...)
                Visited token: <<IntegerLiteral>: "2">; Expected token: <"typeswitch">
              Return: TypeswitchExpr(LOOKAHEAD FAILED)
              Call:   IfExpr(LOOKING AHEAD...)
                Visited token: <<IntegerLiteral>: "2">; Expected token: <"if">
              Return: IfExpr(LOOKAHEAD FAILED)
              Call:   OrExpr
                Call:   AndExpr
                  Call:   ComparisonExpr
                    Call:   RangeExpr
                      Call:   AdditiveExpr
                        Call:   MultiplicativeExpr
                          Call:   UnionExpr
                            Call:   IntersectExceptExpr
                              Call:   InstanceofExpr
                                Call:   TreatExpr
                                  Call:   CastableExpr
                                    Call:   CastExpr
                                      Call:   UnaryExpr
                                        Call:   ValueExpr
                                          Call:   ValidateExpr(LOOKING AHEAD...)
                                            Visited token: <<IntegerLiteral>: "2">; Expected token: <"validate">
                                          Return: ValidateExpr(LOOKAHEAD FAILED)
                                          Call:   PathExpr
                                            Call:   RelativePathExpr
                                              Call:   StepExpr
                                                Call:   FilterExpr(LOOKING AHEAD...)
                                                  Call:   PrimaryExpr(LOOKING AHEAD...)
                                                    Call:   Literal(LOOKING AHEAD...)
                                                      Call:   NumericLiteral(LOOKING AHEAD...)
                                                        Visited token: <<IntegerLiteral>: "2">; Expected token: <<IntegerLiteral>>
                                                      Return: NumericLiteral(LOOKAHEAD SUCCEEDED)
                                                    Return: Literal(LOOKAHEAD SUCCEEDED)
                                                  Return: PrimaryExpr(LOOKAHEAD SUCCEEDED)
                                                  Call:   PredicateList(LOOKING AHEAD...)
                                                    Call:   Predicate(LOOKING AHEAD...)
<DEFAULT>Current character : < (60)
   Currently matched the first 1 characters as a "<" token.
   Possible string literal matches : { "<=", "<<", "<?", "<![CDATA[", 
     "<!--" } 
<DEFAULT>Current character : 3 (51)
   No string literal matches possible.
   No more string literal token matches are possible.
   Starting NFA to match one of : {  }
<DEFAULT>Current character : 3 (51)
   Currently matched the first 1 characters as a "<" token.
   Putting back 1 characters into the input stream.
****** FOUND A "<" MATCH (<) ******

                                                      Visited token: <"<">; Expected token: <"[">
                                                    Return: Predicate(LOOKAHEAD FAILED)
                                                  Return: PredicateList(LOOKAHEAD SUCCEEDED)
                                                Return: FilterExpr(LOOKAHEAD SUCCEEDED)
                                                Call:   FilterExpr
                                                  Call:   PrimaryExpr
                                                    Call:   Literal
                                                      Call:   NumericLiteral
                                                        Consumed token: <<IntegerLiteral>: "2">
                                                      Return: NumericLiteral
                                                    Return: Literal
                                                  Return: PrimaryExpr
                                                  Call:   PredicateList
                                                  Return: PredicateList
                                                Return: FilterExpr
                                              Return: StepExpr
                                            Return: RelativePathExpr
                                          Return: PathExpr
                                        Return: ValueExpr
                                      Return: UnaryExpr
                                    Return: CastExpr
                                  Return: CastableExpr
                                Return: TreatExpr
                              Return: InstanceofExpr
                            Return: IntersectExceptExpr
                          Return: UnionExpr
                        Return: MultiplicativeExpr
                      Return: AdditiveExpr
                    Return: RangeExpr
                    Call:   GeneralComp
                      Consumed token: <"<">
                    Return: GeneralComp
                    Call:   RangeExpr
                      Call:   AdditiveExpr
                        Call:   MultiplicativeExpr
                          Call:   UnionExpr
                            Call:   IntersectExceptExpr
                              Call:   InstanceofExpr
                                Call:   TreatExpr
                                  Call:   CastableExpr
                                    Call:   CastExpr
                                      Call:   UnaryExpr
<START_TAG>Current character : 3 (51)
   No string literal matches possible.
   Starting NFA to match one of : { <S>, <TagQName> }
<START_TAG>Current character : 3 (51)
                                      Return: UnaryExpr
                                    Return: CastExpr
                                  Return: CastableExpr
                                Return: TreatExpr
                              Return: InstanceofExpr
                            Return: IntersectExceptExpr
                          Return: UnionExpr
                        Return: MultiplicativeExpr
                      Return: AdditiveExpr
                    Return: RangeExpr
                  Return: ComparisonExpr
                Return: AndExpr
              Return: OrExpr
            Return: ExprSingle
          Return: Expr
        Return: QueryBody
      Return: MainModule
    Return: Module
  Return: QueryList
Return: XPath2
