org.ablaf.internal.lexer
Class DefaultLexerSupport
java.lang.Object
org.ablaf.internal.lexer.DefaultLexerSupport
- All Implemented Interfaces:
- ILexerSupport
- Direct Known Subclasses:
- RubyLexerSupport
- public class DefaultLexerSupport
- extends java.lang.Object
- implements ILexerSupport
- Version:
- $Revision: 1.6 $
- Author:
- jpetersen
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
source
protected ILexerSource source
lineOffset
protected int[] lineOffset
DefaultLexerSupport
public DefaultLexerSupport(ILexerSource source)
read
public char read()
- Specified by:
read
in interface ILexerSupport
- See Also:
ILexerSupport.read()
unread
public void unread()
- Specified by:
unread
in interface ILexerSupport
- See Also:
ILexerSupport.unread()
getNext
public char getNext()
- Specified by:
getNext
in interface ILexerSupport
- See Also:
ILexerSupport.getNext()
isEOF
public boolean isEOF()
- Specified by:
isEOF
in interface ILexerSupport
- See Also:
ILexerSupport.isEOF()
isEOL
public boolean isEOL()
- Specified by:
isEOL
in interface ILexerSupport
- See Also:
ILexerSupport.isEOL()
isNext
public boolean isNext(char c)
- Specified by:
isNext
in interface ILexerSupport
- See Also:
ILexerSupport.isNext(char)
readHex
public java.lang.String readHex(int maxLen)
- Specified by:
readHex
in interface ILexerSupport
- See Also:
ILexerSupport.readHex(int)
readOct
public java.lang.String readOct(int maxLen)
- Specified by:
readOct
in interface ILexerSupport
- See Also:
ILexerSupport.readOct(int)
getCharAt
public char getCharAt(int idx)
- Specified by:
getCharAt
in interface ILexerSupport
- See Also:
ILexerSupport.getCharAt(int)
getPosition
public ISourcePosition getPosition()
- Specified by:
getPosition
in interface ILexerSupport
- See Also:
ILexerSupport.getPosition()
isNext
public boolean isNext(java.lang.String s)
- Check if the string s is the next string in the lexer.
If this is the case the String is consumed.
- Specified by:
isNext
in interface ILexerSupport
- Parameters:
s
- the string to check
- Returns:
- true if the string s is next false otherwise
- See Also:
ILexerSupport.isNext(String)
readLine
public java.lang.String readLine()
- Description copied from interface:
ILexerSupport
- Read upto the end of the line. Don't return the eol character.
- Specified by:
readLine
in interface ILexerSupport
- See Also:
ILexerSupport.readLine()
getLastRead
public char getLastRead()
- Specified by:
getLastRead
in interface ILexerSupport
- See Also:
ILexerSupport.getLastRead()
unreadMany
public void unreadMany(int n)
- Specified by:
unreadMany
in interface ILexerSupport
- See Also:
ILexerSupport.unreadMany(int)
Copyright © 2002 Jan Arne Petersen. All Rights Reserved.