Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.port80.eclipse.csharp.llk.parser
Class LLKLexerInput  view LLKLexerInput download LLKLexerInput.java

java.lang.Object
  extended bycom.port80.eclipse.csharp.llk.parser.LLKLexerInput

public final class LLKLexerInput
extends java.lang.Object

Input source for LLK lexer.


Nested Class Summary
static class LLKLexerInput.LineInfo
          LineInfo maintain an ordered list of line start offsets so that line information can be recovered from char.
 
Field Summary
private static boolean CHECK
           
protected  int column
           
private static int DEFAULT_TAB_WIDTH
           
static int EOF
           
private  int length
           
protected  int line
           
private  LLKLexerInput.LineInfo lineInfo
           
private static int MARKER_SIZE
           
private  int[] markLocations
           
private  int markOffset
           
private static java.lang.String NAME
           
protected  int offset
           
private  char[] source
           
private  int tabWidth
           
 
Constructor Summary
LLKLexerInput(char[] a)
           
LLKLexerInput(char[] a, int tabwidth)
           
 
Method Summary
protected  void _throwMismatch(java.lang.String msg, char c)
           
protected  void _throwMismatch(java.lang.String msg, char first, char last, char c)
           
protected  void _throwMismatch(java.lang.String msg, int[] bset)
           
protected  java.lang.String _toString(int[] bset)
           
 void consume()
           
 void consume(int n)
           
private  void expandMarkLocations()
           
 int getColumn()
           
 int getLine()
           
 void getLineColumn(int[] ret, int offset)
           
 SourceLocation getLocation()
           
 SourceLocation getLocation(int offset)
           
 void getLocation(SourceLocation loc)
           
 void getLocation(SourceLocation loc, int start)
           
 int getOffset()
           
 char[] getSource()
          CAUTION: Don't modifiy the char[] returned.
 java.lang.String getSource(int start, int end)
           
 int getTabWidth()
           
 int LA(int n)
           
 int LA0()
           
 int LA1()
           
protected static boolean llkGetBit(int n, int[] bset)
           
protected static boolean llkGetBitInverted(int n, int[] bset)
           
 int LT(int n)
           
 int LT0()
           
 int LT1()
           
 void mark()
           
 void match(char c)
           
 void match(char[] s)
           
 void match(char[] s, int start)
           
 void match(int[] bset)
           
 void match(java.lang.String s)
           
 void match(java.lang.String s, int start)
           
 void matchNot(char c)
           
 void matchNot(int[] bset)
           
 void matchNotRange(char first, char last)
           
 void matchRange(char first, char last)
           
 void newline()
           
 void reset()
           
 void rewind()
           
 void setLocation(SourceLocation loc)
           
 void setTabWidth(int w)
           
 void tab()
          Note: When tab() is called by user action, \t should have consumed and column advanced, so here column is decremented before advancing to next tab stop.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

private static final java.lang.String NAME
See Also:
Constant Field Values

CHECK

private static final boolean CHECK
See Also:
Constant Field Values

DEFAULT_TAB_WIDTH

private static final int DEFAULT_TAB_WIDTH
See Also:
Constant Field Values

MARKER_SIZE

private static final int MARKER_SIZE
See Also:
Constant Field Values

EOF

public static final int EOF
See Also:
Constant Field Values

line

protected int line

column

protected int column

offset

protected int offset

source

private char[] source

length

private int length

tabWidth

private int tabWidth

markOffset

private int markOffset

markLocations

private int[] markLocations

lineInfo

private LLKLexerInput.LineInfo lineInfo
Constructor Detail

LLKLexerInput

public LLKLexerInput(char[] a)

LLKLexerInput

public LLKLexerInput(char[] a,
                     int tabwidth)
Method Detail

reset

public void reset()

getOffset

public final int getOffset()

mark

public final void mark()

rewind

public final void rewind()

LA0

public final int LA0()

LA1

public final int LA1()

LA

public final int LA(int n)

LT0

public final int LT0()

LT1

public final int LT1()

LT

public final int LT(int n)

match

public final void match(char c)
                 throws LLKParseException,
                        LLKTokenStreamError

matchNot

public final void matchNot(char c)
                    throws LLKParseException,
                           LLKTokenStreamError

matchRange

public final void matchRange(char first,
                             char last)
                      throws LLKParseException,
                             LLKTokenStreamError

matchNotRange

public final void matchNotRange(char first,
                                char last)
                         throws LLKParseException,
                                LLKTokenStreamError

match

public final void match(int[] bset)
                 throws LLKParseException,
                        LLKTokenStreamError

matchNot

public final void matchNot(int[] bset)
                    throws LLKParseException,
                           LLKTokenStreamError

match

public final void match(java.lang.String s)
                 throws LLKParseException,
                        LLKTokenStreamError

match

public final void match(java.lang.String s,
                        int start)
                 throws LLKParseException,
                        LLKTokenStreamError

match

public final void match(char[] s)
                 throws LLKParseException,
                        LLKTokenStreamError

match

public final void match(char[] s,
                        int start)
                 throws LLKParseException,
                        LLKTokenStreamError

consume

public final void consume()
                   throws LLKTokenStreamError

consume

public final void consume(int n)
                   throws LLKTokenStreamError

getSource

public final char[] getSource()
CAUTION: Don't modifiy the char[] returned.


getSource

public final java.lang.String getSource(int start,
                                        int end)

getLine

public final int getLine()

getColumn

public final int getColumn()

getLineColumn

public final void getLineColumn(int[] ret,
                                int offset)

getLocation

public void getLocation(SourceLocation loc)

setLocation

public void setLocation(SourceLocation loc)

getLocation

public void getLocation(SourceLocation loc,
                        int start)

getLocation

public final SourceLocation getLocation()

getLocation

public final SourceLocation getLocation(int offset)

getTabWidth

public final int getTabWidth()

setTabWidth

public final void setTabWidth(int w)

newline

public final void newline()

tab

public final void tab()
Note: When tab() is called by user action, \t should have consumed and column advanced, so here column is decremented before advancing to next tab stop.


_throwMismatch

protected void _throwMismatch(java.lang.String msg,
                              int[] bset)
                       throws LLKParseException

_throwMismatch

protected final void _throwMismatch(java.lang.String msg,
                                    char c)
                             throws LLKParseException

_throwMismatch

protected final void _throwMismatch(java.lang.String msg,
                                    char first,
                                    char last,
                                    char c)
                             throws LLKParseException

_toString

protected final java.lang.String _toString(int[] bset)

llkGetBit

protected static final boolean llkGetBit(int n,
                                         int[] bset)

llkGetBitInverted

protected static final boolean llkGetBitInverted(int n,
                                                 int[] bset)

expandMarkLocations

private final void expandMarkLocations()