cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages
Class Yylex

Package class diagram package Yylex
java.lang.Object
  extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Yylex
All Implemented Interfaces:
IYylex, IUT2004Yylex

public class Yylex
extends Object
implements IUT2004Yylex

This class is a scanner generated by JFlex 1.4.3 on 2/18/13 5:18 AM from the specification file /mnt/jenkins/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
           
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_CTRLMSG
           
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  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
static int UNPROCESSED_MESSAGE
           
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  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  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(IYylexObserver observer)
           
protected
<T> void
setPropertyByReflection(Object object, String propertyName, Class<T> valueType, T value)
          Set property of an object by reflection Setter method name is expected to follow name convention "set", where the first letter of property name is upper case.
 void setReader(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(String txt)
          Returns UnrealId for parsed token.
protected  String stringValue(String txt)
          Returns string for parsed token.
protected  InfoMessage tryParsingUnprocessedMessage(String messageName)
          This method should be overriden to parse additional messages, that are not part of PogamutUDK Core.
protected  boolean tryParsingUnprocessedMessageParameter(String paramName, String wholeParamText)
          This method should be overridden to parse parameters of additional messages that are not part of PogamuUDK Core.
protected  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  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  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.
 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

YYEOF

public static final int YYEOF
This character denotes the end of file

See Also:
Constant Field Values

MSG_DOK

public static final int MSG_DOK
lexical states

See Also:
Constant Field Values

MSG_CONFCH

public static final int MSG_CONFCH
See Also:
Constant Field Values

MSG_DIE

public static final int MSG_DIE
See Also:
Constant Field Values

MSG_EMYINV

public static final int MSG_EMYINV
See Also:
Constant Field Values

MSG_GIVERES

public static final int MSG_GIVERES
See Also:
Constant Field Values

MSG_DLGCMD

public static final int MSG_DLGCMD
See Also:
Constant Field Values

MSG_TRG

public static final int MSG_TRG
See Also:
Constant Field Values

MSG_PAUSED

public static final int MSG_PAUSED
See Also:
Constant Field Values

MSG_SNAV

public static final int MSG_SNAV
See Also:
Constant Field Values

MSG_SLF

public static final int MSG_SLF
See Also:
Constant Field Values

MSG_ALIVE

public static final int MSG_ALIVE
See Also:
Constant Field Values

MSG_TRC

public static final int MSG_TRC
See Also:
Constant Field Values

MSG_AIN

public static final int MSG_AIN
See Also:
Constant Field Values

MSG_BOM

public static final int MSG_BOM
See Also:
Constant Field Values

MSG_EHS

public static final int MSG_EHS
See Also:
Constant Field Values

MSG_PLS

public static final int MSG_PLS
See Also:
Constant Field Values

MSG_LOSTCHILD

public static final int MSG_LOSTCHILD
See Also:
Constant Field Values

MSG_PLR

public static final int MSG_PLR
See Also:
Constant Field Values

MSG_VEH

public static final int MSG_VEH
See Also:
Constant Field Values

MSG_ITC

public static final int MSG_ITC
See Also:
Constant Field Values

MSG_TES

public static final int MSG_TES
See Also:
Constant Field Values

MSG_FTR

public static final int MSG_FTR
See Also:
Constant Field Values

MSG_SINV

public static final int MSG_SINV
See Also:
Constant Field Values

MSG_SNGP

public static final int MSG_SNGP
See Also:
Constant Field Values

MSG_SMAP

public static final int MSG_SMAP
See Also:
Constant Field Values

MSG_RECEND

public static final int MSG_RECEND
See Also:
Constant Field Values

MSG_SMYINV

public static final int MSG_SMYINV
See Also:
Constant Field Values

MSG_PLI

public static final int MSG_PLI
See Also:
Constant Field Values

MSG_NFO

public static final int MSG_NFO
See Also:
Constant Field Values

MSG_PRJ

public static final int MSG_PRJ
See Also:
Constant Field Values

MSG_SEL

public static final int MSG_SEL
See Also:
Constant Field Values

MSG_END

public static final int MSG_END
See Also:
Constant Field Values

MSG_FAL

public static final int MSG_FAL
See Also:
Constant Field Values

MSG_SITC

public static final int MSG_SITC
See Also:
Constant Field Values

MSG_SPLR

public static final int MSG_SPLR
See Also:
Constant Field Values

MSG_PASSWDOK

public static final int MSG_PASSWDOK
See Also:
Constant Field Values

MSG_ATR

public static final int MSG_ATR
See Also:
Constant Field Values

MSG_LAND

public static final int MSG_LAND
See Also:
Constant Field Values

MSG_INITED

public static final int MSG_INITED
See Also:
Constant Field Values

MSG_DAM

public static final int MSG_DAM
See Also:
Constant Field Values

MSG_GAMERESTART

public static final int MSG_GAMERESTART
See Also:
Constant Field Values

MSG_CTRLMSG

public static final int MSG_CTRLMSG
See Also:
Constant Field Values

MSG_ZCB

public static final int MSG_ZCB
See Also:
Constant Field Values

MSG_SPW

public static final int MSG_SPW
See Also:
Constant Field Values

MSG_MYINV

public static final int MSG_MYINV
See Also:
Constant Field Values

MSG_LEFT

public static final int MSG_LEFT
See Also:
Constant Field Values

MSG_MAPCHANGE

public static final int MSG_MAPCHANGE
See Also:
Constant Field Values

MSG_BMP

public static final int MSG_BMP
See Also:
Constant Field Values

MSG_HRP

public static final int MSG_HRP
See Also:
Constant Field Values

MSG_HRN

public static final int MSG_HRN
See Also:
Constant Field Values

MSG_USED

public static final int MSG_USED
See Also:
Constant Field Values

MSG_IRC

public static final int MSG_IRC
See Also:
Constant Field Values

MSG_VCH

public static final int MSG_VCH
See Also:
Constant Field Values

MSG_WUP

public static final int MSG_WUP
See Also:
Constant Field Values

MSG_SHOOT

public static final int MSG_SHOOT
See Also:
Constant Field Values

MSG_THROWN

public static final int MSG_THROWN
See Also:
Constant Field Values

MSG_ANIMPORT

public static final int MSG_ANIMPORT
See Also:
Constant Field Values

MSG_HELLO_BOT

public static final int MSG_HELLO_BOT
See Also:
Constant Field Values

MSG_EMOV

public static final int MSG_EMOV
See Also:
Constant Field Values

MSG_PASSWORD

public static final int MSG_PASSWORD
See Also:
Constant Field Values

MSG_FLG

public static final int MSG_FLG
See Also:
Constant Field Values

MSG_RECSTART

public static final int MSG_RECSTART
See Also:
Constant Field Values

MSG_EMUT

public static final int MSG_EMUT
See Also:
Constant Field Values

MSG_JOIN

public static final int MSG_JOIN
See Also:
Constant Field Values

MSG_RCH

public static final int MSG_RCH
See Also:
Constant Field Values

MSG_LOCKED

public static final int MSG_LOCKED
See Also:
Constant Field Values

MSG_PASSWDWRONG

public static final int MSG_PASSWDWRONG
See Also:
Constant Field Values

YYINITIAL

public static final int YYINITIAL
See Also:
Constant Field Values

MSG_EPTH

public static final int MSG_EPTH
See Also:
Constant Field Values

MSG_RESUMED

public static final int MSG_RESUMED
See Also:
Constant Field Values

MSG_HELLO_OBSERVER

public static final int MSG_HELLO_OBSERVER
See Also:
Constant Field Values

MSG_HELLO_CONTROL_SERVER

public static final int MSG_HELLO_CONTROL_SERVER
See Also:
Constant Field Values

MSG_SHS

public static final int MSG_SHS
See Also:
Constant Field Values

MSG_ENTERED

public static final int MSG_ENTERED
See Also:
Constant Field Values

MSG_DFAIL

public static final int MSG_DFAIL
See Also:
Constant Field Values

MSG_MOV

public static final int MSG_MOV
See Also:
Constant Field Values

MSG_WAL

public static final int MSG_WAL
See Also:
Constant Field Values

MSG_JUMP

public static final int MSG_JUMP
See Also:
Constant Field Values

MSG_ENAV

public static final int MSG_ENAV
See Also:
Constant Field Values

MSG_IPK

public static final int MSG_IPK
See Also:
Constant Field Values

MSG_MUT

public static final int MSG_MUT
See Also:
Constant Field Values

MSG_LIN

public static final int MSG_LIN
See Also:
Constant Field Values

MSG_BEG

public static final int MSG_BEG
See Also:
Constant Field Values

MSG_CWP

public static final int MSG_CWP
See Also:
Constant Field Values

MSG_IPTH

public static final int MSG_IPTH
See Also:
Constant Field Values

MSG_VMT

public static final int MSG_VMT
See Also:
Constant Field Values

MSG_VMS

public static final int MSG_VMS
See Also:
Constant Field Values

MSG_EINV

public static final int MSG_EINV
See Also:
Constant Field Values

MSG_TEAMCHANGE

public static final int MSG_TEAMCHANGE
See Also:
Constant Field Values

MSG_ENGP

public static final int MSG_ENGP
See Also:
Constant Field Values

MSG_EMAP

public static final int MSG_EMAP
See Also:
Constant Field Values

MSG_KIL

public static final int MSG_KIL
See Also:
Constant Field Values

MSG_KEYEVENT

public static final int MSG_KEYEVENT
See Also:
Constant Field Values

UNPROCESSED_MESSAGE

public static final int UNPROCESSED_MESSAGE
See Also:
Constant Field Values

MSG_SMOV

public static final int MSG_SMOV
See Also:
Constant Field Values

MSG_HIT

public static final int MSG_HIT
See Also:
Constant Field Values

MSG_ANIMATIONBOTID

public static final int MSG_ANIMATIONBOTID
See Also:
Constant Field Values

MSG_COMBO

public static final int MSG_COMBO
See Also:
Constant Field Values

MSG_INGP

public static final int MSG_INGP
See Also:
Constant Field Values

MSG_SMUT

public static final int MSG_SMUT
See Also:
Constant Field Values

MSG_IMAP

public static final int MSG_IMAP
See Also:
Constant Field Values

MSG_CHANGEANIM

public static final int MSG_CHANGEANIM
See Also:
Constant Field Values

MSG_EITC

public static final int MSG_EITC
See Also:
Constant Field Values

MSG_EPLR

public static final int MSG_EPLR
See Also:
Constant Field Values

MSG_FIN

public static final int MSG_FIN
See Also:
Constant Field Values

MSG_NAV

public static final int MSG_NAV
See Also:
Constant Field Values

MSG_PONG

public static final int MSG_PONG
See Also:
Constant Field Values

MSG_ADG

public static final int MSG_ADG
See Also:
Constant Field Values

MSG_ANIMATIONSTOPPED

public static final int MSG_ANIMATIONSTOPPED
See Also:
Constant Field Values

MSG_STOPSHOOT

public static final int MSG_STOPSHOOT
See Also:
Constant Field Values

MSG_INV

public static final int MSG_INV
See Also:
Constant Field Values

MSG_SPTH

public static final int MSG_SPTH
See Also:
Constant Field Values

DELIMITERS_STANDARD

public static final String DELIMITERS_STANDARD
See Also:
Constant Field Values

DELIMITERS_EXTENDED

public static final String DELIMITERS_EXTENDED
See Also:
Constant Field Values

mapIntIDDouble

protected Map<Integer,Double> mapIntIDDouble
Map for list of String, Double


mapIntDouble

protected Map<Integer,Double> mapIntDouble
Map for list of String, Double


translator

protected UnrealIdTranslator translator
parser reference, this parser will be used for translation of UnrealID to IntID


itemTranslator

protected ItemTranslator itemTranslator
object that is used to translate type of the message to the


observer

protected IYylexObserver observer
observer for the yylex for reporting exceptions


ut2004Time

protected double ut2004Time
time in the UT2004


actObj

protected Object actObj
Constructor Detail

Yylex

public Yylex()

Yylex

public Yylex(Reader in)
Creates a new scanner There is also a java.io.InputStream version of this constructor.

Parameters:
in - the java.io.Reader to read input from.

Yylex

public Yylex(InputStream in)
Creates a new scanner. There is also java.io.Reader version of this constructor.

Parameters:
in - the java.io.Inputstream to read input from.
Method Detail

setReader

public void setReader(Reader reader)
Specified by:
setReader in interface IYylex

close

public void close()
           throws IOException
Specified by:
close in interface IYylex
Throws:
IOException

setItemTranslator

public void setItemTranslator(ItemTranslator translator)
Specified by:
setItemTranslator in interface IUT2004Yylex

setObserver

public void setObserver(IYylexObserver observer)
Specified by:
setObserver in interface IYylex

setTranslator

public void setTranslator(UnrealIdTranslator translator)
Set parser translating UnrealID to IntID. This function should be called after constructor, I dont know how to define constructor, so this will do.

Specified by:
setTranslator in interface IUT2004Yylex

setTime

public void setTime(IWorldObjectUpdatedEvent obj,
                    double time)

setTime

public void setTime(IWorldEvent obj,
                    double time)

setPropertyByReflection

protected <T> void setPropertyByReflection(Object object,
                                           String propertyName,
                                           Class<T> valueType,
                                           T value)
Set property of an object by reflection Setter method name is expected to follow name convention "set", where the first letter of property name is upper case. Potential access restriction of the setter method is overriden via reflection.

Parameters:
object - the object
propertyName - property name
valueType - property value / setter argument type
value - value to set

exceptionOccured

protected void exceptionOccured(Exception e,
                                String info)
Logs the exception if observer present, or print it to System.out.

Does not throw the exception...

If exception 'e' is null, only info message is written to logs.

Parameters:
e -
info -

warning

protected void warning(String info)
Send the warning to observer or prints it to the console.


tryParsingUnprocessedMessage

protected InfoMessage tryParsingUnprocessedMessage(String messageName)
This method should be overriden to parse additional messages, that are not part of PogamutUDK Core. This method is called whenever the parser meets a message name it does not recognize. If the message is recognized by overriding class, it should return new instance of a message the name represents. Otherwise it should return null. The newly created message is then accesible for parameter setting via #getParsedObject() . For further discussion on how this is done see wiki article.

Parameters:
messageName -
Returns:
New message or null if not recognized
See Also:
tryParsingUnprocessedMessageParameter(java.lang.String, java.lang.String)

tryParsingUnprocessedMessageParameter

protected boolean tryParsingUnprocessedMessageParameter(String paramName,
                                                        String wholeParamText)
This method should be overridden to parse parameters of additional messages that are not part of PogamuUDK Core. Once the message was recognized by tryParsingUnprocessedMessage(java.lang.String) this method is called for every parameter.

Parameters:
paramName - The name of the parameter as appeared in the Gamebots message
wholeParamText - Whole text of the parameter part of message (contains the param name) - this string can be directly passed to xxxValue methods of this class to obtain translated values for basically all usable datatypes. If this is not enough, use getToken(java.lang.String, int) to extract desired part of the message text (the value has index 1)
Returns:
See Also:
tryParsingUnprocessedMessage(java.lang.String)

getToken

protected String getToken(String text,
                          String delimiters,
                          int num)
Returns 'num'-th token from 'text' using 'delimiters'.

Use only IFF you're getting only one token from 'text'.

Parameters:
text -
delimiters -
Returns:
String token

getToken

protected String getToken(String text,
                          int num)
Returns 'num'-th token from 'text' using DELIMITERS_STANDARD.

Use only IFF you're getting only one token from 'text'.

Parameters:
text -
Returns:
String token

intValue

protected int intValue(String txt)
Return an integer from num token in txt.

Integer token is expected to be 'second token' in the 'txt' using delimiters " {}".

Parameters:
txt - text of parameter
Returns:
Integer from given token.

longValue

protected long longValue(String txt)
Return a long from num token in txt.

Long token is expected to be 'second token' in the 'txt' using delimiters " {}".

Parameters:
txt - text of parameter
Returns:
Integer from given token.

integerValue

protected Integer integerValue(String txt)
Return an integer from num token in txt.

Integer token is expected to be 'second token' in the 'txt' using delimiters " {}".

Parameters:
txt - text of parameter
Returns:
Integer from given token.

doubleValue

protected double doubleValue(String txt)
Return a double from num token in txt.

Num token is expected to be 'second token' in the 'txt' using delimiters " {}".

Parameters:
txt - text of parameter
Returns:
Double from given token.

floatValue

protected float floatValue(String txt)
Return a float from num token in txt.

Num token is expected to be 'second token' in the 'txt' using delimiters " {}".

Parameters:
txt - text of parameter
Returns:
Float from given token.

getTriple

protected double[] getTriple(String txt)
Return a triple (double[]{x,y,z}) starting from num token(tokens are separated by space) in 'txt'

Parameters:
txt - text of parameter
Returns:
Array of three doubles from given token.

locationValue

protected Location locationValue(String txt)
Return a Location instance starting from num token(tokens are separated by space) in txt

Parameters:
txt - text of parameter
Returns:
Location from given token.

itemTypeValue

protected ItemType itemTypeValue(String txt)
Return an ItemType instance.

Parameters:
txt - text of parameter
Returns:
ItemType from given token.

itemDescriptorValue

protected ItemDescriptor itemDescriptorValue(ItemType type)

categoryValue

protected ItemType.Category categoryValue(String txt)
Return a Category of the item.

Parameters:
txt - text of parameter
Returns:
ItemType.Category from given token.

velocityValue

protected Velocity velocityValue(String txt)
Return a Velocity instance starting from num token(tokens are separated by space) in txt

Parameters:
txt - text of parameter
Returns:
Velocity from given token.

rotationValue

protected Rotation rotationValue(String txt)
Return a Rotation instance starting from num token(tokens are separated by space) in txt

Parameters:
txt - text of parameter
Returns:
Rotation from given token.

point3dValue

protected javax.vecmath.Point3d point3dValue(String txt)
Return a Point3d instance starting from num token(tokens are separated by space) in txt

Parameters:
txt - text of parameter
Returns:
Point3d from given token.

vector3dValue

protected javax.vecmath.Vector3d vector3dValue(String txt)
Return a Vector3d instance starting from num token(tokens are separated by space) in txt

Parameters:
txt - text of parameter
Returns:
Vector3d from given token.

stringValue

protected String stringValue(String txt)
Returns string for parsed token.

Parameters:
txt - text of parameter
Returns:
String from given token.

stringIdValue

protected UnrealId stringIdValue(String txt)
Returns UnrealId for parsed token.

Parameters:
txt - text of parameter
Returns:
StringId from given token.

booleanValue

protected boolean booleanValue(String txt)
Return a boolean from boolean token in txt.

Boolean token is expected to be 'second token' in the 'txt' using delimiters " {}".

Parameters:
txt - text of parameter
Returns:
Boolean from given token.

unrealIdValue

protected UnrealId unrealIdValue(String txt)
Return an UnrealId instance from identificator token in txt.

Boolean token is expected to be 'second token' in the 'txt' using delimiters " {}".

Parameters:
txt - text of parameter
Returns:
UnrealId from given token.

worldObjectIdValue

protected UnrealId worldObjectIdValue(String txt)
Return an UnrealId instance from identificator token in txt.

Boolean token is expected to be 'second token' in the 'txt' using delimiters " {}".

Parameters:
txt - text of parameter
Returns:
UnrealId from given token.

setTeamId

public void setTeamId(ITeamId teamId)
Sets teamId that has to be slipped to every IWorldObjectUpdatedEvent.

Specified by:
setTeamId in interface IUT2004Yylex

yyclose

public final void yyclose()
                   throws IOException
Closes the input stream.

Throws:
IOException

yyreset

public final void yyreset(Reader reader)
Resets the scanner to read from a new input stream. Does not close the old reader. All internal variables are reset, the old input stream cannot be reused (internal buffer is discarded and lost). Lexical state is set to ZZ_INITIAL.

Parameters:
reader - the new input stream

yystate

public final int yystate()
Returns the current lexical state.


yybegin

public final void yybegin(int newState)
Enters a new lexical state

Parameters:
newState - the new lexical state

yytext

public final String yytext()
Returns the text matched by the current regular expression.


yycharat

public final char yycharat(int pos)
Returns the character at position pos from the matched text. It is equivalent to yytext().charAt(pos), but faster

Parameters:
pos - the position of the character to fetch. A value from 0 to yylength()-1.
Returns:
the character at position pos

yylength

public final int yylength()
Returns the length of the matched text region.


yypushback

public void yypushback(int number)
Pushes the specified amount of characters back into the input stream. They will be read again by then next call of the scanning method

Parameters:
number - the number of characters to be read again. This number must not be greater than yylength()!

yylex

public InfoMessage yylex()
                  throws IOException
Resumes scanning until the next regular expression is matched, the end of input is encountered or an I/O-Error occurs.

Specified by:
yylex in interface IYylex
Returns:
the next token
Throws:
IOException - if any I/O-Error occurs

main

public static void main(String[] argv)
Runs the scanner on input files. This is a standalone scanner, it will print any unmatched text to System.out unchanged.

Parameters:
argv - the command line, contains the filenames to run the scanner on.


Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.