|
||||||||||
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/11/12 4:56 AM from the specification file /var/lib/jenkins/jobs/PogamutUT2004 (deploy site)/workspace/src/main/jflex/GB2004Parser.jflex
Field Summary | |
---|---|
protected Object |
actObj
|
static String |
DELIMITERS_EXTENDED
|
static String |
DELIMITERS_STANDARD
|
static int |
DUMMY
|
protected ItemTranslator |
itemTranslator
object that is used to translate type of the message to the |
protected Map<Integer,Double> |
mapIntDouble
Map for list of String, Double |
protected Map<Integer,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
|
static int |
MSG_CWP
|
static int |
MSG_DAM
|
static int |
MSG_DFAIL
|
static int |
MSG_DIE
|
static int |
MSG_DLGCMD
|
static int |
MSG_DOK
lexical states |
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_GIVERES
|
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_IRC
|
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 cz.cuni.amis.pogamut.base.communication.parser.impl.yylex.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(InputStream in)
Creates a new scanner. |
|
Yylex(Reader in)
Creates a new scanner There is also a java.io.InputStream version of this constructor. |
Method Summary | |
---|---|
protected boolean |
booleanValue(String txt)
Return a boolean from boolean token in txt. |
protected ItemType.Category |
categoryValue(String txt)
Return a Category of the item. |
void |
close()
|
protected double |
doubleValue(String txt)
Return a double from num token in txt. |
protected void |
exceptionOccured(Exception e,
String info)
Logs the exception if observer present, or print it to System.out. |
protected float |
floatValue(String txt)
Return a float from num token in txt. |
protected String |
getToken(String text,
int num)
Returns 'num'-th token from 'text' using DELIMITERS_STANDARD. |
protected String |
getToken(String text,
String delimiters,
int num)
Returns 'num'-th token from 'text' using 'delimiters'. |
protected double[] |
getTriple(String txt)
Return a triple (double[]{x,y,z}) starting from num token(tokens are separated by space) in 'txt' |
protected Integer |
integerValue(String txt)
Return an integer from num token in txt. |
protected int |
intValue(String txt)
Return an integer from num token in txt. |
protected ItemDescriptor |
itemDescriptorValue(ItemType type)
|
protected ItemType |
itemTypeValue(String txt)
Return an ItemType instance. |
protected cz.cuni.amis.pogamut.base3d.worldview.object.Location |
locationValue(String txt)
Return a Location instance starting from num token(tokens are separated by space) in txt |
protected long |
longValue(String txt)
Return a long from num token in txt. |
static void |
main(String[] argv)
Runs the scanner on input files. |
protected javax.vecmath.Point3d |
point3dValue(String txt)
Return a Point3d instance starting from num token(tokens are separated by space) in txt |
protected cz.cuni.amis.pogamut.base3d.worldview.object.Rotation |
rotationValue(String txt)
Return a Rotation instance starting from num token(tokens are separated by space) in txt |
void |
setItemTranslator(ItemTranslator translator)
|
void |
setObserver(cz.cuni.amis.pogamut.base.communication.parser.impl.yylex.IYylexObserver observer)
|
void |
setReader(Reader reader)
|
void |
setTeamId(cz.cuni.amis.pogamut.multi.agent.ITeamId teamId)
Sets teamId that has to be slipped to every IWorldObjectUpdatedEvent . |
void |
setTime(cz.cuni.amis.pogamut.base.communication.worldview.event.IWorldEvent obj,
double time)
|
void |
setTime(cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdatedEvent obj,
double time)
|
void |
setTranslator(UnrealIdTranslator translator)
Set parser translating UnrealID to IntID. |
protected cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId |
stringIdValue(String txt)
Returns UnrealId for parsed token. |
protected String |
stringValue(String txt)
Returns string for parsed token. |
protected cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId |
unrealIdValue(String txt)
Return an UnrealId instance from identificator token in txt. |
protected javax.vecmath.Vector3d |
vector3dValue(String txt)
Return a Vector3d instance starting from num token(tokens are separated by space) in txt |
protected cz.cuni.amis.pogamut.base3d.worldview.object.Velocity |
velocityValue(String txt)
Return a Velocity instance starting from num token(tokens are separated by space) in txt |
protected void |
warning(String info)
Send the warning to observer or prints it to the console. |
protected cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId |
worldObjectIdValue(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. |
cz.cuni.amis.pogamut.base.communication.messages.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(Reader reader)
Resets the scanner to read from a new input stream. |
int |
yystate()
Returns the current lexical state. |
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_DOK
public static final int MSG_CONFCH
public static final int DUMMY
public static final int MSG_DIE
public static final int MSG_GIVERES
public static final int MSG_EMYINV
public static final int MSG_DLGCMD
public static final int MSG_TRG
public static final int MSG_PAUSED
public static final int MSG_SNAV
public static final int MSG_SLF
public static final int MSG_ALIVE
public static final int MSG_BOM
public static final int MSG_AIN
public static final int MSG_TRC
public static final int MSG_EHS
public static final int MSG_LOSTCHILD
public static final int MSG_PLS
public static final int MSG_ITC
public static final int MSG_VEH
public static final int MSG_PLR
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_SITC
public static final int MSG_SPLR
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_SPW
public static final int MSG_ZCB
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_IRC
public static final int MSG_VCH
public static final int MSG_WUP
public static final int MSG_SHOOT
public static final int MSG_THROWN
public static final int MSG_ANIMPORT
public static final int MSG_EMOV
public static final int MSG_HELLO_BOT
public static final int MSG_PASSWORD
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_LIN
public static final int MSG_BEG
public static final int MSG_CWP
public static final int MSG_IPTH
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_CHANGEANIM
public static final int MSG_EITC
public static final int MSG_EPLR
public static final int MSG_FIN
public static final int MSG_NAV
public static final int MSG_PONG
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 String DELIMITERS_STANDARD
public static final String DELIMITERS_EXTENDED
protected Map<Integer,Double> mapIntIDDouble
protected Map<Integer,Double> mapIntDouble
protected UnrealIdTranslator translator
protected ItemTranslator itemTranslator
protected cz.cuni.amis.pogamut.base.communication.parser.impl.yylex.IYylexObserver observer
protected double ut2004Time
protected Object actObj
Constructor Detail |
---|
public Yylex()
public Yylex(Reader in)
in
- the java.io.Reader to read input from.public Yylex(InputStream in)
in
- the java.io.Inputstream to read input from.Method Detail |
---|
public void setReader(Reader reader)
setReader
in interface cz.cuni.amis.pogamut.base.communication.parser.impl.yylex.IYylex
public void close() throws IOException
close
in interface cz.cuni.amis.pogamut.base.communication.parser.impl.yylex.IYylex
IOException
public void setItemTranslator(ItemTranslator translator)
setItemTranslator
in interface IUT2004Yylex
public void setObserver(cz.cuni.amis.pogamut.base.communication.parser.impl.yylex.IYylexObserver observer)
setObserver
in interface cz.cuni.amis.pogamut.base.communication.parser.impl.yylex.IYylex
public void setTranslator(UnrealIdTranslator translator)
setTranslator
in interface IUT2004Yylex
public void setTime(cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdatedEvent obj, double time)
public void setTime(cz.cuni.amis.pogamut.base.communication.worldview.event.IWorldEvent obj, double time)
protected void exceptionOccured(Exception e, String info)
e
- info
- protected void warning(String info)
protected String getToken(String text, String delimiters, int num)
text
- delimiters
-
protected String getToken(String text, int num)
text
-
protected int intValue(String txt)
txt
- text of parameter
protected long longValue(String txt)
txt
- text of parameter
protected Integer integerValue(String txt)
txt
- text of parameter
protected double doubleValue(String txt)
txt
- text of parameter
protected float floatValue(String txt)
txt
- text of parameter
protected double[] getTriple(String txt)
txt
- text of parameter
protected cz.cuni.amis.pogamut.base3d.worldview.object.Location locationValue(String txt)
txt
- text of parameter
protected ItemType itemTypeValue(String txt)
txt
- text of parameter
protected ItemDescriptor itemDescriptorValue(ItemType type)
protected ItemType.Category categoryValue(String txt)
txt
- text of parameter
protected cz.cuni.amis.pogamut.base3d.worldview.object.Velocity velocityValue(String txt)
txt
- text of parameter
protected cz.cuni.amis.pogamut.base3d.worldview.object.Rotation rotationValue(String txt)
txt
- text of parameter
protected javax.vecmath.Point3d point3dValue(String txt)
txt
- text of parameter
protected javax.vecmath.Vector3d vector3dValue(String txt)
txt
- text of parameter
protected String stringValue(String txt)
txt
- text of parameter
protected cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId stringIdValue(String txt)
txt
- text of parameter
protected boolean booleanValue(String txt)
txt
- text of parameter
protected cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId unrealIdValue(String txt)
txt
- text of parameter
protected cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId worldObjectIdValue(String txt)
txt
- text of parameter
public void setTeamId(cz.cuni.amis.pogamut.multi.agent.ITeamId teamId)
IWorldObjectUpdatedEvent
.
setTeamId
in interface IUT2004Yylex
public final void yyclose() throws IOException
IOException
public final void yyreset(Reader reader)
reader
- the new input streampublic final int yystate()
public final void yybegin(int newState)
newState
- the new lexical statepublic final 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 cz.cuni.amis.pogamut.base.communication.messages.InfoMessage yylex() throws IOException
yylex
in interface cz.cuni.amis.pogamut.base.communication.parser.impl.yylex.IYylex
IOException
- if any I/O-Error occurspublic static void main(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 |