public class OCLBacktrackingLexer extends AbstractLexer
Constructor and Description |
---|
OCLBacktrackingLexer(Environment<?,?,?,?,?,?,?,?,?,?,?,?> environment) |
OCLBacktrackingLexer(Environment<?,?,?,?,?,?,?,?,?,?,?,?> environment,
char[] chars) |
OCLBacktrackingLexer(Environment<?,?,?,?,?,?,?,?,?,?,?,?> environment,
char[] input_chars,
String filename,
int tab) |
OCLBacktrackingLexer(Environment<?,?,?,?,?,?,?,?,?,?,?,?> environment,
Reader reader,
String filename) |
Modifier and Type | Method and Description |
---|---|
DerivedLexStream |
getILexStream() |
int[] |
getKeywordKinds()
Queries the token kinds, as defined by my keyword lexer, of tokens that
are keywords in by grammar.
|
int |
getLeftSpan() |
ILexStream |
getLexStream()
Deprecated.
replaced by
getILexStream() |
Environment<?,?,?,?,?,?,?,?,?,?,?,?> |
getOCLEnvironment() |
LexParser |
getParser() |
ParseTable |
getParseTable() |
int |
getRhsFirstTokenIndex(int i) |
int |
getRhsLastTokenIndex(int i) |
int |
getRightSpan() |
int |
getToken(int i) |
void |
initialize(char[] content,
String filename)
Deprecated.
function replaced by
reset(char [] content, String filename) |
void |
lexer(DerivedPrsStream prsStream)
Runs the lexer's with the provided
parseStream |
void |
lexer(DerivedPrsStream prsStream,
int start_offset,
int end_offset)
Runs the lexer's with the provided
parseStream
in specific offset of the input |
void |
lexer(Monitor monitor,
DerivedPrsStream prsStream)
Runs the lexer's with the provided
parseStream and
the given monitor. |
void |
lexer(Monitor monitor,
DerivedPrsStream prsStream,
int start_offset,
int end_offset)
Runs the lexer's with the provided
parseStream
in specific offset of the input |
void |
reportLexicalError(int startLoc,
int endLoc)
If a parse stream was not passed to this Lexical analyser then we
simply report a lexical error.
|
void |
reset(char[] input_chars,
String filename)
Resets the lexer's input with the given char's array.
|
void |
reset(char[] input_chars,
String filename,
int tab)
Resets the lexer's input with the given char's array.
|
void |
reset(Reader reader,
String filename)
Resets the lexer's input with the given Reader
|
void |
resetKeywordLexer()
Rsets the lexer's keywordLexer
|
void |
ruleAction(int ruleNumber) |
getEnvironment, getInputChars, initialize, initialize, lexToTokens, lexToTokens
public OCLBacktrackingLexer(Environment<?,?,?,?,?,?,?,?,?,?,?,?> environment)
public OCLBacktrackingLexer(Environment<?,?,?,?,?,?,?,?,?,?,?,?> environment, char[] chars)
public OCLBacktrackingLexer(Environment<?,?,?,?,?,?,?,?,?,?,?,?> environment, char[] input_chars, String filename, int tab)
public OCLBacktrackingLexer(Environment<?,?,?,?,?,?,?,?,?,?,?,?> environment, Reader reader, String filename) throws IOException
IOException
public ParseTable getParseTable()
getParseTable
in class AbstractLexer
ParseTable
public LexParser getParser()
getParser
in class AbstractLexer
LexParser
public int getToken(int i)
public int getRhsFirstTokenIndex(int i)
public int getRhsLastTokenIndex(int i)
public int getLeftSpan()
public int getRightSpan()
public void resetKeywordLexer()
AbstractLexer
resetKeywordLexer
in class AbstractLexer
public void reset(char[] input_chars, String filename)
AbstractLexer
reset
in class AbstractLexer
input_chars
- the new lexer's inputfilename
- a file name used for logging when encountering errors/warningspublic void reset(char[] input_chars, String filename, int tab)
AbstractLexer
reset
in class AbstractLexer
input_chars
- the new lexer's inputfilename
- a file name used for logging when encountering errors/warningstab
- lexer's tab length.public Environment<?,?,?,?,?,?,?,?,?,?,?,?> getOCLEnvironment()
public DerivedLexStream getILexStream()
getILexStream
in class AbstractLexer
lexStream
@Deprecated public ILexStream getLexStream()
getILexStream()
getLexStream
in class AbstractLexer
lexStream
public void lexer(DerivedPrsStream prsStream)
AbstractLexer
parseStream
lexer
in class AbstractLexer
prsStream
- the associated parseStream
public void lexer(Monitor monitor, DerivedPrsStream prsStream)
AbstractLexer
parseStream
and
the given monitor.lexer
in class AbstractLexer
monitor
- the Monitor
prsStream
- the associated parseStream
public void lexer(DerivedPrsStream prsStream, int start_offset, int end_offset)
AbstractLexer
parseStream
in specific offset of the inputlexer
in class AbstractLexer
prsStream
- the associated parseStream
start_offset
- the start offsetend_offset
- the end offsetpublic void lexer(Monitor monitor, DerivedPrsStream prsStream, int start_offset, int end_offset)
AbstractLexer
parseStream
in specific offset of the inputlexer
in class AbstractLexer
prsStream
- the associated parseStream
start_offset
- the start offsetend_offset
- the end offsetpublic void reportLexicalError(int startLoc, int endLoc)
reportLexicalError
in class AbstractLexer
startLoc
- the offset the error startsendLoc
- the offset the error ends.public int[] getKeywordKinds()
AbstractLexer
getKeywordKinds
in class AbstractLexer
@Deprecated public void initialize(char[] content, String filename)
reset(char [] content, String filename)
public void reset(Reader reader, String filename) throws IOException
AbstractLexer
reset
in class AbstractLexer
reader
- the new lexer's inputfilename
- a file name used for logging when encountering errors/warningsIOException
public void ruleAction(int ruleNumber)
Copyright © 2005, 2018 IBM Corporation and others. All Rights Reserved.