org.jmodelica.modelica.parser.ModelicaScanner Class Reference

This class is a scanner generated by JFlex 1.4.3 on 10/7/11 2:48 PM from the specification file /tmp/JModelica/Compiler/ModelicaCompiler/src/java-generated/org/jmodelica/modelica/parser/Modelica_all.flex. More...

Inherits org::jmodelica::util::AbstractModelicaScanner.

List of all members.

Classes

class  Exception
 Subclass of Scanner.Exception that carries extra information. More...
class  Symbol
 Subclass of Symbol that carries extra information. More...

Public Member Functions

void reset (java.io.Reader reader)
 ModelicaScanner (java.io.Reader in)
 Creates a new scanner There is also a java.io.InputStream version of this constructor.
 ModelicaScanner (java.io.InputStream in)
 Creates a new scanner.
final void yyclose () throws java.io.IOException
 Closes the input stream.
final void yyreset (java.io.Reader reader)
 Resets the scanner to read from a new input stream.
final int yystate ()
 Returns the current lexical state.
final void yybegin (int newState)
 Enters a new lexical state.
final String yytext ()
 Returns the text matched by the current regular expression.
final char yycharat (int pos)
 Returns the character at position pos from the matched text.
final int yylength ()
 Returns the length of the matched text region.
void yypushback (int number)
 Pushes the specified amount of characters back into the input stream.
Symbol nextToken () throws java.io.IOException, Scanner.Exception
 Resumes scanning until the next regular expression is matched, the end of input is encountered or an I/O-Error occurs.

Static Public Attributes

static final int YYEOF = -1
 This character denotes the end of file.
static final int YYINITIAL = 0
 lexical states

Protected Member Functions

int matchLine ()
int matchOffset ()
int matchLength ()


Detailed Description

This class is a scanner generated by JFlex 1.4.3 on 10/7/11 2:48 PM from the specification file /tmp/JModelica/Compiler/ModelicaCompiler/src/java-generated/org/jmodelica/modelica/parser/Modelica_all.flex.

Constructor & Destructor Documentation

org.jmodelica.modelica.parser.ModelicaScanner.ModelicaScanner ( java.io.Reader  in  ) 

Creates a new scanner There is also a java.io.InputStream version of this constructor.

Parameters:
in the java.io.Reader to read input from.

org.jmodelica.modelica.parser.ModelicaScanner.ModelicaScanner ( java.io.InputStream  in  ) 

Creates a new scanner.

There is also java.io.Reader version of this constructor.

Parameters:
in the java.io.Inputstream to read input from.


Member Function Documentation

int org.jmodelica.modelica.parser.ModelicaScanner.matchLength (  )  [protected]

int org.jmodelica.modelica.parser.ModelicaScanner.matchLine (  )  [protected]

int org.jmodelica.modelica.parser.ModelicaScanner.matchOffset (  )  [protected]

Symbol org.jmodelica.modelica.parser.ModelicaScanner.nextToken (  )  throws java.io.IOException, Scanner.Exception

Resumes scanning until the next regular expression is matched, the end of input is encountered or an I/O-Error occurs.

Returns:
the next token
Exceptions:
java.io.IOException if any I/O-Error occurs

void org.jmodelica.modelica.parser.ModelicaScanner.reset ( java.io.Reader  reader  ) 

final void org.jmodelica.modelica.parser.ModelicaScanner.yybegin ( int  newState  ) 

Enters a new lexical state.

Parameters:
newState the new lexical state

final char org.jmodelica.modelica.parser.ModelicaScanner.yycharat ( int  pos  ) 

Returns the character at position pos from the matched text.

It is equivalent to yytext().charAt(pos), but faster

Parameters:
pos the position of the character to fetch. A value from 0 to yylength()-1.
Returns:
the character at position pos

final void org.jmodelica.modelica.parser.ModelicaScanner.yyclose (  )  throws java.io.IOException

Closes the input stream.

final int org.jmodelica.modelica.parser.ModelicaScanner.yylength (  ) 

Returns the length of the matched text region.

void org.jmodelica.modelica.parser.ModelicaScanner.yypushback ( int  number  ) 

Pushes the specified amount of characters back into the input stream.

They will be read again by then next call of the scanning method

Parameters:
number the number of characters to be read again. This number must not be greater than yylength()!

final void org.jmodelica.modelica.parser.ModelicaScanner.yyreset ( java.io.Reader  reader  ) 

Resets the scanner to read from a new input stream.

Does not close the old reader.

All internal variables are reset, the old input stream cannot be reused (internal buffer is discarded and lost). Lexical state is set to ZZ_INITIAL.

Parameters:
reader the new input stream

final int org.jmodelica.modelica.parser.ModelicaScanner.yystate (  ) 

Returns the current lexical state.

final String org.jmodelica.modelica.parser.ModelicaScanner.yytext (  ) 

Returns the text matched by the current regular expression.


Member Data Documentation

This character denotes the end of file.

lexical states


The documentation for this class was generated from the following file:

Generated on Fri Oct 7 14:51:18 2011 for JModelica.org by  doxygen 1.5.8