|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.mtl.parser.cst.utils.ParserUtils
public final class ParserUtils
Common utilities to parse sequences.
| Method Summary | |
|---|---|
static SequenceBlock |
createMTLSequenceBlock(boolean headerOnly,
java.lang.String name,
boolean recursiveBody,
SequenceBlock[] inhibsHeader,
SequenceBlock[] inhibsBody)
Creates a MTL block analyzer. |
static int |
getNextSequence(java.lang.StringBuffer buffer,
int posBegin,
int posEnd,
ISequence[] pElements,
Region[] pElementsPositions)
To find the nearest sequence ('pElements') in the buffer. |
static int |
getNextSequence(java.lang.StringBuffer buffer,
int posBegin,
int posEnd,
ISequence[] pElements,
Region[] pElementsPositions,
SequenceBlock[] pInhibs,
Region[] pInhibsPositions)
To find the nearest sequence ('pElements') in the buffer, and some blocks ('pInhibs') are ignored. |
static int |
shiftIdentifier(java.lang.StringBuffer buffer,
int posBegin,
int posEnd)
Reads eventually the following identifier in the text. |
static int |
shiftKeyword(java.lang.StringBuffer buffer,
int posBegin,
int posEnd,
java.lang.String keyword,
boolean wholeWord)
Reads eventually the following text if the given keyword matches. |
static int |
shiftKeyword(java.lang.StringBuffer buffer,
int posBegin,
int posEnd,
java.lang.String keyword,
boolean ignoreCase,
boolean wholeWord)
Reads eventually the following text if the given keyword matches. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static SequenceBlock createMTLSequenceBlock(boolean headerOnly,
java.lang.String name,
boolean recursiveBody,
SequenceBlock[] inhibsHeader,
SequenceBlock[] inhibsBody)
headerOnly - indicates if it parses the header only, the body is ignoredname - is the name of the blockrecursiveBody - indicates if the block cans contain the same blockinhibsHeader - are the ignored sequences on the header partinhibsBody - are the ignored sequences on the body part
public static int getNextSequence(java.lang.StringBuffer buffer,
int posBegin,
int posEnd,
ISequence[] pElements,
Region[] pElementsPositions)
buffer - is the bufferposBegin - is the beginning indexposEnd - is the ending indexpElements - are the candidates to searchpElementsPositions - are the previous values computed for the candidates, it is modified in this method
public static int getNextSequence(java.lang.StringBuffer buffer,
int posBegin,
int posEnd,
ISequence[] pElements,
Region[] pElementsPositions,
SequenceBlock[] pInhibs,
Region[] pInhibsPositions)
buffer - is the bufferposBegin - is the beginning indexposEnd - is the ending indexpElements - are the candidates to searchpElementsPositions - are the previous values computed for the candidates, it is modified in this methodpInhibs - are the blocks to ignorepInhibsPositions - are the previous values computed for the ignored blocks, it is modified in this method
public static int shiftKeyword(java.lang.StringBuffer buffer,
int posBegin,
int posEnd,
java.lang.String keyword,
boolean wholeWord)
buffer - is the buffer to parseposBegin - is the beginning indexposEnd - is the ending indexkeyword - is the keyword to read in the text at the current indexwholeWord - indicates if the search mode is 'whole word'
public static int shiftKeyword(java.lang.StringBuffer buffer,
int posBegin,
int posEnd,
java.lang.String keyword,
boolean ignoreCase,
boolean wholeWord)
buffer - is the buffer to parseposBegin - is the beginning indexposEnd - is the ending indexkeyword - is the keyword to read in the text at the current indexignoreCase - indicates if the search mode is 'ignore case'wholeWord - indicates if the search mode is 'whole word'
public static int shiftIdentifier(java.lang.StringBuffer buffer,
int posBegin,
int posEnd)
buffer - is the buffer to parseposBegin - is the beginning indexposEnd - is the ending index
|
Copyright 2008 Obeo All Rights Reserved. |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||