⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme

📁 robocup rcssserver-11.1.2.zip
💻
字号:
1/21/2001Patrick Riley <pfr@cs.cmu.edu>part of the Soccer Server Maintenance Group <pfr+SSmaint@cs.cmu.edu>(release 3 README)This is a small program which reads lines from standard in and triesto parse them as messages in the coach language developed on the coachlist for the simulation league of RoboCup. The grammar for thelanguage is shown below. Please see the messages to the coach list for the semantics of the language.You will need to change the Makefile by hand to match the system onwhich you are running. It should be fairly obvious how this is done.Note that after compiling this program, you may have to do a 'makeclean' in the server dir before you are able to compile the serveragain.The parser is built upon lex and bison (bison is the GNU replacementfor yacc). I have included the source files generated from bison andlex, so you *may* not need those utilities to actually compile thesource. However, if you have problems, you should try 'make realclean; make' which will call lex and bison to regenerate the source files.The parser builds a hierarchy of object to represent the message. These classes can be found in region.[Ch], coach_lang_comp.[Ch], andcoach_lang.[Ch]. These classes have quite limited functionality at the moment. I will be expanding them and releasing new versions later. Itis hoped that everyone will find these classes a useful way to getstarted with the coach language quickly. If you make improvements tothis class hierarchy that you think many people would find useful,please send them to me and/or the coach list so that we avoidduplicating work.The classes in garbage.[Ch] do a sort of manual garbage collection sothat memory is not leaked, even on parse errors. I have notextensively tested this part of the system, so if you find what youthink are memory leaks, please let me know.This is still a work in development. This parsing will be rolled into the main server code shortly. With this release, I hope to giveeveryone a head start on using and understanding the coach languageand solicit any further comments.Here the the grammar which is implemented (you can also look at thecoach_lang.y file for the bison version of this)<MESSAGE> -> <INFO_MESS> | <ADVICE_MESS> | <META_MESS> | <DEFINE_MESS> | <FREEFORM_MESS>#Advice and Info messages<INFO_MESS> -> (info <TIME> <TOKEN_LIST>)<ADVICE_MESS> -> (advice <TIME> <TOKEN_LIST>)<TOKEN_LIST> -> <TOKEN_LIST> <TOKEN> | <TOKEN><TOKEN> -> (<CONDITION> <DIRECTIVE_LIST>) | 		(clear)<CONDITION> -> (true) |		(false) |		(ppos <TEAM> <UNUM_SET> <REGION>) | #all players in set are in region		(bpos <REGION>) |		(bowner <TEAM> <UNUM_SET>) | #at least one of the players from the set is the ball owner		(pmode <PLAY_MODE>) |		(and <CONDITION_LIST>) |		(or <CONDITION_LIST>) |		(not <CONDITION>) <CONDITION_LIST> -> <CONDITION_LIST> <CONDITION><DIRECTIVE_LIST> -> <DIRECTIVE_LIST> <DIRECTIVE> | <DIRECTIVE><DIRECTIVE> -> (do <TEAM> <UNUM_SET> <ACTION>) |		(dont <TEAM> <UNUM_SET> <ACTION>) <ACTION> -> (pos <REGION>) |		(home <REGION>) |		(bto <REGION> <BMOVE_SET>) |		(bto <UNUM_SET>) |		(mark <UNUM>) |		(markl <UNUM>) |		(markl <REGION>) |		(oline <REGION>) |		(htype <HET_TYPE>) #Misc. bits of data<PLAY_MODE> -> bko | time_over | play_on 	     | ko_our | ko_opp | ki_out | ki_opp | fk_our | fk_opp             | ck_our | ck_opp | gk_our | gk_opp | gc_our | gc_opp	     | ag_our | ag_opp<TIME> -> [int]<HET_TYPE> -> [int] #1-based, 0 to clear knowledge<TEAM> -> our | opp<UNUM> -> [int(0-11)]<UNUM_SET> -> { <UNUM_LIST> }<UNUM_LIST> -> <UNUM_LIST> <UNUM> | e #e here means epsilon, i.e. the empty string<BMOVE_SET> -> { <BMOVE_LIST> }<BMOVE_LIST> -> <BMOVE_LIST> <BMOVE_TOKEN> | <BMOVE_TOKEN><BMOVE_TOKEN> -> p | d | c | s #pass dribble clear score; note these do not need spaces between them#Regions<REGION> -> <POINT> |	(null)	(quad <POINT> <POINT> <POINT> <POINT>) |	(arc <POINT> [real] [real] [real] [real]) |	#small radius, large radius, start angle, end angle	(reg <REGION_LIST>)<REGION_LIST> -> <REGION_LIST> <REGION> | <REGION><POINT> -> (pt [real] [real]) #xcoord, ycoord#Meta messages<META_MESS> -> (meta <META_TOKEN_LIST>)<META_TOKEN_LIST> -> <META_TOKEN_LIST> <META_TOKEN> | <META_TOKEN><META_TOKEN> -> (ver [int])#Define messages<DEFINE_MESS> -> (define <DEFINE_TOKEN_LIST>)<DEFINE_TOKEN_LIST> -> <DEFINE_TOKEN_LIST> <DEFINE_TOKEN> | <DEFINE_TOKEN><DEFINE_TOKEN> -> <CONDITION_DEFINE> | <ACTION_DEFINE> | <REGION_DEFINE><CONDITION_DEFINE> -> (definec "[string]" CONDITION)<DIRECTIVE_DEFINE> -> (defined "[string]" DIRECTIVE)<REGION_DEFINE> ->    (definer "[string]" REGION)#Freeform messages<FREEFORM_MESS> -> (freeform "[string]")I hope you find this useful and welcome all comments.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -