|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Yylex
public class Yylex
This class is a scanner generated by JFlex 1.4.3 on 3/10/11 1:42 PM from the specification file D:/Programming/Workspaces/Pogamut-Maven2/maven2/Main/PogamutUT2004/src/main/jflex/GB2004Parser.jflex
Field Summary | |
---|---|
protected java.lang.Object |
actObj
|
static java.lang.String |
DELIMITERS_EXTENDED
|
static java.lang.String |
DELIMITERS_STANDARD
|
static int |
DUMMY
|
protected ItemTranslator |
itemTranslator
object that is used to translate type of the message to the |
protected java.util.Map<java.lang.Integer,java.lang.Double> |
mapIntDouble
Map for list of String, Double |
protected java.util.Map<java.lang.Integer,java.lang.Double> |
mapIntIDDouble
Map for list of String, Double |
static int |
MSG_ADG
|
static int |
MSG_AIN
|
static int |
MSG_ALIVE
|
static int |
MSG_ANIMATIONBOTID
|
static int |
MSG_ANIMATIONSTOPPED
|
static int |
MSG_ANIMPORT
|
static int |
MSG_ATR
|
static int |
MSG_BEG
|
static int |
MSG_BMP
|
static int |
MSG_BOM
|
static int |
MSG_CHANGEANIM
|
static int |
MSG_COMBO
|
static int |
MSG_CONFCH
lexical states |
static int |
MSG_CWP
|
static int |
MSG_DAM
|
static int |
MSG_DFAIL
|
static int |
MSG_DIE
|
static int |
MSG_DLGCMD
|
static int |
MSG_DOK
|
static int |
MSG_EHS
|
static int |
MSG_EINV
|
static int |
MSG_EITC
|
static int |
MSG_EMAP
|
static int |
MSG_EMOV
|
static int |
MSG_EMUT
|
static int |
MSG_EMYINV
|
static int |
MSG_ENAV
|
static int |
MSG_END
|
static int |
MSG_ENGP
|
static int |
MSG_ENTERED
|
static int |
MSG_EPLR
|
static int |
MSG_EPTH
|
static int |
MSG_FAL
|
static int |
MSG_FIN
|
static int |
MSG_FLG
|
static int |
MSG_FTR
|
static int |
MSG_GAMERESTART
|
static int |
MSG_HELLO_BOT
|
static int |
MSG_HELLO_CONTROL_SERVER
|
static int |
MSG_HELLO_OBSERVER
|
static int |
MSG_HIT
|
static int |
MSG_HRN
|
static int |
MSG_HRP
|
static int |
MSG_IMAP
|
static int |
MSG_INGP
|
static int |
MSG_INITED
|
static int |
MSG_INV
|
static int |
MSG_IPK
|
static int |
MSG_IPTH
|
static int |
MSG_ITC
|
static int |
MSG_JOIN
|
static int |
MSG_JUMP
|
static int |
MSG_KEYEVENT
|
static int |
MSG_KIL
|
static int |
MSG_LAND
|
static int |
MSG_LEFT
|
static int |
MSG_LIN
|
static int |
MSG_LOCKED
|
static int |
MSG_LOSTCHILD
|
static int |
MSG_MAPCHANGE
|
static int |
MSG_MOV
|
static int |
MSG_MUT
|
static int |
MSG_MYINV
|
static int |
MSG_NAV
|
static int |
MSG_NFO
|
static int |
MSG_PASSWDOK
|
static int |
MSG_PASSWDWRONG
|
static int |
MSG_PASSWORD
|
static int |
MSG_PAUSED
|
static int |
MSG_PLI
|
static int |
MSG_PLR
|
static int |
MSG_PLS
|
static int |
MSG_PONG
|
static int |
MSG_PRJ
|
static int |
MSG_RCH
|
static int |
MSG_RECEND
|
static int |
MSG_RECSTART
|
static int |
MSG_RESUMED
|
static int |
MSG_SEL
|
static int |
MSG_SHOOT
|
static int |
MSG_SHS
|
static int |
MSG_SINV
|
static int |
MSG_SITC
|
static int |
MSG_SLF
|
static int |
MSG_SMAP
|
static int |
MSG_SMOV
|
static int |
MSG_SMUT
|
static int |
MSG_SMYINV
|
static int |
MSG_SNAV
|
static int |
MSG_SNGP
|
static int |
MSG_SPLR
|
static int |
MSG_SPTH
|
static int |
MSG_SPW
|
static int |
MSG_STOPSHOOT
|
static int |
MSG_TEAMCHANGE
|
static int |
MSG_TES
|
static int |
MSG_THROWN
|
static int |
MSG_TRC
|
static int |
MSG_TRG
|
static int |
MSG_USED
|
static int |
MSG_VCH
|
static int |
MSG_VEH
|
static int |
MSG_VMS
|
static int |
MSG_VMT
|
static int |
MSG_WAL
|
static int |
MSG_WUP
|
static int |
MSG_ZCB
|
protected IYylexObserver |
observer
observer for the yylex for reporting exceptions |
protected UnrealIdTranslator |
translator
parser reference, this parser will be used for translation of UnrealID to IntID |
protected double |
ut2004Time
time in the UT2004 |
static int |
YYEOF
This character denotes the end of file |
static int |
YYINITIAL
|
Constructor Summary | |
---|---|
Yylex()
|
|
Yylex(java.io.InputStream in)
Creates a new scanner. |
|
Yylex(java.io.Reader in)
Creates a new scanner There is also a java.io.InputStream version of this constructor. |
Method Summary | |
---|---|
protected boolean |
booleanValue(java.lang.String txt)
Return a boolean from boolean token in txt. |
protected ItemType.Category |
categoryValue(java.lang.String txt)
Return a Category of the item. |
void |
close()
|
protected double |
doubleValue(java.lang.String txt)
Return a double from num token in txt. |
protected void |
exceptionOccured(java.lang.Exception e,
java.lang.String info)
Logs the exception if observer present, or print it to System.out. |
protected float |
floatValue(java.lang.String txt)
Return a float from num token in txt. |
protected java.lang.String |
getToken(java.lang.String text,
int num)
Returns 'num'-th token from 'text' using DELIMITERS_STANDARD. |
protected java.lang.String |
getToken(java.lang.String text,
java.lang.String delimiters,
int num)
Returns 'num'-th token from 'text' using 'delimiters'. |
protected double[] |
getTriple(java.lang.String txt)
Return a triple (double[]{x,y,z}) starting from num token(tokens are separated by space) in 'txt' |
protected java.lang.Integer |
integerValue(java.lang.String txt)
Return an integer from num token in txt. |
protected int |
intValue(java.lang.String txt)
Return an integer from num token in txt. |
protected ItemDescriptor |
itemDescriptorValue(ItemType type)
|
protected ItemType |
itemTypeValue(java.lang.String txt)
Return an ItemType instance. |
protected Location |
locationValue(java.lang.String txt)
Return a Location instance starting from num token(tokens are separated by space) in txt |
protected long |
longValue(java.lang.String txt)
Return a long from num token in txt. |
static void |
main(java.lang.String[] argv)
Runs the scanner on input files. |
protected Point3d |
point3dValue(java.lang.String txt)
Return a Point3d instance starting from num token(tokens are separated by space) in txt |
protected Rotation |
rotationValue(java.lang.String txt)
Return a Rotation instance starting from num token(tokens are separated by space) in txt |
void |
setItemTranslator(ItemTranslator translator)
|
void |
setObserver(IYylexObserver observer)
|
void |
setReader(java.io.Reader reader)
|
void |
setTeamId(ITeamId teamId)
Sets teamId that has to be slipped to every IWorldObjectUpdatedEvent . |
void |
setTime(IWorldEvent obj,
double time)
|
void |
setTime(IWorldObjectUpdatedEvent obj,
double time)
|
void |
setTranslator(UnrealIdTranslator translator)
Set parser translating UnrealID to IntID. |
protected UnrealId |
stringIdValue(java.lang.String txt)
Returns UnrealId for parsed token. |
protected java.lang.String |
stringValue(java.lang.String txt)
Returns string for parsed token. |
protected UnrealId |
unrealIdValue(java.lang.String txt)
Return an UnrealId instance from identificator token in txt. |
protected Vector3d |
vector3dValue(java.lang.String txt)
Return a Vector3d instance starting from num token(tokens are separated by space) in txt |
protected Velocity |
velocityValue(java.lang.String txt)
Return a Velocity instance starting from num token(tokens are separated by space) in txt |
protected void |
warning(java.lang.String info)
Send the warning to observer or prints it to the console. |
protected UnrealId |
worldObjectIdValue(java.lang.String txt)
Return an UnrealId instance from identificator token in txt. |
void |
yybegin(int newState)
Enters a new lexical state |
char |
yycharat(int pos)
Returns the character at position pos from the matched text. |
void |
yyclose()
Closes the input stream. |
int |
yylength()
Returns the length of the matched text region. |
InfoMessage |
yylex()
Resumes scanning until the next regular expression is matched, the end of input is encountered or an I/O-Error occurs. |
void |
yypushback(int number)
Pushes the specified amount of characters back into the input stream. |
void |
yyreset(java.io.Reader reader)
Resets the scanner to read from a new input stream. |
int |
yystate()
Returns the current lexical state. |
java.lang.String |
yytext()
Returns the text matched by the current regular expression. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int YYEOF
public static final int MSG_CONFCH
public static final int DUMMY
public static final int MSG_DOK
public static final int MSG_DIE
public static final int MSG_EMYINV
public static final int MSG_TRG
public static final int MSG_DLGCMD
public static final int MSG_PAUSED
public static final int MSG_SLF
public static final int MSG_SNAV
public static final int MSG_ALIVE
public static final int MSG_TRC
public static final int MSG_AIN
public static final int MSG_BOM
public static final int MSG_EHS
public static final int MSG_PLS
public static final int MSG_LOSTCHILD
public static final int MSG_VEH
public static final int MSG_PLR
public static final int MSG_ITC
public static final int MSG_TES
public static final int MSG_FTR
public static final int MSG_SINV
public static final int MSG_SNGP
public static final int MSG_RECEND
public static final int MSG_SMAP
public static final int MSG_SMYINV
public static final int MSG_PLI
public static final int MSG_NFO
public static final int MSG_PRJ
public static final int MSG_SEL
public static final int MSG_END
public static final int MSG_FAL
public static final int MSG_SPLR
public static final int MSG_SITC
public static final int MSG_PASSWDOK
public static final int MSG_ATR
public static final int MSG_LAND
public static final int MSG_INITED
public static final int MSG_DAM
public static final int MSG_GAMERESTART
public static final int MSG_ZCB
public static final int MSG_SPW
public static final int MSG_MYINV
public static final int MSG_LEFT
public static final int MSG_MAPCHANGE
public static final int MSG_BMP
public static final int MSG_HRP
public static final int MSG_HRN
public static final int MSG_USED
public static final int MSG_VCH
public static final int MSG_WUP
public static final int MSG_THROWN
public static final int MSG_SHOOT
public static final int MSG_ANIMPORT
public static final int MSG_PASSWORD
public static final int MSG_HELLO_BOT
public static final int MSG_EMOV
public static final int MSG_FLG
public static final int MSG_RECSTART
public static final int MSG_EMUT
public static final int MSG_JOIN
public static final int MSG_RCH
public static final int MSG_LOCKED
public static final int MSG_PASSWDWRONG
public static final int YYINITIAL
public static final int MSG_EPTH
public static final int MSG_RESUMED
public static final int MSG_HELLO_OBSERVER
public static final int MSG_HELLO_CONTROL_SERVER
public static final int MSG_SHS
public static final int MSG_ENTERED
public static final int MSG_DFAIL
public static final int MSG_MOV
public static final int MSG_WAL
public static final int MSG_JUMP
public static final int MSG_ENAV
public static final int MSG_IPK
public static final int MSG_MUT
public static final int MSG_IPTH
public static final int MSG_BEG
public static final int MSG_CWP
public static final int MSG_LIN
public static final int MSG_VMT
public static final int MSG_VMS
public static final int MSG_EINV
public static final int MSG_TEAMCHANGE
public static final int MSG_ENGP
public static final int MSG_EMAP
public static final int MSG_KIL
public static final int MSG_KEYEVENT
public static final int MSG_HIT
public static final int MSG_SMOV
public static final int MSG_ANIMATIONBOTID
public static final int MSG_COMBO
public static final int MSG_INGP
public static final int MSG_SMUT
public static final int MSG_IMAP
public static final int MSG_EPLR
public static final int MSG_CHANGEANIM
public static final int MSG_EITC
public static final int MSG_FIN
public static final int MSG_PONG
public static final int MSG_NAV
public static final int MSG_ADG
public static final int MSG_ANIMATIONSTOPPED
public static final int MSG_STOPSHOOT
public static final int MSG_INV
public static final int MSG_SPTH
public static final java.lang.String DELIMITERS_STANDARD
public static final java.lang.String DELIMITERS_EXTENDED
protected java.util.Map<java.lang.Integer,java.lang.Double> mapIntIDDouble
protected java.util.Map<java.lang.Integer,java.lang.Double> mapIntDouble
protected UnrealIdTranslator translator
protected ItemTranslator itemTranslator
protected IYylexObserver observer
protected double ut2004Time
protected java.lang.Object actObj
Constructor Detail |
---|
public Yylex()
public Yylex(java.io.Reader in)
in
- the java.io.Reader to read input from.public Yylex(java.io.InputStream in)
in
- the java.io.Inputstream to read input from.Method Detail |
---|
public void setReader(java.io.Reader reader)
setReader
in interface IYylex
public void close() throws java.io.IOException
close
in interface IYylex
java.io.IOException
public void setItemTranslator(ItemTranslator translator)
setItemTranslator
in interface IUT2004Yylex
public void setObserver(IYylexObserver observer)
setObserver
in interface IYylex
public void setTranslator(UnrealIdTranslator translator)
setTranslator
in interface IUT2004Yylex
public void setTime(IWorldObjectUpdatedEvent obj, double time)
public void setTime(IWorldEvent obj, double time)
protected void exceptionOccured(java.lang.Exception e, java.lang.String info)
e
- info
- protected void warning(java.lang.String info)
protected java.lang.String getToken(java.lang.String text, java.lang.String delimiters, int num)
text
- delimiters
-
protected java.lang.String getToken(java.lang.String text, int num)
text
-
protected int intValue(java.lang.String txt)
txt
- text of parameter
protected long longValue(java.lang.String txt)
txt
- text of parameter
protected java.lang.Integer integerValue(java.lang.String txt)
txt
- text of parameter
protected double doubleValue(java.lang.String txt)
txt
- text of parameter
protected float floatValue(java.lang.String txt)
txt
- text of parameter
protected double[] getTriple(java.lang.String txt)
txt
- text of parameter
protected Location locationValue(java.lang.String txt)
txt
- text of parameter
protected ItemType itemTypeValue(java.lang.String txt)
txt
- text of parameter
protected ItemDescriptor itemDescriptorValue(ItemType type)
protected ItemType.Category categoryValue(java.lang.String txt)
txt
- text of parameter
protected Velocity velocityValue(java.lang.String txt)
txt
- text of parameter
protected Rotation rotationValue(java.lang.String txt)
txt
- text of parameter
protected Point3d point3dValue(java.lang.String txt)
txt
- text of parameter
protected Vector3d vector3dValue(java.lang.String txt)
txt
- text of parameter
protected java.lang.String stringValue(java.lang.String txt)
txt
- text of parameter
protected UnrealId stringIdValue(java.lang.String txt)
txt
- text of parameter
protected boolean booleanValue(java.lang.String txt)
txt
- text of parameter
protected UnrealId unrealIdValue(java.lang.String txt)
txt
- text of parameter
protected UnrealId worldObjectIdValue(java.lang.String txt)
txt
- text of parameter
public void setTeamId(ITeamId teamId)
IWorldObjectUpdatedEvent
.
public final void yyclose() throws java.io.IOException
java.io.IOException
public final void yyreset(java.io.Reader reader)
reader
- the new input streampublic final int yystate()
public final void yybegin(int newState)
newState
- the new lexical statepublic final java.lang.String yytext()
public final char yycharat(int pos)
pos
- the position of the character to fetch.
A value from 0 to yylength()-1.
public final int yylength()
public void yypushback(int number)
number
- the number of characters to be read again.
This number must not be greater than yylength()!public InfoMessage yylex() throws java.io.IOException
yylex
in interface IYylex
java.io.IOException
- if any I/O-Error occurspublic static void main(java.lang.String[] argv)
argv
- the command line, contains the filenames to run
the scanner on.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |