mondrian.olap
Class Scanner

java.lang.Object
  extended by mondrian.olap.Scanner
Direct Known Subclasses:
StringScanner

public class Scanner
extends java.lang.Object

Lexical analyzer for MDX.


Field Summary
protected  boolean debug
           
protected  int nextChar
          single lookahead character
 
Constructor Summary
Scanner(boolean debug)
          Creates a Scanner.
 
Method Summary
protected  int getChar()
          Read a character from input, returning -1 if end of input.
static java.lang.String[][] getCommentDelimiters()
          Returns the list of comment delimiters.
(package private)  void getLocation(java_cup.runtime.Symbol symbol, int[] loc)
          Deduces the line and column (0-based) of a symbol.
static boolean getNestedCommentsState()
          Returns the current nested comments state.
 void init()
          Initialize the scanner
 java.lang.String lookupReserved(int i)
          return the name of the reserved word whose token code is "i"
 java_cup.runtime.Symbol next_token()
          Recognizes and returns the next complete token.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nextChar

protected int nextChar
single lookahead character


debug

protected boolean debug
Constructor Detail

Scanner

Scanner(boolean debug)
Creates a Scanner.

Parameters:
debug - Whether to emit debug messages.
Method Detail

getNestedCommentsState

public static boolean getNestedCommentsState()
Returns the current nested comments state.


getCommentDelimiters

public static java.lang.String[][] getCommentDelimiters()
Returns the list of comment delimiters.


getChar

protected int getChar()
               throws java.io.IOException
Read a character from input, returning -1 if end of input.

Throws:
java.io.IOException

init

public void init()
          throws java.io.IOException
Initialize the scanner

Throws:
java.io.IOException

getLocation

void getLocation(java_cup.runtime.Symbol symbol,
                 int[] loc)
Deduces the line and column (0-based) of a symbol. Called by Parser.syntax_error(java_cup.runtime.Symbol).


lookupReserved

public java.lang.String lookupReserved(int i)
return the name of the reserved word whose token code is "i"


next_token

public java_cup.runtime.Symbol next_token()
                                   throws java.io.IOException
Recognizes and returns the next complete token.

Throws:
java.io.IOException

Get Mondrian at SourceForge.net. Fast, secure and free Open Source software downloads