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

📄 player_command_parser.cc

📁 在LINUX下运行的仿真机器人服务器源代码
💻 CC
📖 第 1 页 / 共 3 页
字号:
/*  A Bison parser, made from /Users/tom/rcssserver/release/rcssserver/10.0.7/src/player_command_parser.yy    by GNU Bison version 1.28  */#define YYBISON 1  /* Identify Bison output.  */#define	RCSS_PCOM_INT	257#define	RCSS_PCOM_REAL	258#define	RCSS_PCOM_STR	259#define	RCSS_PCOM_LP	260#define	RCSS_PCOM_RP	261#define	RCSS_PCOM_DASH	262#define	RCSS_PCOM_TURN	263#define	RCSS_PCOM_TURN_NECK	264#define	RCSS_PCOM_KICK	265#define	RCSS_PCOM_CATCH	266#define	RCSS_PCOM_SAY	267#define	RCSS_PCOM_UNQ_SAY	268#define	RCSS_PCOM_SENSE_BODY	269#define	RCSS_PCOM_SCORE	270#define	RCSS_PCOM_MOVE	271#define	RCSS_PCOM_CHANGE_VIEW	272#define	RCSS_PCOM_COMPRESSION	273#define	RCSS_PCOM_BYE	274#define	RCSS_PCOM_DONE	275#define	RCSS_PCOM_POINTTO	276#define	RCSS_PCOM_ATTENTIONTO	277#define	RCSS_PCOM_TACKLE	278#define	RCSS_PCOM_CLANG	279#define	RCSS_PCOM_EAR	280#define	RCSS_PCOM_VIEW_WIDTH_NARROW	281#define	RCSS_PCOM_VIEW_WIDTH_NORMAL	282#define	RCSS_PCOM_VIEW_WIDTH_WIDE	283#define	RCSS_PCOM_VIEW_QUALITY_LOW	284#define	RCSS_PCOM_VIEW_QUALITY_HIGH	285#define	RCSS_PCOM_ON	286#define	RCSS_PCOM_OFF	287#define	RCSS_PCOM_OUR	288#define	RCSS_PCOM_OPP	289#define	RCSS_PCOM_LEFT	290#define	RCSS_PCOM_RIGHT	291#define	RCSS_PCOM_EAR_PARTIAL	292#define	RCSS_PCOM_EAR_COMPLETE	293#define	RCSS_PCOM_CLANG_VERSION	294#define	RCSS_PCOM_ERROR	295#line 26 "player_command_parser.yy"#include "pcombuilder.h"#include "pcomparser.h"#define    yyparse    RCSS_PCOM_parsevoid yyerror( const char* s );int yyerror( char* s );#define YYPARSE_PARAM paramnamespace{  rcss::pcom::Parser::Param&  getParam( void* param )  {     static rcss::pcom::Parser::Param* cached_param                    = reinterpret_cast< rcss::pcom::Parser::Param* >( param );    if( cached_param != param ){      cached_param = reinterpret_cast< rcss::pcom::Parser::Param* >( param );    }    return *cached_param;  }  inline rcss::pcom::Builder& getBuilder( void* param )  {    return getParam( param ).getBuilder();  }#define YYSTYPE rcss::pcom::Parser::Lexer::Holder    inline int yylex( YYSTYPE* holder, rcss::pcom::Parser::Param& param )  {    int rval = param.getLexer().lex( *holder );//    cout << rval << endl;    return rval;  }}#define YYLEX_PARAM getParam( param )#define BUILDER getBuilder( param )#include <stdio.h>#ifndef __cplusplus#ifndef __STDC__#define const#endif#endif#define	YYFINAL		123#define	YYFLAG		-32768#define	YYNTBASE	44#define YYTRANSLATE(x) ((unsigned)(x) <= 295 ? yytranslate[x] : 70)static const char yytranslate[] = {     0,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,    37,     2,     2,     2,     2,     2,    39,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     1,     3,     4,     5,     6,     7,     8,     9,    10,    11,    12,    13,    14,    15,    16,    17,    18,    19,    20,    21,    22,    23,    24,    25,    26,    27,    28,    29,    30,    31,    32,    33,    34,    35,    36,    38,    40,    41,    42,    43};#if YYDEBUG != 0static const short yyprhs[] = {     0,     0,     2,     5,     7,     9,    11,    13,    15,    17,    19,    21,    23,    25,    27,    29,    31,    33,    35,    37,    39,    41,    46,    51,    56,    62,    67,    69,    74,    78,    82,    88,    94,    96,    98,   100,   102,   104,   109,   113,   117,   123,   128,   134,   140,   145,   150,   159,   168,   177,   185,   193,   201,   208,   210,   212,   214,   216,   218,   220,   222,   224,   226};static const short yyrhs[] = {    45,     0,    44,    45,     0,    46,     0,    47,     0,    48,     0,    49,     0,    50,     0,    51,     0,    52,     0,    53,     0,    54,     0,    55,     0,    58,     0,    59,     0,    60,     0,    61,     0,    62,     0,    63,     0,    64,     0,    65,     0,     6,     8,    69,     7,     0,     6,     9,    69,     7,     0,     6,    10,    69,     7,     0,     6,    11,    69,    69,     7,     0,     6,    12,    69,     7,     0,    14,     0,     6,    13,     5,     7,     0,     6,    15,     7,     0,     6,    16,     7,     0,     6,    17,    69,    69,     7,     0,     6,    18,    56,    57,     7,     0,    27,     0,    28,     0,    29,     0,    30,     0,    31,     0,     6,    19,     3,     7,     0,     6,    20,     7,     0,     6,    21,     7,     0,     6,    22,    69,    69,     7,     0,     6,    22,    33,     7,     0,     6,    23,    67,     3,     7,     0,     6,    23,     5,     3,     7,     0,     6,    23,    33,     7,     0,     6,    24,    69,     7,     0,     6,    25,     6,    42,     3,     3,     7,     7,     0,     6,    26,     6,    66,    67,    68,     7,     7,     0,     6,    26,     6,    66,     5,    68,     7,     7,     0,     6,    26,     6,    66,    67,     7,     7,     0,     6,    26,     6,    66,     5,     7,     7,     0,     6,    26,     6,    66,    68,     7,     7,     0,     6,    26,     6,    66,     7,     7,     0,    32,     0,    33,     0,    34,     0,    35,     0,    36,     0,    38,     0,    40,     0,    41,     0,     3,     0,     4,     0};#endif#if YYDEBUG != 0static const short yyrline[] = { 0,   127,   128,   130,   131,   132,   133,   134,   135,   136,   137,   138,   139,   140,   141,   142,   143,   144,   145,   146,   147,   149,   154,   159,   164,   169,   174,   178,   183,   188,   193,   198,   203,   207,   211,   216,   220,   225,   230,   235,   240,   244,   249,   253,   257,   262,   267,   272,   276,   280,   284,   288,   292,   298,   302,   307,   311,   315,   319,   324,   328,   333,   337};#endif#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)static const char * const yytname[] = {   "$","error","$undefined.","RCSS_PCOM_INT","RCSS_PCOM_REAL","RCSS_PCOM_STR","\"(\"","\")\"","\"dash\"","\"turn\"","\"turn_neck\"","\"kick\"","\"catch\"","\"say\"","\"unquoted say\"","\"sense_body\"","\"score\"","\"move\"","\"change_view\"","\"compression\"","\"bye\"","\"done\"","\"pointto\"","\"attentionto\"","\"tackle\"","\"clang\"","\"ear\"","\"narrow\"","\"normal\"","\"wide\"","\"low\"","\"high\"","\"on\"","\"off\"","\"our\"","\"opp\"","RCSS_PCOM_LEFT","'l'","RCSS_PCOM_RIGHT","'r'","\"partial\"","\"complete\"","\"ver\"","RCSS_PCOM_ERROR","command_list","command","dash_com","turn_com","turn_neck_com","kick_com","catch_com","say_com","sense_body_com","score_com","move_com","change_view_com","view_width","view_quality","compression_com","bye_com","done_com","pointto_com","attentionto_com","tackle_com","clang_com","ear_com","on_off","team_side","partial_complete","floating_point_number", NULL};#endifstatic const short yyr1[] = {     0,    44,    44,    45,    45,    45,    45,    45,    45,    45,    45,    45,    45,    45,    45,    45,    45,    45,    45,    45,    45,    46,    47,    48,    49,    50,    51,    51,    52,    53,    54,    55,    56,    56,    56,    57,    57,    58,    59,    60,    61,    61,    62,    62,    62,    63,    64,    65,    65,    65,    65,    65,    65,    66,    66,    67,    67,    67,    67,    68,    68,    69,    69};static const short yyr2[] = {     0,     1,     2,     1,     1,     1,     1,     1,     1,     1,     1,     1,     1,     1,     1,     1,     1,     1,     1,     1,     1,     4,     4,     4,     5,     4,     1,     4,     3,     3,     5,     5,     1,     1,     1,     1,     1,     4,     3,     3,     5,     4,     5,     5,     4,     4,     8,     8,     8,     7,     7,     7,     6,     1,     1,     1,     1,     1,     1,     1,     1,     1,     1};static const short yydefact[] = {     0,     0,    26,     0,     1,     3,     4,     5,     6,     7,     8,     9,    10,    11,    12,    13,    14,    15,    16,    17,    18,    19,    20,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     2,    61,    62,     0,     0,     0,     0,     0,     0,    28,    29,     0,    32,    33,    34,     0,     0,    38,    39,     0,     0,     0,     0,    55,    56,    57,    58,     0,     0,     0,     0,    21,    22,    23,     0,    25,    27,     0,    35,    36,     0,    37,    41,     0,     0,    44,     0,    45,     0,    53,    54,     0,    24,    30,    31,    40,    43,    42,     0,     0,     0,    59,    60,     0,     0,     0,     0,     0,    52,     0,     0,     0,     0,    50,     0,    49,     0,    51,    46,    48,    47,     0,     0};static const short yydefgoto[] = {     3,     4,     5,     6,     7,     8,     9,    10,    11,    12,    13,    14,    56,    81,    15,    16,    17,    18,    19,    20,    21,    22,    92,    68,   105,    44};static const short yypact[] = {    11,    48,-32768,    10,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,    28,    28,    28,    28,    28,     3,    -1,    14,    28,    -9,    24,    22,    26,     1,    17,    28,    35,    37,-32768,-32768,-32768,    47,    55,    70,    28,    71,    72,-32768,-32768,    28,-32768,-32768,-32768,     5,    73,-32768,-32768,    74,    28,    79,    76,-32768,-32768,-32768,-32768,    81,    78,    44,    43,-32768,-32768,-32768,    80,-32768,-32768,    82,-32768,-32768,    83,-32768,-32768,    84,    85,-32768,    86,-32768,    91,-32768,-32768,     4,-32768,-32768,-32768,-32768,-32768,-32768,    92,     6,    89,-32768,-32768,     8,    90,    93,    94,    95,-32768,    96,    97,    98,    99,-32768,   100,-32768,   101,-32768,-32768,-32768,-32768,    88,-32768};static const short yypgoto[] = {-32768,   106,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,     7,   -74,   -24};#define	YYLAST		109static const short yytable[] = {    45,    46,    47,    48,    42,    43,    50,    52,    49,   100,   122,   101,    61,   107,    69,   110,     1,     1,    53,    54,    55,    51,    62,    75,     2,     2,   108,    57,    78,    58,   111,    42,    43,    59,    60,    79,    80,    84,    64,    65,    66,    70,    67,    71,   102,   103,   102,   103,   102,   103,    63,    64,    65,    66,    72,    67,    23,    24,    25,    26,    27,    28,    73,    29,    30,    31,    32,    33,    34,    35,    36,    37,    38,    39,    40,    90,    91,    74,    76,    77,    82,    83,    85,    86,    87,    88,    89,    93,   123,    94,    95,    96,    97,    98,    99,   106,   109,   112,     0,   104,   113,   114,   115,   116,   117,   118,   119,   120,   121,    41};static const short yycheck[] = {    24,    25,    26,    27,     3,     4,     7,    31,     5,     5,     0,     7,    36,     7,    38,     7,     6,     6,    27,    28,    29,     7,     5,    47,    14,    14,   100,     3,    52,     7,   104,     3,     4,     7,    33,    30,    31,    61,    34,    35,    36,     6,    38,     6,    40,    41,    40,    41,    40,    41,    33,    34,    35,    36,     7,    38,     8,     9,    10,    11,    12,    13,     7,    15,    16,    17,    18,    19,    20,    21,    22,    23,    24,    25,    26,    32,    33,     7,     7,     7,     7,     7,     3,     7,     3,     7,    42,     7,     0,     7,     7,     7,     7,     7,     3,     3,     7,     7,    -1,    92,     7,     7,     7,     7,     7,     7,     7,     7,     7,     3};#define YYPURE 1/* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */#line 3 "/usr/share/bison.simple"/* This file comes from bison-1.28.  *//* Skeleton output parser for bison,   Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.   This program is free software; you can redistribute it and/or modify   it under the terms of the GNU General Public License as published by   the Free Software Foundation; either version 2, or (at your option)   any later version.   This program is distributed in the hope that it will be useful,   but WITHOUT ANY WARRANTY; without even the implied warranty of   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   GNU General Public License for more details.   You should have received a copy of the GNU General Public License   along with this program; if not, write to the Free Software   Foundation, Inc., 59 Temple Place - Suite 330,   Boston, MA 02111-1307, USA.  *//* As a special exception, when this file is copied by Bison into a   Bison output file, you may use that output file without restriction.   This special exception was added by the Free Software Foundation   in version 1.24 of Bison.  *//* This is the parser code that is written into each bison parser  when the %semantic_parser declaration is not specified in the grammar.  It was written by Richard Stallman by simplifying the hairy parser  used when %semantic_parser is specified.  */#ifndef YYSTACK_USE_ALLOCA#ifdef alloca#define YYSTACK_USE_ALLOCA#else /* alloca not defined */#ifdef __GNUC__#define YYSTACK_USE_ALLOCA#define alloca __builtin_alloca#else /* not GNU C.  */#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))#define YYSTACK_USE_ALLOCA#include <alloca.h>#else /* not sparc *//* We think this test detects Watcom and Microsoft C.  *//* This used to test MSDOS, but that is a bad idea   since that symbol is in the user namespace.  */#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)#if 0 /* No need for malloc.h, which pollutes the namespace;	 instead, just don't use alloca.  */#include <malloc.h>#endif#else /* not MSDOS, or __TURBOC__ */#if defined(_AIX)/* I don't know what this was needed for, but it pollutes the namespace.   So I turned it off.   rms, 2 May 1997.  *//* #include <malloc.h>  */ #pragma alloca#define YYSTACK_USE_ALLOCA#else /* not MSDOS, or __TURBOC__, or _AIX */#if 0#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,		 and on HPUX 10.  Eventually we can turn this on.  */#define YYSTACK_USE_ALLOCA#define alloca __builtin_alloca#endif /* __hpux */#endif#endif /* not _AIX */#endif /* not MSDOS, or __TURBOC__ */#endif /* not sparc */#endif /* not GNU C */#endif /* alloca not defined */#endif /* YYSTACK_USE_ALLOCA not defined */#ifdef YYSTACK_USE_ALLOCA#define YYSTACK_ALLOC alloca#else#define YYSTACK_ALLOC malloc#endif/* Note: there must be only one dollar sign in this file.   It is replaced by the list of actions, each action   as one case of the switch.  */#define yyerrok		(yyerrstatus = 0)#define yyclearin	(yychar = YYEMPTY)#define YYEMPTY		-2#define YYEOF		0#define YYACCEPT	goto yyacceptlab#define YYABORT 	goto yyabortlab#define YYERROR		goto yyerrlab1/* Like YYERROR except do call yyerror.   This remains here temporarily to ease the   transition to the new meaning of YYERROR, for GCC.   Once GCC version 2 has supplanted version 1, this can go.  */#define YYFAIL		goto yyerrlab#define YYRECOVERING()  (!!yyerrstatus)#define YYBACKUP(token, value) \do								\  if (yychar == YYEMPTY && yylen == 1)				\    { yychar = (token), yylval = (value);			\      yychar1 = YYTRANSLATE (yychar);				\      YYPOPSTACK;						\      goto yybackup;						\    }								\  else								\    { yyerror ("syntax error: cannot back up"); YYERROR; }	\while (0)#define YYTERROR	1#define YYERRCODE	256#ifndef YYPURE#define YYLEX		yylex()#endif#ifdef YYPURE#ifdef YYLSP_NEEDED#ifdef YYLEX_PARAM#define YYLEX		yylex(&yylval, &yylloc, YYLEX_PARAM)#else#define YYLEX		yylex(&yylval, &yylloc)#endif#else /* not YYLSP_NEEDED */#ifdef YYLEX_PARAM#define YYLEX		yylex(&yylval, YYLEX_PARAM)#else#define YYLEX		yylex(&yylval)#endif#endif /* not YYLSP_NEEDED */#endif/* If nonreentrant, generate the variables here */#ifndef YYPUREint	yychar;			/*  the lookahead symbol		*/YYSTYPE	yylval;			/*  the semantic value of the		*/				/*  lookahead symbol			*/#ifdef YYLSP_NEEDED

⌨️ 快捷键说明

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