|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.ocl.lpg.AbstractLexer
org.eclipse.ocl.parser.OCLLexer
public class OCLLexer
Constructor Summary | |
---|---|
OCLLexer(Environment<?,?,?,?,?,?,?,?,?,?,?,?> environment)
|
|
OCLLexer(Environment<?,?,?,?,?,?,?,?,?,?,?,?> environment,
char[] chars)
|
|
OCLLexer(Environment<?,?,?,?,?,?,?,?,?,?,?,?> environment,
char[] input_chars,
java.lang.String filename,
int tab)
|
|
OCLLexer(Environment<?,?,?,?,?,?,?,?,?,?,?,?> environment,
java.io.Reader reader,
java.lang.String filename)
|
Method Summary | |
---|---|
DerivedLexStream |
getILexStream()
|
int[] |
getKeywordKinds()
Queries the token kinds, as defined by my keyword lexer, of tokens that are keywords in by grammar. |
int |
getLeftSpan()
|
lpg.runtime.ILexStream |
getLexStream()
Deprecated. replaced by getILexStream() |
Environment<?,?,?,?,?,?,?,?,?,?,?,?> |
getOCLEnvironment()
|
lpg.runtime.LexParser |
getParser()
|
lpg.runtime.ParseTable |
getParseTable()
|
int |
getRhsFirstTokenIndex(int i)
|
int |
getRhsLastTokenIndex(int i)
|
int |
getRightSpan()
|
int |
getToken(int i)
|
void |
initialize(char[] content,
java.lang.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(lpg.runtime.Monitor monitor,
DerivedPrsStream prsStream)
Runs the lexer's with the provided parseStream and
the given monitor. |
void |
lexer(lpg.runtime.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,
java.lang.String filename)
Resets the lexer's input with the given char's array. |
void |
reset(char[] input_chars,
java.lang.String filename,
int tab)
Resets the lexer's input with the given char's array. |
void |
reset(java.io.Reader reader,
java.lang.String filename)
Resets the lexer's input with the given Reader |
void |
resetKeywordLexer()
Rsets the lexer's keywordLexer |
void |
ruleAction(int ruleNumber)
|
Methods inherited from class org.eclipse.ocl.lpg.AbstractLexer |
---|
getEnvironment, getInputChars, initialize, initialize, lexToTokens, lexToTokens |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OCLLexer(Environment<?,?,?,?,?,?,?,?,?,?,?,?> environment)
public OCLLexer(Environment<?,?,?,?,?,?,?,?,?,?,?,?> environment, char[] chars)
public OCLLexer(Environment<?,?,?,?,?,?,?,?,?,?,?,?> environment, char[] input_chars, java.lang.String filename, int tab)
public OCLLexer(Environment<?,?,?,?,?,?,?,?,?,?,?,?> environment, java.io.Reader reader, java.lang.String filename) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public lpg.runtime.ParseTable getParseTable()
getParseTable
in class AbstractLexer
ParseTable
public lpg.runtime.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, java.lang.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, java.lang.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 lpg.runtime.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(lpg.runtime.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 input
lexer
in class AbstractLexer
prsStream
- the associated parseStream
start_offset
- the start offsetend_offset
- the end offsetpublic void lexer(lpg.runtime.Monitor monitor, DerivedPrsStream prsStream, int start_offset, int end_offset)
AbstractLexer
parseStream
in specific offset of the input
lexer
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, java.lang.String filename)
reset(char [] content, String filename)
public void reset(java.io.Reader reader, java.lang.String filename) throws java.io.IOException
AbstractLexer
reset
in class AbstractLexer
reader
- the new lexer's inputfilename
- a file name used for logging when encountering errors/warnings
java.io.IOException
public void ruleAction(int ruleNumber)
ruleAction
in interface lpg.runtime.RuleAction
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |