orc.parser
Class OrcParserRats

java.lang.Object
  extended by xtc.parser.ParserBase
      extended by orc.parser.OrcParserRats

public final class OrcParserRats
extends xtc.parser.ParserBase

Packrat parser for grammar orc.parser.OrcParserRats.

This class has been generated by the Rats! parser generator, version 1.14.0, (C) 2004-2008 Robert Grimm.


Field Summary
 
Fields inherited from class xtc.parser.ParserBase
FIRST_COLUMN, FIRST_LINE, INCR_SIZE, INIT_SIZE, NEWLINE, yyColumns, yyCount, yyData, yyEOF, yyReader
 
Constructor Summary
OrcParserRats(Config config, java.io.Reader reader, java.lang.String filename)
           
OrcParserRats(java.io.Reader reader, java.lang.String file)
          Create a new packrat parser.
OrcParserRats(java.io.Reader reader, java.lang.String file, int size)
          Create a new packrat parser.
 
Method Summary
protected  void abort(xtc.parser.ParseError error)
          Signal an unrecoverable error in the parse.
protected
<E extends Locatable>
E
at(int start, int end, E e)
          Attach a source location to an expression.
protected
<E extends Locatable>
E
at(Locatable start, int end, E e)
          Attach a source location to a postfix operator.
protected
<E extends Locatable>
E
at(Locatable start, Locatable end, E e)
          Attach a source location to an infix binary operator.
protected  xtc.parser.Column newColumn()
           
 xtc.parser.Result pModule(int yyStart)
          Parse nonterminal orc.parser.OrcParserRats.Module.
 xtc.parser.Result pProgram(int yyStart)
          Parse nonterminal orc.parser.OrcParserRats.Program.
 
Methods inherited from class xtc.parser.ParserBase
apply, apply, cast, cast, character, column, difference, format, isEOF, lineAt, location, peek, resetTo, setLocation, setLocation, signal, value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrcParserRats

public OrcParserRats(java.io.Reader reader,
                     java.lang.String file)
Create a new packrat parser.

Parameters:
reader - The reader.
file - The file name.

OrcParserRats

public OrcParserRats(java.io.Reader reader,
                     java.lang.String file,
                     int size)
Create a new packrat parser.

Parameters:
reader - The file reader.
file - The file name.
size - The file size.

OrcParserRats

public OrcParserRats(Config config,
                     java.io.Reader reader,
                     java.lang.String filename)
Method Detail

newColumn

protected xtc.parser.Column newColumn()
Specified by:
newColumn in class xtc.parser.ParserBase

pProgram

public xtc.parser.Result pProgram(int yyStart)
                           throws java.io.IOException
Parse nonterminal orc.parser.OrcParserRats.Program.

Parameters:
yyStart - The index.
Returns:
The result.
Throws:
java.io.IOException - Signals an I/O error.

pModule

public xtc.parser.Result pModule(int yyStart)
                          throws java.io.IOException
Parse nonterminal orc.parser.OrcParserRats.Module.

Parameters:
yyStart - The index.
Returns:
The result.
Throws:
java.io.IOException - Signals an I/O error.

at

protected final <E extends Locatable> E at(int start,
                                           int end,
                                           E e)
Attach a source location to an expression. Used like this: yyValue = at(yyStart, yyCount, yyValue)


at

protected final <E extends Locatable> E at(Locatable start,
                                           Locatable end,
                                           E e)
Attach a source location to an infix binary operator.


at

protected final <E extends Locatable> E at(Locatable start,
                                           int end,
                                           E e)
Attach a source location to a postfix operator.


abort

protected final void abort(xtc.parser.ParseError error)
                    throws java.io.IOException
Signal an unrecoverable error in the parse. See examples of how this is used in productions to prevent unwanted backtracking. This should be used with extreme care to ensure that it doesn't prevent necessary backtracking.

Throws:
java.io.IOException