|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.stevesoft.pat.StrPos
StrPos is used internally by regex to parse the regular expression.
| Field Summary | |
char |
esc
This contains the escape character, which is \ by default. |
| Constructor Summary | |
StrPos(java.lang.String s,
int pos)
Initialize a StrPos by giving it a String, and a position within the String. |
|
StrPos(StrPos sp)
initialize a StrPos from another StrPos. |
|
| Method Summary | |
void |
dup(StrPos sp)
copy a StrPos from sp to this. |
boolean |
eos()
tell whether we are at end of string |
boolean |
escaped()
Returns true if the current character is escaped (preceeded by "\"). |
boolean |
escMatch(char ch)
As match, but only matches if the character is escaped. |
patInt |
getPatInt()
Read in an integer. |
java.lang.String |
getString()
get the string that we are processing. |
StrPos |
inc()
Advance the place where StrPos points within the String. |
boolean |
incMatch(java.lang.String st)
Increment the string pointer by each character in |
boolean |
match(char ch)
Compare the (possibly escaped) character pointed to by StrPos. |
int |
pos()
Return the position in the string pointed to |
char |
thisChar()
Returns the current, possibly escaped, character. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
public char esc
| Constructor Detail |
public StrPos(StrPos sp)
public StrPos(java.lang.String s,
int pos)
| Method Detail |
public int pos()
public char thisChar()
public boolean eos()
public void dup(StrPos sp)
public StrPos inc()
public boolean match(char ch)
public boolean escMatch(char ch)
public boolean escaped()
public boolean incMatch(java.lang.String st)
stthat matches a non-escaped character.
public patInt getPatInt()
public java.lang.String getString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||