ael.tab.c 110 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011
  1. /* A Bison parser, made by GNU Bison 2.5. */
  2. /* Bison implementation for Yacc-like parsers in C
  3. Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
  4. This program is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation, either version 3 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program. If not, see <http://www.gnu.org/licenses/>. */
  14. /* As a special exception, you may create a larger work that contains
  15. part or all of the Bison parser skeleton and distribute that work
  16. under terms of your choice, so long as that work isn't itself a
  17. parser generator using the skeleton or a modified version thereof
  18. as a parser skeleton. Alternatively, if you modify or redistribute
  19. the parser skeleton itself, you may (at your option) remove this
  20. special exception, which will cause the skeleton and the resulting
  21. Bison output files to be licensed under the GNU General Public
  22. License without this special exception.
  23. This special exception was added by the Free Software Foundation in
  24. version 2.2 of Bison. */
  25. /* C LALR(1) parser skeleton written by Richard Stallman, by
  26. simplifying the original so-called "semantic" parser. */
  27. /* All symbols defined below should begin with yy or YY, to avoid
  28. infringing on user name space. This should be done even for local
  29. variables, as they might otherwise be expanded by user macros.
  30. There are some unavoidable exceptions within include files to
  31. define necessary library symbols; they are noted "INFRINGES ON
  32. USER NAME SPACE" below. */
  33. /* Identify Bison output. */
  34. #define YYBISON 1
  35. /* Bison version. */
  36. #define YYBISON_VERSION "2.5"
  37. /* Skeleton name. */
  38. #define YYSKELETON_NAME "yacc.c"
  39. /* Pure parsers. */
  40. #define YYPURE 1
  41. /* Push parsers. */
  42. #define YYPUSH 0
  43. /* Pull parsers. */
  44. #define YYPULL 1
  45. /* Using locations. */
  46. #define YYLSP_NEEDED 1
  47. /* Substitute the variable and function names. */
  48. #define yyparse ael_yyparse
  49. #define yylex ael_yylex
  50. #define yyerror ael_yyerror
  51. #define yylval ael_yylval
  52. #define yychar ael_yychar
  53. #define yydebug ael_yydebug
  54. #define yynerrs ael_yynerrs
  55. #define yylloc ael_yylloc
  56. /* Copy the first part of user declarations. */
  57. /* Line 268 of yacc.c */
  58. #line 1 "ael.y"
  59. /*
  60. * Asterisk -- An open source telephony toolkit.
  61. *
  62. * Copyright (C) 2006, Digium, Inc.
  63. *
  64. * Steve Murphy <murf@parsetree.com>
  65. *
  66. * See http://www.asterisk.org for more information about
  67. * the Asterisk project. Please do not directly contact
  68. * any of the maintainers of this project for assistance;
  69. * the project provides a web site, mailing lists and IRC
  70. * channels for your use.
  71. *
  72. * This program is free software, distributed under the terms of
  73. * the GNU General Public License Version 2. See the LICENSE file
  74. * at the top of the source tree.
  75. */
  76. /*! \file
  77. *
  78. * \brief Bison Grammar description of AEL2.
  79. *
  80. */
  81. #include "asterisk.h"
  82. ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
  83. #include <stdio.h>
  84. #include <stdlib.h>
  85. #include <string.h>
  86. #include "asterisk/logger.h"
  87. #include "asterisk/lock.h"
  88. #include "asterisk/hashtab.h"
  89. #include "asterisk/ael_structs.h"
  90. #include "asterisk/utils.h"
  91. extern struct ast_flags ast_compat;
  92. pval * linku1(pval *head, pval *tail);
  93. static void set_dads(pval *dad, pval *child_list);
  94. void reset_parencount(yyscan_t yyscanner);
  95. void reset_semicount(yyscan_t yyscanner);
  96. void reset_argcount(yyscan_t yyscanner );
  97. #define YYLEX_PARAM ((struct parse_io *)parseio)->scanner
  98. #define YYERROR_VERBOSE 1
  99. extern char *my_file;
  100. #ifdef AAL_ARGCHECK
  101. int ael_is_funcname(char *name);
  102. #endif
  103. static char *ael_token_subst(const char *mess);
  104. /* Line 268 of yacc.c */
  105. #line 137 "ael.tab.c"
  106. /* Enabling traces. */
  107. #ifndef YYDEBUG
  108. # define YYDEBUG 0
  109. #endif
  110. /* Enabling verbose error messages. */
  111. #ifdef YYERROR_VERBOSE
  112. # undef YYERROR_VERBOSE
  113. # define YYERROR_VERBOSE 1
  114. #else
  115. # define YYERROR_VERBOSE 1
  116. #endif
  117. /* Enabling the token table. */
  118. #ifndef YYTOKEN_TABLE
  119. # define YYTOKEN_TABLE 0
  120. #endif
  121. /* Tokens. */
  122. #ifndef YYTOKENTYPE
  123. # define YYTOKENTYPE
  124. /* Put the tokens into the symbol table, so that GDB and other debuggers
  125. know about them. */
  126. enum yytokentype {
  127. KW_CONTEXT = 258,
  128. LC = 259,
  129. RC = 260,
  130. LP = 261,
  131. RP = 262,
  132. SEMI = 263,
  133. EQ = 264,
  134. COMMA = 265,
  135. COLON = 266,
  136. AMPER = 267,
  137. BAR = 268,
  138. AT = 269,
  139. KW_MACRO = 270,
  140. KW_GLOBALS = 271,
  141. KW_IGNOREPAT = 272,
  142. KW_SWITCH = 273,
  143. KW_IF = 274,
  144. KW_IFTIME = 275,
  145. KW_ELSE = 276,
  146. KW_RANDOM = 277,
  147. KW_ABSTRACT = 278,
  148. KW_EXTEND = 279,
  149. EXTENMARK = 280,
  150. KW_GOTO = 281,
  151. KW_JUMP = 282,
  152. KW_RETURN = 283,
  153. KW_BREAK = 284,
  154. KW_CONTINUE = 285,
  155. KW_REGEXTEN = 286,
  156. KW_HINT = 287,
  157. KW_FOR = 288,
  158. KW_WHILE = 289,
  159. KW_CASE = 290,
  160. KW_PATTERN = 291,
  161. KW_DEFAULT = 292,
  162. KW_CATCH = 293,
  163. KW_SWITCHES = 294,
  164. KW_ESWITCHES = 295,
  165. KW_INCLUDES = 296,
  166. KW_LOCAL = 297,
  167. word = 298
  168. };
  169. #endif
  170. #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
  171. typedef union YYSTYPE
  172. {
  173. /* Line 293 of yacc.c */
  174. #line 59 "ael.y"
  175. int intval; /* integer value, typically flags */
  176. char *str; /* strings */
  177. struct pval *pval; /* full objects */
  178. /* Line 293 of yacc.c */
  179. #line 224 "ael.tab.c"
  180. } YYSTYPE;
  181. # define YYSTYPE_IS_TRIVIAL 1
  182. # define yystype YYSTYPE /* obsolescent; will be withdrawn */
  183. # define YYSTYPE_IS_DECLARED 1
  184. #endif
  185. #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
  186. typedef struct YYLTYPE
  187. {
  188. int first_line;
  189. int first_column;
  190. int last_line;
  191. int last_column;
  192. } YYLTYPE;
  193. # define yyltype YYLTYPE /* obsolescent; will be withdrawn */
  194. # define YYLTYPE_IS_DECLARED 1
  195. # define YYLTYPE_IS_TRIVIAL 1
  196. #endif
  197. /* Copy the second part of user declarations. */
  198. /* Line 343 of yacc.c */
  199. #line 65 "ael.y"
  200. /* declaring these AFTER the union makes things a lot simpler! */
  201. void yyerror(YYLTYPE *locp, struct parse_io *parseio, char const *s);
  202. int ael_yylex (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , void * yyscanner);
  203. /* create a new object with start-end marker */
  204. pval *npval(pvaltype type, int first_line, int last_line,
  205. int first_column, int last_column);
  206. /* create a new object with start-end marker, simplified interface.
  207. * Must be declared here because YYLTYPE is not known before
  208. */
  209. static pval *npval2(pvaltype type, YYLTYPE *first, YYLTYPE *last);
  210. /* another frontend for npval, this time for a string */
  211. static pval *nword(char *string, YYLTYPE *pos);
  212. /* update end position of an object, return the object */
  213. static pval *update_last(pval *, YYLTYPE *);
  214. /* Line 343 of yacc.c */
  215. #line 271 "ael.tab.c"
  216. #ifdef short
  217. # undef short
  218. #endif
  219. #ifdef YYTYPE_UINT8
  220. typedef YYTYPE_UINT8 yytype_uint8;
  221. #else
  222. typedef unsigned char yytype_uint8;
  223. #endif
  224. #ifdef YYTYPE_INT8
  225. typedef YYTYPE_INT8 yytype_int8;
  226. #elif (defined __STDC__ || defined __C99__FUNC__ \
  227. || defined __cplusplus || defined _MSC_VER)
  228. typedef signed char yytype_int8;
  229. #else
  230. typedef short int yytype_int8;
  231. #endif
  232. #ifdef YYTYPE_UINT16
  233. typedef YYTYPE_UINT16 yytype_uint16;
  234. #else
  235. typedef unsigned short int yytype_uint16;
  236. #endif
  237. #ifdef YYTYPE_INT16
  238. typedef YYTYPE_INT16 yytype_int16;
  239. #else
  240. typedef short int yytype_int16;
  241. #endif
  242. #ifndef YYSIZE_T
  243. # ifdef __SIZE_TYPE__
  244. # define YYSIZE_T __SIZE_TYPE__
  245. # elif defined size_t
  246. # define YYSIZE_T size_t
  247. # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
  248. || defined __cplusplus || defined _MSC_VER)
  249. # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
  250. # define YYSIZE_T size_t
  251. # else
  252. # define YYSIZE_T unsigned int
  253. # endif
  254. #endif
  255. #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
  256. #ifndef YY_
  257. # if defined YYENABLE_NLS && YYENABLE_NLS
  258. # if ENABLE_NLS
  259. # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
  260. # define YY_(msgid) dgettext ("bison-runtime", msgid)
  261. # endif
  262. # endif
  263. # ifndef YY_
  264. # define YY_(msgid) msgid
  265. # endif
  266. #endif
  267. /* Suppress unused-variable warnings by "using" E. */
  268. #if ! defined lint || defined __GNUC__
  269. # define YYUSE(e) ((void) (e))
  270. #else
  271. # define YYUSE(e) /* empty */
  272. #endif
  273. /* Identity function, used to suppress warnings about constant conditions. */
  274. #ifndef lint
  275. # define YYID(n) (n)
  276. #else
  277. #if (defined __STDC__ || defined __C99__FUNC__ \
  278. || defined __cplusplus || defined _MSC_VER)
  279. static int
  280. YYID (int yyi)
  281. #else
  282. static int
  283. YYID (yyi)
  284. int yyi;
  285. #endif
  286. {
  287. return yyi;
  288. }
  289. #endif
  290. #if ! defined yyoverflow || YYERROR_VERBOSE
  291. /* The parser invokes alloca or malloc; define the necessary symbols. */
  292. # ifdef YYSTACK_USE_ALLOCA
  293. # if YYSTACK_USE_ALLOCA
  294. # ifdef __GNUC__
  295. # define YYSTACK_ALLOC __builtin_alloca
  296. # elif defined __BUILTIN_VA_ARG_INCR
  297. # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
  298. # elif defined _AIX
  299. # define YYSTACK_ALLOC __alloca
  300. # elif defined _MSC_VER
  301. # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
  302. # define alloca _alloca
  303. # else
  304. # define YYSTACK_ALLOC alloca
  305. # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
  306. || defined __cplusplus || defined _MSC_VER)
  307. # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
  308. # ifndef EXIT_SUCCESS
  309. # define EXIT_SUCCESS 0
  310. # endif
  311. # endif
  312. # endif
  313. # endif
  314. # endif
  315. # ifdef YYSTACK_ALLOC
  316. /* Pacify GCC's `empty if-body' warning. */
  317. # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
  318. # ifndef YYSTACK_ALLOC_MAXIMUM
  319. /* The OS might guarantee only one guard page at the bottom of the stack,
  320. and a page size can be as small as 4096 bytes. So we cannot safely
  321. invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
  322. to allow for a few compiler-allocated temporary stack slots. */
  323. # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
  324. # endif
  325. # else
  326. # define YYSTACK_ALLOC YYMALLOC
  327. # define YYSTACK_FREE YYFREE
  328. # ifndef YYSTACK_ALLOC_MAXIMUM
  329. # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
  330. # endif
  331. # if (defined __cplusplus && ! defined EXIT_SUCCESS \
  332. && ! ((defined YYMALLOC || defined malloc) \
  333. && (defined YYFREE || defined free)))
  334. # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
  335. # ifndef EXIT_SUCCESS
  336. # define EXIT_SUCCESS 0
  337. # endif
  338. # endif
  339. # ifndef YYMALLOC
  340. # define YYMALLOC malloc
  341. # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
  342. || defined __cplusplus || defined _MSC_VER)
  343. void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
  344. # endif
  345. # endif
  346. # ifndef YYFREE
  347. # define YYFREE free
  348. # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
  349. || defined __cplusplus || defined _MSC_VER)
  350. void free (void *); /* INFRINGES ON USER NAME SPACE */
  351. # endif
  352. # endif
  353. # endif
  354. #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
  355. #if (! defined yyoverflow \
  356. && (! defined __cplusplus \
  357. || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
  358. && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
  359. /* A type that is properly aligned for any stack member. */
  360. union yyalloc
  361. {
  362. yytype_int16 yyss_alloc;
  363. YYSTYPE yyvs_alloc;
  364. YYLTYPE yyls_alloc;
  365. };
  366. /* The size of the maximum gap between one aligned stack and the next. */
  367. # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
  368. /* The size of an array large to enough to hold all stacks, each with
  369. N elements. */
  370. # define YYSTACK_BYTES(N) \
  371. ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
  372. + 2 * YYSTACK_GAP_MAXIMUM)
  373. # define YYCOPY_NEEDED 1
  374. /* Relocate STACK from its old location to the new one. The
  375. local variables YYSIZE and YYSTACKSIZE give the old and new number of
  376. elements in the stack, and YYPTR gives the new location of the
  377. stack. Advance YYPTR to a properly aligned location for the next
  378. stack. */
  379. # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
  380. do \
  381. { \
  382. YYSIZE_T yynewbytes; \
  383. YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
  384. Stack = &yyptr->Stack_alloc; \
  385. yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
  386. yyptr += yynewbytes / sizeof (*yyptr); \
  387. } \
  388. while (YYID (0))
  389. #endif
  390. #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
  391. /* Copy COUNT objects from FROM to TO. The source and destination do
  392. not overlap. */
  393. # ifndef YYCOPY
  394. # if defined __GNUC__ && 1 < __GNUC__
  395. # define YYCOPY(To, From, Count) \
  396. __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
  397. # else
  398. # define YYCOPY(To, From, Count) \
  399. do \
  400. { \
  401. YYSIZE_T yyi; \
  402. for (yyi = 0; yyi < (Count); yyi++) \
  403. (To)[yyi] = (From)[yyi]; \
  404. } \
  405. while (YYID (0))
  406. # endif
  407. # endif
  408. #endif /* !YYCOPY_NEEDED */
  409. /* YYFINAL -- State number of the termination state. */
  410. #define YYFINAL 17
  411. /* YYLAST -- Last index in YYTABLE. */
  412. #define YYLAST 371
  413. /* YYNTOKENS -- Number of terminals. */
  414. #define YYNTOKENS 44
  415. /* YYNNTS -- Number of nonterminals. */
  416. #define YYNNTS 56
  417. /* YYNRULES -- Number of rules. */
  418. #define YYNRULES 143
  419. /* YYNRULES -- Number of states. */
  420. #define YYNSTATES 283
  421. /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
  422. #define YYUNDEFTOK 2
  423. #define YYMAXUTOK 298
  424. #define YYTRANSLATE(YYX) \
  425. ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
  426. /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
  427. static const yytype_uint8 yytranslate[] =
  428. {
  429. 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  430. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  431. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  432. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  433. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  434. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  435. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  436. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  437. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  438. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  439. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  440. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  441. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  442. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  443. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  444. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  445. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  446. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  447. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  448. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  449. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  450. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  451. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  452. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  453. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  454. 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
  455. 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
  456. 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
  457. 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
  458. 35, 36, 37, 38, 39, 40, 41, 42, 43
  459. };
  460. #if YYDEBUG
  461. /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
  462. YYRHS. */
  463. static const yytype_uint16 yyprhs[] =
  464. {
  465. 0, 0, 3, 5, 7, 10, 13, 15, 17, 19,
  466. 21, 23, 25, 32, 34, 35, 37, 40, 43, 52,
  467. 57, 58, 61, 64, 65, 71, 72, 79, 80, 82,
  468. 86, 89, 90, 93, 96, 98, 100, 102, 104, 106,
  469. 108, 110, 113, 115, 120, 124, 130, 135, 143, 152,
  470. 153, 156, 159, 165, 167, 175, 176, 181, 184, 187,
  471. 192, 194, 197, 199, 202, 206, 210, 214, 216, 219,
  472. 223, 225, 228, 232, 238, 242, 244, 246, 250, 254,
  473. 257, 258, 259, 260, 273, 277, 279, 283, 286, 289,
  474. 290, 296, 299, 302, 305, 309, 311, 314, 315, 317,
  475. 321, 325, 331, 337, 343, 349, 350, 353, 356, 361,
  476. 362, 368, 372, 373, 377, 381, 384, 386, 387, 389,
  477. 390, 394, 395, 398, 403, 407, 412, 413, 416, 418,
  478. 420, 426, 431, 436, 437, 441, 447, 450, 452, 456,
  479. 459, 463, 466, 471
  480. };
  481. /* YYRHS -- A `-1'-separated list of the rules' RHS. */
  482. static const yytype_int8 yyrhs[] =
  483. {
  484. 45, 0, -1, 46, -1, 47, -1, 46, 47, -1,
  485. 46, 1, -1, 49, -1, 51, -1, 52, -1, 8,
  486. -1, 43, -1, 37, -1, 50, 3, 48, 4, 59,
  487. 5, -1, 23, -1, -1, 24, -1, 24, 23, -1,
  488. 23, 24, -1, 15, 43, 6, 58, 7, 4, 92,
  489. 5, -1, 16, 4, 53, 5, -1, -1, 53, 54,
  490. -1, 1, 53, -1, -1, 43, 9, 55, 43, 8,
  491. -1, -1, 42, 43, 9, 57, 43, 8, -1, -1,
  492. 43, -1, 58, 10, 43, -1, 58, 1, -1, -1,
  493. 59, 60, -1, 1, 59, -1, 62, -1, 99, -1,
  494. 94, -1, 95, -1, 61, -1, 54, -1, 56, -1,
  495. 43, 1, -1, 8, -1, 17, 25, 43, 8, -1,
  496. 43, 25, 74, -1, 43, 14, 43, 25, 74, -1,
  497. 31, 43, 25, 74, -1, 32, 6, 70, 7, 43,
  498. 25, 74, -1, 31, 32, 6, 70, 7, 43, 25,
  499. 74, -1, -1, 63, 74, -1, 1, 63, -1, 71,
  500. 11, 71, 11, 71, -1, 43, -1, 64, 13, 71,
  501. 13, 71, 13, 71, -1, -1, 6, 67, 69, 7,
  502. -1, 19, 66, -1, 22, 66, -1, 20, 6, 65,
  503. 7, -1, 43, -1, 43, 43, -1, 43, -1, 70,
  504. 43, -1, 70, 11, 43, -1, 70, 12, 43, -1,
  505. 70, 14, 43, -1, 43, -1, 43, 43, -1, 43,
  506. 43, 43, -1, 43, -1, 43, 43, -1, 72, 11,
  507. 43, -1, 18, 66, 4, 90, 5, -1, 4, 63,
  508. 5, -1, 54, -1, 56, -1, 26, 80, 8, -1,
  509. 27, 82, 8, -1, 43, 11, -1, -1, -1, -1,
  510. 33, 6, 75, 43, 8, 76, 43, 8, 77, 43,
  511. 7, 74, -1, 34, 66, 74, -1, 73, -1, 12,
  512. 83, 8, -1, 87, 8, -1, 43, 8, -1, -1,
  513. 87, 9, 78, 43, 8, -1, 29, 8, -1, 28,
  514. 8, -1, 30, 8, -1, 68, 74, 79, -1, 8,
  515. -1, 21, 74, -1, -1, 72, -1, 72, 13, 72,
  516. -1, 72, 10, 72, -1, 72, 13, 72, 13, 72,
  517. -1, 72, 10, 72, 10, 72, -1, 37, 13, 72,
  518. 13, 72, -1, 37, 10, 72, 10, 72, -1, -1,
  519. 10, 43, -1, 72, 81, -1, 72, 81, 14, 48,
  520. -1, -1, 43, 6, 84, 89, 7, -1, 43, 6,
  521. 7, -1, -1, 43, 6, 86, -1, 85, 89, 7,
  522. -1, 85, 7, -1, 43, -1, -1, 69, -1, -1,
  523. 89, 10, 88, -1, -1, 90, 91, -1, 35, 43,
  524. 11, 63, -1, 37, 11, 63, -1, 36, 43, 11,
  525. 63, -1, -1, 92, 93, -1, 74, -1, 99, -1,
  526. 38, 43, 4, 63, 5, -1, 39, 4, 96, 5,
  527. -1, 40, 4, 96, 5, -1, -1, 96, 43, 8,
  528. -1, 96, 43, 14, 43, 8, -1, 1, 96, -1,
  529. 48, -1, 48, 13, 65, -1, 97, 8, -1, 98,
  530. 97, 8, -1, 98, 1, -1, 41, 4, 98, 5,
  531. -1, 41, 4, 5, -1
  532. };
  533. /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
  534. static const yytype_uint16 yyrline[] =
  535. {
  536. 0, 191, 191, 194, 195, 196, 199, 200, 201, 202,
  537. 205, 206, 209, 218, 219, 220, 221, 222, 225, 231,
  538. 237, 238, 239, 242, 242, 248, 248, 255, 256, 257,
  539. 258, 261, 262, 263, 266, 267, 268, 269, 270, 271,
  540. 272, 273, 274, 277, 282, 286, 294, 299, 304, 313,
  541. 314, 315, 321, 331, 335, 343, 343, 347, 350, 353,
  542. 364, 365, 377, 378, 387, 396, 405, 416, 417, 427,
  543. 440, 441, 450, 461, 470, 473, 474, 475, 478, 481,
  544. 484, 485, 486, 484, 492, 496, 497, 498, 499, 502,
  545. 502, 535, 536, 537, 538, 542, 545, 546, 549, 550,
  546. 553, 556, 560, 564, 568, 574, 575, 579, 582, 588,
  547. 588, 593, 601, 601, 612, 619, 622, 623, 626, 627,
  548. 630, 633, 634, 637, 641, 645, 651, 652, 655, 656,
  549. 657, 663, 668, 673, 674, 675, 686, 689, 690, 697,
  550. 698, 699, 702, 705
  551. };
  552. #endif
  553. #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
  554. /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
  555. First, the terminals, then, starting at YYNTOKENS, nonterminals. */
  556. static const char *const yytname[] =
  557. {
  558. "$end", "error", "$undefined", "KW_CONTEXT", "LC", "RC", "LP", "RP",
  559. "SEMI", "EQ", "COMMA", "COLON", "AMPER", "BAR", "AT", "KW_MACRO",
  560. "KW_GLOBALS", "KW_IGNOREPAT", "KW_SWITCH", "KW_IF", "KW_IFTIME",
  561. "KW_ELSE", "KW_RANDOM", "KW_ABSTRACT", "KW_EXTEND", "EXTENMARK",
  562. "KW_GOTO", "KW_JUMP", "KW_RETURN", "KW_BREAK", "KW_CONTINUE",
  563. "KW_REGEXTEN", "KW_HINT", "KW_FOR", "KW_WHILE", "KW_CASE", "KW_PATTERN",
  564. "KW_DEFAULT", "KW_CATCH", "KW_SWITCHES", "KW_ESWITCHES", "KW_INCLUDES",
  565. "KW_LOCAL", "word", "$accept", "file", "objects", "object",
  566. "context_name", "context", "opt_abstract", "macro", "globals",
  567. "global_statements", "assignment", "$@1", "local_assignment", "$@2",
  568. "arglist", "elements", "element", "ignorepat", "extension", "statements",
  569. "timerange", "timespec", "test_expr", "$@3", "if_like_head", "word_list",
  570. "hint_word", "word3_list", "goto_word", "switch_statement", "statement",
  571. "$@4", "$@5", "$@6", "$@7", "opt_else", "target", "opt_pri",
  572. "jumptarget", "macro_call", "$@8", "application_call_head", "$@9",
  573. "application_call", "opt_word", "eval_arglist", "case_statements",
  574. "case_statement", "macro_statements", "macro_statement", "switches",
  575. "eswitches", "switchlist", "included_entry", "includeslist", "includes", 0
  576. };
  577. #endif
  578. # ifdef YYPRINT
  579. /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
  580. token YYLEX-NUM. */
  581. static const yytype_uint16 yytoknum[] =
  582. {
  583. 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
  584. 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
  585. 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
  586. 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
  587. 295, 296, 297, 298
  588. };
  589. # endif
  590. /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
  591. static const yytype_uint8 yyr1[] =
  592. {
  593. 0, 44, 45, 46, 46, 46, 47, 47, 47, 47,
  594. 48, 48, 49, 50, 50, 50, 50, 50, 51, 52,
  595. 53, 53, 53, 55, 54, 57, 56, 58, 58, 58,
  596. 58, 59, 59, 59, 60, 60, 60, 60, 60, 60,
  597. 60, 60, 60, 61, 62, 62, 62, 62, 62, 63,
  598. 63, 63, 64, 64, 65, 67, 66, 68, 68, 68,
  599. 69, 69, 70, 70, 70, 70, 70, 71, 71, 71,
  600. 72, 72, 72, 73, 74, 74, 74, 74, 74, 74,
  601. 75, 76, 77, 74, 74, 74, 74, 74, 74, 78,
  602. 74, 74, 74, 74, 74, 74, 79, 79, 80, 80,
  603. 80, 80, 80, 80, 80, 81, 81, 82, 82, 84,
  604. 83, 83, 86, 85, 87, 87, 88, 88, 89, 89,
  605. 89, 90, 90, 91, 91, 91, 92, 92, 93, 93,
  606. 93, 94, 95, 96, 96, 96, 96, 97, 97, 98,
  607. 98, 98, 99, 99
  608. };
  609. /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
  610. static const yytype_uint8 yyr2[] =
  611. {
  612. 0, 2, 1, 1, 2, 2, 1, 1, 1, 1,
  613. 1, 1, 6, 1, 0, 1, 2, 2, 8, 4,
  614. 0, 2, 2, 0, 5, 0, 6, 0, 1, 3,
  615. 2, 0, 2, 2, 1, 1, 1, 1, 1, 1,
  616. 1, 2, 1, 4, 3, 5, 4, 7, 8, 0,
  617. 2, 2, 5, 1, 7, 0, 4, 2, 2, 4,
  618. 1, 2, 1, 2, 3, 3, 3, 1, 2, 3,
  619. 1, 2, 3, 5, 3, 1, 1, 3, 3, 2,
  620. 0, 0, 0, 12, 3, 1, 3, 2, 2, 0,
  621. 5, 2, 2, 2, 3, 1, 2, 0, 1, 3,
  622. 3, 5, 5, 5, 5, 0, 2, 2, 4, 0,
  623. 5, 3, 0, 3, 3, 2, 1, 0, 1, 0,
  624. 3, 0, 2, 4, 3, 4, 0, 2, 1, 1,
  625. 5, 4, 4, 0, 3, 5, 2, 1, 3, 2,
  626. 3, 2, 4, 3
  627. };
  628. /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
  629. Performed when YYTABLE doesn't specify something else to do. Zero
  630. means the default is an error. */
  631. static const yytype_uint8 yydefact[] =
  632. {
  633. 14, 9, 0, 0, 13, 15, 0, 0, 3, 6,
  634. 0, 7, 8, 0, 0, 17, 16, 1, 5, 4,
  635. 0, 27, 0, 0, 11, 10, 0, 28, 0, 22,
  636. 19, 0, 21, 0, 30, 0, 0, 23, 0, 0,
  637. 126, 29, 0, 33, 12, 42, 0, 0, 0, 0,
  638. 0, 0, 0, 0, 39, 40, 32, 38, 34, 36,
  639. 37, 35, 0, 0, 0, 0, 0, 0, 0, 0,
  640. 0, 0, 41, 0, 0, 0, 18, 95, 0, 0,
  641. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  642. 0, 0, 75, 76, 0, 85, 128, 119, 0, 127,
  643. 129, 24, 0, 0, 0, 62, 0, 0, 0, 0,
  644. 143, 137, 0, 0, 25, 0, 44, 0, 0, 0,
  645. 0, 55, 0, 57, 0, 58, 0, 70, 98, 0,
  646. 105, 0, 92, 91, 93, 80, 0, 0, 112, 88,
  647. 79, 97, 115, 60, 118, 0, 87, 89, 43, 0,
  648. 46, 0, 0, 0, 0, 63, 136, 131, 0, 132,
  649. 0, 139, 141, 142, 0, 0, 0, 51, 74, 50,
  650. 109, 86, 0, 121, 53, 0, 0, 0, 0, 0,
  651. 71, 0, 0, 0, 77, 0, 107, 78, 0, 84,
  652. 0, 113, 0, 94, 61, 114, 117, 0, 0, 0,
  653. 64, 65, 66, 134, 0, 138, 140, 0, 45, 111,
  654. 119, 0, 0, 68, 0, 59, 0, 0, 0, 100,
  655. 72, 99, 106, 0, 0, 0, 96, 116, 120, 0,
  656. 0, 0, 0, 26, 0, 56, 73, 0, 0, 0,
  657. 122, 69, 67, 0, 0, 0, 0, 0, 0, 108,
  658. 81, 130, 90, 0, 47, 135, 110, 0, 0, 0,
  659. 0, 0, 104, 103, 102, 101, 0, 48, 0, 0,
  660. 124, 0, 52, 0, 123, 125, 0, 82, 54, 0,
  661. 0, 0, 83
  662. };
  663. /* YYDEFGOTO[NTERM-NUM]. */
  664. static const yytype_int16 yydefgoto[] =
  665. {
  666. -1, 6, 7, 8, 111, 9, 10, 11, 12, 23,
  667. 92, 42, 93, 165, 28, 39, 56, 57, 58, 118,
  668. 175, 176, 122, 172, 94, 144, 106, 177, 128, 95,
  669. 169, 188, 266, 279, 197, 193, 129, 186, 131, 120,
  670. 210, 97, 191, 98, 228, 145, 212, 240, 62, 99,
  671. 59, 60, 108, 112, 113, 61
  672. };
  673. /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
  674. STATE-NUM. */
  675. #define YYPACT_NINF -211
  676. static const yytype_int16 yypact[] =
  677. {
  678. 166, -211, -32, 15, 12, 36, 40, 316, -211, -211,
  679. 75, -211, -211, 82, 17, -211, -211, -211, -211, -211,
  680. -28, 57, 17, 0, -211, -211, 127, -211, 6, 109,
  681. -211, 152, -211, 136, -211, 169, 143, -211, 136, 117,
  682. -211, -211, 144, 272, -211, -211, 170, -15, 191, 197,
  683. 199, 201, 168, 137, -211, -211, -211, -211, -211, -211,
  684. -211, -211, 180, 204, 172, 219, 202, 185, 25, 25,
  685. 28, 217, -211, 186, 266, 90, -211, -211, 190, 229,
  686. 229, 230, 229, 21, 194, 240, 241, 242, 246, 229,
  687. 210, 312, -211, -211, 266, -211, -211, 1, 61, -211,
  688. -211, -211, 248, 185, 266, -211, 68, 25, 24, 29,
  689. -211, 247, 254, 20, -211, 238, -211, 19, 212, 258,
  690. 263, -211, 271, -211, 233, -211, 126, 234, 183, 275,
  691. 95, 279, -211, -211, -211, -211, 266, 286, -211, -211,
  692. -211, 270, -211, 236, -211, 140, -211, -211, -211, 78,
  693. -211, 255, 259, 262, 264, -211, 267, -211, 69, -211,
  694. 233, -211, -211, -211, 289, 282, 266, 266, -211, -211,
  695. 294, -211, 283, -211, 70, 293, 315, 317, 194, 194,
  696. -211, 194, 284, 194, -211, 287, 319, -211, 291, -211,
  697. 90, -211, 266, -211, -211, -211, 292, 295, 298, 304,
  698. -211, -211, -211, -211, 299, -211, -211, 328, -211, -211,
  699. 283, 330, 135, 300, 301, -211, 301, 104, 73, 132,
  700. -211, 116, -211, -28, 337, 239, -211, -211, -211, 338,
  701. 322, 266, 340, -211, 173, -211, -211, 306, 307, 341,
  702. -211, -211, 308, 342, 343, 194, 194, 194, 194, -211,
  703. -211, -211, -211, 266, -211, -211, -211, 345, 346, 19,
  704. 301, 301, 347, 347, 347, 347, 310, -211, 19, 19,
  705. 266, 348, -211, 351, 266, 266, 301, -211, -211, 320,
  706. 353, 266, -211
  707. };
  708. /* YYPGOTO[NTERM-NUM]. */
  709. static const yytype_int16 yypgoto[] =
  710. {
  711. -211, -211, -211, 355, -19, -211, -211, -211, -211, 344,
  712. 64, -211, -29, -211, -211, 326, -211, -211, -211, -114,
  713. -211, 205, 46, -211, -211, 195, 265, -210, -82, -211,
  714. -62, -211, -211, -211, -211, -211, -211, -211, -211, -211,
  715. -211, -211, -211, -211, -211, 159, -211, -211, -211, -211,
  716. -211, -211, -34, 257, -211, 309
  717. };
  718. /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
  719. positive, shift that token. If negative, reduce the rule which
  720. number is the opposite. If YYTABLE_NINF, syntax error. */
  721. #define YYTABLE_NINF -134
  722. static const yytype_int16 yytable[] =
  723. {
  724. 96, 26, 130, 167, 243, 30, 244, 34, 142, 24,
  725. 55, 13, 116, 35, 55, 25, 36, 65, 22, 14,
  726. 117, 162, -20, -49, -49, 163, 107, -49, 66, 157,
  727. -133, -49, 141, 110, 159, 109, 15, -49, -49, -49,
  728. 17, -49, 150, 31, 143, -49, -49, -49, -49, -49,
  729. 271, 272, -49, -49, -49, -49, -49, 24, 126, 16,
  730. -20, -49, -49, 25, 127, 24, 278, 158, -133, 146,
  731. 147, 25, 158, 156, 189, 151, 225, 203, 20, 152,
  732. 153, -67, 154, 204, 182, 198, 246, 32, 21, 152,
  733. 153, 117, 154, 32, -49, -49, 217, 218, -49, 219,
  734. 27, 221, -49, 54, 208, 185, 182, 54, -49, -49,
  735. -49, 155, -49, 213, 245, 182, -49, -49, -49, -49,
  736. -49, 155, 44, -49, -49, 45, 123, 182, 125, 248,
  737. 226, 33, -49, -49, 46, 136, 178, 38, 72, 179,
  738. 236, -31, 247, 182, -31, 270, 37, 195, 47, 48,
  739. 196, 73, 31, -31, 274, 275, 49, 50, 51, 52,
  740. 53, 37, 74, 262, 263, 264, 265, -31, -31, 254,
  741. 237, 238, 239, 40, 1, -31, -31, -31, -31, -31,
  742. 256, 2, 3, 196, 75, 76, 41, 63, 77, 4,
  743. 5, 267, 78, 181, 182, 64, 183, 67, 79, 80,
  744. 81, 68, 82, 69, 249, 70, 83, 84, 85, 86,
  745. 87, 71, 101, 88, 89, 102, 75, 168, 90, 282,
  746. 77, 51, 52, 91, 78, 103, 114, 104, 105, 115,
  747. 79, 80, 81, 119, 82, 121, 124, 127, 83, 84,
  748. 85, 86, 87, 75, 251, 88, 89, 77, 132, 133,
  749. 134, 78, 135, 137, 52, 91, 148, 79, 80, 81,
  750. 160, 82, 161, 166, 170, 83, 84, 85, 86, 87,
  751. 75, 171, 88, 89, 77, 173, 174, 180, 78, 194,
  752. 45, 52, 91, 184, 79, 80, 81, 187, 82, 46,
  753. 190, 192, 83, 84, 85, 86, 87, 206, 199, 88,
  754. 89, 209, 200, 47, 48, 201, 214, 202, 52, 91,
  755. 158, 49, 50, 51, 52, 53, -2, 18, 138, -14,
  756. 139, 37, 215, 140, 1, 207, 143, 220, 216, 231,
  757. 222, 2, 3, 223, 224, 227, 233, 235, 229, 4,
  758. 5, 230, 232, 241, 242, 250, 252, 253, 255, 257,
  759. 258, 213, 259, 273, 261, 260, 268, 269, 182, 277,
  760. 281, 276, 19, 280, 43, 205, 29, 211, 149, 234,
  761. 164, 100
  762. };
  763. #define yypact_value_is_default(yystate) \
  764. ((yystate) == (-211))
  765. #define yytable_value_is_error(yytable_value) \
  766. YYID (0)
  767. static const yytype_uint16 yycheck[] =
  768. {
  769. 62, 20, 84, 117, 214, 5, 216, 1, 7, 37,
  770. 39, 43, 74, 7, 43, 43, 10, 32, 1, 4,
  771. 1, 1, 5, 4, 5, 5, 1, 8, 43, 5,
  772. 5, 12, 94, 5, 5, 69, 24, 18, 19, 20,
  773. 0, 22, 104, 43, 43, 26, 27, 28, 29, 30,
  774. 260, 261, 33, 34, 35, 36, 37, 37, 37, 23,
  775. 43, 42, 43, 43, 43, 37, 276, 43, 43, 8,
  776. 9, 43, 43, 107, 136, 7, 190, 8, 3, 11,
  777. 12, 11, 14, 14, 11, 7, 13, 23, 6, 11,
  778. 12, 1, 14, 29, 4, 5, 178, 179, 8, 181,
  779. 43, 183, 12, 39, 166, 10, 11, 43, 18, 19,
  780. 20, 43, 22, 43, 10, 11, 26, 27, 28, 29,
  781. 30, 43, 5, 33, 34, 8, 80, 11, 82, 13,
  782. 192, 4, 42, 43, 17, 89, 10, 1, 1, 13,
  783. 5, 5, 10, 11, 8, 259, 9, 7, 31, 32,
  784. 10, 14, 43, 17, 268, 269, 39, 40, 41, 42,
  785. 43, 9, 25, 245, 246, 247, 248, 31, 32, 231,
  786. 35, 36, 37, 4, 8, 39, 40, 41, 42, 43,
  787. 7, 15, 16, 10, 4, 5, 43, 43, 8, 23,
  788. 24, 253, 12, 10, 11, 25, 13, 6, 18, 19,
  789. 20, 4, 22, 4, 223, 4, 26, 27, 28, 29,
  790. 30, 43, 8, 33, 34, 43, 4, 5, 38, 281,
  791. 8, 41, 42, 43, 12, 6, 9, 25, 43, 43,
  792. 18, 19, 20, 43, 22, 6, 6, 43, 26, 27,
  793. 28, 29, 30, 4, 5, 33, 34, 8, 8, 8,
  794. 8, 12, 6, 43, 42, 43, 8, 18, 19, 20,
  795. 13, 22, 8, 25, 6, 26, 27, 28, 29, 30,
  796. 4, 8, 33, 34, 8, 4, 43, 43, 12, 43,
  797. 8, 42, 43, 8, 18, 19, 20, 8, 22, 17,
  798. 4, 21, 26, 27, 28, 29, 30, 8, 43, 33,
  799. 34, 7, 43, 31, 32, 43, 13, 43, 42, 43,
  800. 43, 39, 40, 41, 42, 43, 0, 1, 6, 3,
  801. 8, 9, 7, 11, 8, 43, 43, 43, 11, 25,
  802. 43, 15, 16, 14, 43, 43, 8, 7, 43, 23,
  803. 24, 43, 43, 43, 43, 8, 8, 25, 8, 43,
  804. 43, 43, 11, 43, 11, 13, 11, 11, 11, 8,
  805. 7, 13, 7, 43, 38, 160, 22, 172, 103, 210,
  806. 113, 62
  807. };
  808. /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
  809. symbol of state STATE-NUM. */
  810. static const yytype_uint8 yystos[] =
  811. {
  812. 0, 8, 15, 16, 23, 24, 45, 46, 47, 49,
  813. 50, 51, 52, 43, 4, 24, 23, 0, 1, 47,
  814. 3, 6, 1, 53, 37, 43, 48, 43, 58, 53,
  815. 5, 43, 54, 4, 1, 7, 10, 9, 1, 59,
  816. 4, 43, 55, 59, 5, 8, 17, 31, 32, 39,
  817. 40, 41, 42, 43, 54, 56, 60, 61, 62, 94,
  818. 95, 99, 92, 43, 25, 32, 43, 6, 4, 4,
  819. 4, 43, 1, 14, 25, 4, 5, 8, 12, 18,
  820. 19, 20, 22, 26, 27, 28, 29, 30, 33, 34,
  821. 38, 43, 54, 56, 68, 73, 74, 85, 87, 93,
  822. 99, 8, 43, 6, 25, 43, 70, 1, 96, 96,
  823. 5, 48, 97, 98, 9, 43, 74, 1, 63, 43,
  824. 83, 6, 66, 66, 6, 66, 37, 43, 72, 80,
  825. 72, 82, 8, 8, 8, 6, 66, 43, 6, 8,
  826. 11, 74, 7, 43, 69, 89, 8, 9, 8, 70,
  827. 74, 7, 11, 12, 14, 43, 96, 5, 43, 5,
  828. 13, 8, 1, 5, 97, 57, 25, 63, 5, 74,
  829. 6, 8, 67, 4, 43, 64, 65, 71, 10, 13,
  830. 43, 10, 11, 13, 8, 10, 81, 8, 75, 74,
  831. 4, 86, 21, 79, 43, 7, 10, 78, 7, 43,
  832. 43, 43, 43, 8, 14, 65, 8, 43, 74, 7,
  833. 84, 69, 90, 43, 13, 7, 11, 72, 72, 72,
  834. 43, 72, 43, 14, 43, 63, 74, 43, 88, 43,
  835. 43, 25, 43, 8, 89, 7, 5, 35, 36, 37,
  836. 91, 43, 43, 71, 71, 10, 13, 10, 13, 48,
  837. 8, 5, 8, 25, 74, 8, 7, 43, 43, 11,
  838. 13, 11, 72, 72, 72, 72, 76, 74, 11, 11,
  839. 63, 71, 71, 43, 63, 63, 13, 8, 71, 77,
  840. 43, 7, 74
  841. };
  842. #define yyerrok (yyerrstatus = 0)
  843. #define yyclearin (yychar = YYEMPTY)
  844. #define YYEMPTY (-2)
  845. #define YYEOF 0
  846. #define YYACCEPT goto yyacceptlab
  847. #define YYABORT goto yyabortlab
  848. #define YYERROR goto yyerrorlab
  849. /* Like YYERROR except do call yyerror. This remains here temporarily
  850. to ease the transition to the new meaning of YYERROR, for GCC.
  851. Once GCC version 2 has supplanted version 1, this can go. However,
  852. YYFAIL appears to be in use. Nevertheless, it is formally deprecated
  853. in Bison 2.4.2's NEWS entry, where a plan to phase it out is
  854. discussed. */
  855. #define YYFAIL goto yyerrlab
  856. #if defined YYFAIL
  857. /* This is here to suppress warnings from the GCC cpp's
  858. -Wunused-macros. Normally we don't worry about that warning, but
  859. some users do, and we want to make it easy for users to remove
  860. YYFAIL uses, which will produce warnings from Bison 2.5. */
  861. #endif
  862. #define YYRECOVERING() (!!yyerrstatus)
  863. #define YYBACKUP(Token, Value) \
  864. do \
  865. if (yychar == YYEMPTY && yylen == 1) \
  866. { \
  867. yychar = (Token); \
  868. yylval = (Value); \
  869. YYPOPSTACK (1); \
  870. goto yybackup; \
  871. } \
  872. else \
  873. { \
  874. yyerror (&yylloc, parseio, YY_("syntax error: cannot back up")); \
  875. YYERROR; \
  876. } \
  877. while (YYID (0))
  878. #define YYTERROR 1
  879. #define YYERRCODE 256
  880. /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
  881. If N is 0, then set CURRENT to the empty location which ends
  882. the previous symbol: RHS[0] (always defined). */
  883. #define YYRHSLOC(Rhs, K) ((Rhs)[K])
  884. #ifndef YYLLOC_DEFAULT
  885. # define YYLLOC_DEFAULT(Current, Rhs, N) \
  886. do \
  887. if (YYID (N)) \
  888. { \
  889. (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
  890. (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
  891. (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
  892. (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
  893. } \
  894. else \
  895. { \
  896. (Current).first_line = (Current).last_line = \
  897. YYRHSLOC (Rhs, 0).last_line; \
  898. (Current).first_column = (Current).last_column = \
  899. YYRHSLOC (Rhs, 0).last_column; \
  900. } \
  901. while (YYID (0))
  902. #endif
  903. /* YY_LOCATION_PRINT -- Print the location on the stream.
  904. This macro was not mandated originally: define only if we know
  905. we won't break user code: when these are the locations we know. */
  906. #ifndef YY_LOCATION_PRINT
  907. # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
  908. # define YY_LOCATION_PRINT(File, Loc) \
  909. fprintf (File, "%d.%d-%d.%d", \
  910. (Loc).first_line, (Loc).first_column, \
  911. (Loc).last_line, (Loc).last_column)
  912. # else
  913. # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
  914. # endif
  915. #endif
  916. /* YYLEX -- calling `yylex' with the right arguments. */
  917. #ifdef YYLEX_PARAM
  918. # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
  919. #else
  920. # define YYLEX yylex (&yylval, &yylloc)
  921. #endif
  922. /* Enable debugging if requested. */
  923. #if YYDEBUG
  924. # ifndef YYFPRINTF
  925. # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
  926. # define YYFPRINTF fprintf
  927. # endif
  928. # define YYDPRINTF(Args) \
  929. do { \
  930. if (yydebug) \
  931. YYFPRINTF Args; \
  932. } while (YYID (0))
  933. # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
  934. do { \
  935. if (yydebug) \
  936. { \
  937. YYFPRINTF (stderr, "%s ", Title); \
  938. yy_symbol_print (stderr, \
  939. Type, Value, Location, parseio); \
  940. YYFPRINTF (stderr, "\n"); \
  941. } \
  942. } while (YYID (0))
  943. /*--------------------------------.
  944. | Print this symbol on YYOUTPUT. |
  945. `--------------------------------*/
  946. /*ARGSUSED*/
  947. #if (defined __STDC__ || defined __C99__FUNC__ \
  948. || defined __cplusplus || defined _MSC_VER)
  949. static void
  950. yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parse_io *parseio)
  951. #else
  952. static void
  953. yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, parseio)
  954. FILE *yyoutput;
  955. int yytype;
  956. YYSTYPE const * const yyvaluep;
  957. YYLTYPE const * const yylocationp;
  958. struct parse_io *parseio;
  959. #endif
  960. {
  961. if (!yyvaluep)
  962. return;
  963. YYUSE (yylocationp);
  964. YYUSE (parseio);
  965. # ifdef YYPRINT
  966. if (yytype < YYNTOKENS)
  967. YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
  968. # else
  969. YYUSE (yyoutput);
  970. # endif
  971. switch (yytype)
  972. {
  973. default:
  974. break;
  975. }
  976. }
  977. /*--------------------------------.
  978. | Print this symbol on YYOUTPUT. |
  979. `--------------------------------*/
  980. #if (defined __STDC__ || defined __C99__FUNC__ \
  981. || defined __cplusplus || defined _MSC_VER)
  982. static void
  983. yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parse_io *parseio)
  984. #else
  985. static void
  986. yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, parseio)
  987. FILE *yyoutput;
  988. int yytype;
  989. YYSTYPE const * const yyvaluep;
  990. YYLTYPE const * const yylocationp;
  991. struct parse_io *parseio;
  992. #endif
  993. {
  994. if (yytype < YYNTOKENS)
  995. YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
  996. else
  997. YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
  998. YY_LOCATION_PRINT (yyoutput, *yylocationp);
  999. YYFPRINTF (yyoutput, ": ");
  1000. yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, parseio);
  1001. YYFPRINTF (yyoutput, ")");
  1002. }
  1003. /*------------------------------------------------------------------.
  1004. | yy_stack_print -- Print the state stack from its BOTTOM up to its |
  1005. | TOP (included). |
  1006. `------------------------------------------------------------------*/
  1007. #if (defined __STDC__ || defined __C99__FUNC__ \
  1008. || defined __cplusplus || defined _MSC_VER)
  1009. static void
  1010. yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
  1011. #else
  1012. static void
  1013. yy_stack_print (yybottom, yytop)
  1014. yytype_int16 *yybottom;
  1015. yytype_int16 *yytop;
  1016. #endif
  1017. {
  1018. YYFPRINTF (stderr, "Stack now");
  1019. for (; yybottom <= yytop; yybottom++)
  1020. {
  1021. int yybot = *yybottom;
  1022. YYFPRINTF (stderr, " %d", yybot);
  1023. }
  1024. YYFPRINTF (stderr, "\n");
  1025. }
  1026. # define YY_STACK_PRINT(Bottom, Top) \
  1027. do { \
  1028. if (yydebug) \
  1029. yy_stack_print ((Bottom), (Top)); \
  1030. } while (YYID (0))
  1031. /*------------------------------------------------.
  1032. | Report that the YYRULE is going to be reduced. |
  1033. `------------------------------------------------*/
  1034. #if (defined __STDC__ || defined __C99__FUNC__ \
  1035. || defined __cplusplus || defined _MSC_VER)
  1036. static void
  1037. yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, struct parse_io *parseio)
  1038. #else
  1039. static void
  1040. yy_reduce_print (yyvsp, yylsp, yyrule, parseio)
  1041. YYSTYPE *yyvsp;
  1042. YYLTYPE *yylsp;
  1043. int yyrule;
  1044. struct parse_io *parseio;
  1045. #endif
  1046. {
  1047. int yynrhs = yyr2[yyrule];
  1048. int yyi;
  1049. unsigned long int yylno = yyrline[yyrule];
  1050. YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
  1051. yyrule - 1, yylno);
  1052. /* The symbols being reduced. */
  1053. for (yyi = 0; yyi < yynrhs; yyi++)
  1054. {
  1055. YYFPRINTF (stderr, " $%d = ", yyi + 1);
  1056. yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
  1057. &(yyvsp[(yyi + 1) - (yynrhs)])
  1058. , &(yylsp[(yyi + 1) - (yynrhs)]) , parseio);
  1059. YYFPRINTF (stderr, "\n");
  1060. }
  1061. }
  1062. # define YY_REDUCE_PRINT(Rule) \
  1063. do { \
  1064. if (yydebug) \
  1065. yy_reduce_print (yyvsp, yylsp, Rule, parseio); \
  1066. } while (YYID (0))
  1067. /* Nonzero means print parse trace. It is left uninitialized so that
  1068. multiple parsers can coexist. */
  1069. int yydebug;
  1070. #else /* !YYDEBUG */
  1071. # define YYDPRINTF(Args)
  1072. # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
  1073. # define YY_STACK_PRINT(Bottom, Top)
  1074. # define YY_REDUCE_PRINT(Rule)
  1075. #endif /* !YYDEBUG */
  1076. /* YYINITDEPTH -- initial size of the parser's stacks. */
  1077. #ifndef YYINITDEPTH
  1078. # define YYINITDEPTH 200
  1079. #endif
  1080. /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
  1081. if the built-in stack extension method is used).
  1082. Do not make this value too large; the results are undefined if
  1083. YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
  1084. evaluated with infinite-precision integer arithmetic. */
  1085. #ifndef YYMAXDEPTH
  1086. # define YYMAXDEPTH 10000
  1087. #endif
  1088. #if YYERROR_VERBOSE
  1089. # ifndef yystrlen
  1090. # if defined __GLIBC__ && defined _STRING_H
  1091. # define yystrlen strlen
  1092. # else
  1093. /* Return the length of YYSTR. */
  1094. #if (defined __STDC__ || defined __C99__FUNC__ \
  1095. || defined __cplusplus || defined _MSC_VER)
  1096. static YYSIZE_T
  1097. yystrlen (const char *yystr)
  1098. #else
  1099. static YYSIZE_T
  1100. yystrlen (yystr)
  1101. const char *yystr;
  1102. #endif
  1103. {
  1104. YYSIZE_T yylen;
  1105. for (yylen = 0; yystr[yylen]; yylen++)
  1106. continue;
  1107. return yylen;
  1108. }
  1109. # endif
  1110. # endif
  1111. # ifndef yystpcpy
  1112. # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
  1113. # define yystpcpy stpcpy
  1114. # else
  1115. /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
  1116. YYDEST. */
  1117. #if (defined __STDC__ || defined __C99__FUNC__ \
  1118. || defined __cplusplus || defined _MSC_VER)
  1119. static char *
  1120. yystpcpy (char *yydest, const char *yysrc)
  1121. #else
  1122. static char *
  1123. yystpcpy (yydest, yysrc)
  1124. char *yydest;
  1125. const char *yysrc;
  1126. #endif
  1127. {
  1128. char *yyd = yydest;
  1129. const char *yys = yysrc;
  1130. while ((*yyd++ = *yys++) != '\0')
  1131. continue;
  1132. return yyd - 1;
  1133. }
  1134. # endif
  1135. # endif
  1136. # ifndef yytnamerr
  1137. /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
  1138. quotes and backslashes, so that it's suitable for yyerror. The
  1139. heuristic is that double-quoting is unnecessary unless the string
  1140. contains an apostrophe, a comma, or backslash (other than
  1141. backslash-backslash). YYSTR is taken from yytname. If YYRES is
  1142. null, do not copy; instead, return the length of what the result
  1143. would have been. */
  1144. static YYSIZE_T
  1145. yytnamerr (char *yyres, const char *yystr)
  1146. {
  1147. if (*yystr == '"')
  1148. {
  1149. YYSIZE_T yyn = 0;
  1150. char const *yyp = yystr;
  1151. for (;;)
  1152. switch (*++yyp)
  1153. {
  1154. case '\'':
  1155. case ',':
  1156. goto do_not_strip_quotes;
  1157. case '\\':
  1158. if (*++yyp != '\\')
  1159. goto do_not_strip_quotes;
  1160. /* Fall through. */
  1161. default:
  1162. if (yyres)
  1163. yyres[yyn] = *yyp;
  1164. yyn++;
  1165. break;
  1166. case '"':
  1167. if (yyres)
  1168. yyres[yyn] = '\0';
  1169. return yyn;
  1170. }
  1171. do_not_strip_quotes: ;
  1172. }
  1173. if (! yyres)
  1174. return yystrlen (yystr);
  1175. return yystpcpy (yyres, yystr) - yyres;
  1176. }
  1177. # endif
  1178. /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
  1179. about the unexpected token YYTOKEN for the state stack whose top is
  1180. YYSSP.
  1181. Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
  1182. not large enough to hold the message. In that case, also set
  1183. *YYMSG_ALLOC to the required number of bytes. Return 2 if the
  1184. required number of bytes is too large to store. */
  1185. static int
  1186. yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
  1187. yytype_int16 *yyssp, int yytoken)
  1188. {
  1189. YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
  1190. YYSIZE_T yysize = yysize0;
  1191. YYSIZE_T yysize1;
  1192. enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
  1193. /* Internationalized format string. */
  1194. const char *yyformat = 0;
  1195. /* Arguments of yyformat. */
  1196. char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
  1197. /* Number of reported tokens (one for the "unexpected", one per
  1198. "expected"). */
  1199. int yycount = 0;
  1200. /* There are many possibilities here to consider:
  1201. - Assume YYFAIL is not used. It's too flawed to consider. See
  1202. <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
  1203. for details. YYERROR is fine as it does not invoke this
  1204. function.
  1205. - If this state is a consistent state with a default action, then
  1206. the only way this function was invoked is if the default action
  1207. is an error action. In that case, don't check for expected
  1208. tokens because there are none.
  1209. - The only way there can be no lookahead present (in yychar) is if
  1210. this state is a consistent state with a default action. Thus,
  1211. detecting the absence of a lookahead is sufficient to determine
  1212. that there is no unexpected or expected token to report. In that
  1213. case, just report a simple "syntax error".
  1214. - Don't assume there isn't a lookahead just because this state is a
  1215. consistent state with a default action. There might have been a
  1216. previous inconsistent state, consistent state with a non-default
  1217. action, or user semantic action that manipulated yychar.
  1218. - Of course, the expected token list depends on states to have
  1219. correct lookahead information, and it depends on the parser not
  1220. to perform extra reductions after fetching a lookahead from the
  1221. scanner and before detecting a syntax error. Thus, state merging
  1222. (from LALR or IELR) and default reductions corrupt the expected
  1223. token list. However, the list is correct for canonical LR with
  1224. one exception: it will still contain any token that will not be
  1225. accepted due to an error action in a later state.
  1226. */
  1227. if (yytoken != YYEMPTY)
  1228. {
  1229. int yyn = yypact[*yyssp];
  1230. yyarg[yycount++] = yytname[yytoken];
  1231. if (!yypact_value_is_default (yyn))
  1232. {
  1233. /* Start YYX at -YYN if negative to avoid negative indexes in
  1234. YYCHECK. In other words, skip the first -YYN actions for
  1235. this state because they are default actions. */
  1236. int yyxbegin = yyn < 0 ? -yyn : 0;
  1237. /* Stay within bounds of both yycheck and yytname. */
  1238. int yychecklim = YYLAST - yyn + 1;
  1239. int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
  1240. int yyx;
  1241. for (yyx = yyxbegin; yyx < yyxend; ++yyx)
  1242. if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
  1243. && !yytable_value_is_error (yytable[yyx + yyn]))
  1244. {
  1245. if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
  1246. {
  1247. yycount = 1;
  1248. yysize = yysize0;
  1249. break;
  1250. }
  1251. yyarg[yycount++] = yytname[yyx];
  1252. yysize1 = yysize + yytnamerr (0, yytname[yyx]);
  1253. if (! (yysize <= yysize1
  1254. && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
  1255. return 2;
  1256. yysize = yysize1;
  1257. }
  1258. }
  1259. }
  1260. switch (yycount)
  1261. {
  1262. # define YYCASE_(N, S) \
  1263. case N: \
  1264. yyformat = S; \
  1265. break
  1266. YYCASE_(0, YY_("syntax error"));
  1267. YYCASE_(1, YY_("syntax error, unexpected %s"));
  1268. YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
  1269. YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
  1270. YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
  1271. YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
  1272. # undef YYCASE_
  1273. }
  1274. yysize1 = yysize + yystrlen (yyformat);
  1275. if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
  1276. return 2;
  1277. yysize = yysize1;
  1278. if (*yymsg_alloc < yysize)
  1279. {
  1280. *yymsg_alloc = 2 * yysize;
  1281. if (! (yysize <= *yymsg_alloc
  1282. && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
  1283. *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
  1284. return 1;
  1285. }
  1286. /* Avoid sprintf, as that infringes on the user's name space.
  1287. Don't have undefined behavior even if the translation
  1288. produced a string with the wrong number of "%s"s. */
  1289. {
  1290. char *yyp = *yymsg;
  1291. int yyi = 0;
  1292. while ((*yyp = *yyformat) != '\0')
  1293. if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
  1294. {
  1295. yyp += yytnamerr (yyp, yyarg[yyi++]);
  1296. yyformat += 2;
  1297. }
  1298. else
  1299. {
  1300. yyp++;
  1301. yyformat++;
  1302. }
  1303. }
  1304. return 0;
  1305. }
  1306. #endif /* YYERROR_VERBOSE */
  1307. /*-----------------------------------------------.
  1308. | Release the memory associated to this symbol. |
  1309. `-----------------------------------------------*/
  1310. /*ARGSUSED*/
  1311. #if (defined __STDC__ || defined __C99__FUNC__ \
  1312. || defined __cplusplus || defined _MSC_VER)
  1313. static void
  1314. yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, struct parse_io *parseio)
  1315. #else
  1316. static void
  1317. yydestruct (yymsg, yytype, yyvaluep, yylocationp, parseio)
  1318. const char *yymsg;
  1319. int yytype;
  1320. YYSTYPE *yyvaluep;
  1321. YYLTYPE *yylocationp;
  1322. struct parse_io *parseio;
  1323. #endif
  1324. {
  1325. YYUSE (yyvaluep);
  1326. YYUSE (yylocationp);
  1327. YYUSE (parseio);
  1328. if (!yymsg)
  1329. yymsg = "Deleting";
  1330. YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
  1331. switch (yytype)
  1332. {
  1333. case 43: /* "word" */
  1334. /* Line 1391 of yacc.c */
  1335. #line 183 "ael.y"
  1336. { free((yyvaluep->str));};
  1337. /* Line 1391 of yacc.c */
  1338. #line 1506 "ael.tab.c"
  1339. break;
  1340. case 46: /* "objects" */
  1341. /* Line 1391 of yacc.c */
  1342. #line 170 "ael.y"
  1343. {
  1344. destroy_pval((yyvaluep->pval));
  1345. prev_word=0;
  1346. };
  1347. /* Line 1391 of yacc.c */
  1348. #line 1518 "ael.tab.c"
  1349. break;
  1350. case 47: /* "object" */
  1351. /* Line 1391 of yacc.c */
  1352. #line 170 "ael.y"
  1353. {
  1354. destroy_pval((yyvaluep->pval));
  1355. prev_word=0;
  1356. };
  1357. /* Line 1391 of yacc.c */
  1358. #line 1530 "ael.tab.c"
  1359. break;
  1360. case 48: /* "context_name" */
  1361. /* Line 1391 of yacc.c */
  1362. #line 183 "ael.y"
  1363. { free((yyvaluep->str));};
  1364. /* Line 1391 of yacc.c */
  1365. #line 1539 "ael.tab.c"
  1366. break;
  1367. case 49: /* "context" */
  1368. /* Line 1391 of yacc.c */
  1369. #line 170 "ael.y"
  1370. {
  1371. destroy_pval((yyvaluep->pval));
  1372. prev_word=0;
  1373. };
  1374. /* Line 1391 of yacc.c */
  1375. #line 1551 "ael.tab.c"
  1376. break;
  1377. case 51: /* "macro" */
  1378. /* Line 1391 of yacc.c */
  1379. #line 170 "ael.y"
  1380. {
  1381. destroy_pval((yyvaluep->pval));
  1382. prev_word=0;
  1383. };
  1384. /* Line 1391 of yacc.c */
  1385. #line 1563 "ael.tab.c"
  1386. break;
  1387. case 52: /* "globals" */
  1388. /* Line 1391 of yacc.c */
  1389. #line 170 "ael.y"
  1390. {
  1391. destroy_pval((yyvaluep->pval));
  1392. prev_word=0;
  1393. };
  1394. /* Line 1391 of yacc.c */
  1395. #line 1575 "ael.tab.c"
  1396. break;
  1397. case 53: /* "global_statements" */
  1398. /* Line 1391 of yacc.c */
  1399. #line 170 "ael.y"
  1400. {
  1401. destroy_pval((yyvaluep->pval));
  1402. prev_word=0;
  1403. };
  1404. /* Line 1391 of yacc.c */
  1405. #line 1587 "ael.tab.c"
  1406. break;
  1407. case 54: /* "assignment" */
  1408. /* Line 1391 of yacc.c */
  1409. #line 170 "ael.y"
  1410. {
  1411. destroy_pval((yyvaluep->pval));
  1412. prev_word=0;
  1413. };
  1414. /* Line 1391 of yacc.c */
  1415. #line 1599 "ael.tab.c"
  1416. break;
  1417. case 56: /* "local_assignment" */
  1418. /* Line 1391 of yacc.c */
  1419. #line 170 "ael.y"
  1420. {
  1421. destroy_pval((yyvaluep->pval));
  1422. prev_word=0;
  1423. };
  1424. /* Line 1391 of yacc.c */
  1425. #line 1611 "ael.tab.c"
  1426. break;
  1427. case 58: /* "arglist" */
  1428. /* Line 1391 of yacc.c */
  1429. #line 170 "ael.y"
  1430. {
  1431. destroy_pval((yyvaluep->pval));
  1432. prev_word=0;
  1433. };
  1434. /* Line 1391 of yacc.c */
  1435. #line 1623 "ael.tab.c"
  1436. break;
  1437. case 59: /* "elements" */
  1438. /* Line 1391 of yacc.c */
  1439. #line 170 "ael.y"
  1440. {
  1441. destroy_pval((yyvaluep->pval));
  1442. prev_word=0;
  1443. };
  1444. /* Line 1391 of yacc.c */
  1445. #line 1635 "ael.tab.c"
  1446. break;
  1447. case 60: /* "element" */
  1448. /* Line 1391 of yacc.c */
  1449. #line 170 "ael.y"
  1450. {
  1451. destroy_pval((yyvaluep->pval));
  1452. prev_word=0;
  1453. };
  1454. /* Line 1391 of yacc.c */
  1455. #line 1647 "ael.tab.c"
  1456. break;
  1457. case 61: /* "ignorepat" */
  1458. /* Line 1391 of yacc.c */
  1459. #line 170 "ael.y"
  1460. {
  1461. destroy_pval((yyvaluep->pval));
  1462. prev_word=0;
  1463. };
  1464. /* Line 1391 of yacc.c */
  1465. #line 1659 "ael.tab.c"
  1466. break;
  1467. case 62: /* "extension" */
  1468. /* Line 1391 of yacc.c */
  1469. #line 170 "ael.y"
  1470. {
  1471. destroy_pval((yyvaluep->pval));
  1472. prev_word=0;
  1473. };
  1474. /* Line 1391 of yacc.c */
  1475. #line 1671 "ael.tab.c"
  1476. break;
  1477. case 63: /* "statements" */
  1478. /* Line 1391 of yacc.c */
  1479. #line 170 "ael.y"
  1480. {
  1481. destroy_pval((yyvaluep->pval));
  1482. prev_word=0;
  1483. };
  1484. /* Line 1391 of yacc.c */
  1485. #line 1683 "ael.tab.c"
  1486. break;
  1487. case 64: /* "timerange" */
  1488. /* Line 1391 of yacc.c */
  1489. #line 183 "ael.y"
  1490. { free((yyvaluep->str));};
  1491. /* Line 1391 of yacc.c */
  1492. #line 1692 "ael.tab.c"
  1493. break;
  1494. case 65: /* "timespec" */
  1495. /* Line 1391 of yacc.c */
  1496. #line 170 "ael.y"
  1497. {
  1498. destroy_pval((yyvaluep->pval));
  1499. prev_word=0;
  1500. };
  1501. /* Line 1391 of yacc.c */
  1502. #line 1704 "ael.tab.c"
  1503. break;
  1504. case 66: /* "test_expr" */
  1505. /* Line 1391 of yacc.c */
  1506. #line 183 "ael.y"
  1507. { free((yyvaluep->str));};
  1508. /* Line 1391 of yacc.c */
  1509. #line 1713 "ael.tab.c"
  1510. break;
  1511. case 68: /* "if_like_head" */
  1512. /* Line 1391 of yacc.c */
  1513. #line 170 "ael.y"
  1514. {
  1515. destroy_pval((yyvaluep->pval));
  1516. prev_word=0;
  1517. };
  1518. /* Line 1391 of yacc.c */
  1519. #line 1725 "ael.tab.c"
  1520. break;
  1521. case 69: /* "word_list" */
  1522. /* Line 1391 of yacc.c */
  1523. #line 183 "ael.y"
  1524. { free((yyvaluep->str));};
  1525. /* Line 1391 of yacc.c */
  1526. #line 1734 "ael.tab.c"
  1527. break;
  1528. case 71: /* "word3_list" */
  1529. /* Line 1391 of yacc.c */
  1530. #line 183 "ael.y"
  1531. { free((yyvaluep->str));};
  1532. /* Line 1391 of yacc.c */
  1533. #line 1743 "ael.tab.c"
  1534. break;
  1535. case 72: /* "goto_word" */
  1536. /* Line 1391 of yacc.c */
  1537. #line 183 "ael.y"
  1538. { free((yyvaluep->str));};
  1539. /* Line 1391 of yacc.c */
  1540. #line 1752 "ael.tab.c"
  1541. break;
  1542. case 73: /* "switch_statement" */
  1543. /* Line 1391 of yacc.c */
  1544. #line 170 "ael.y"
  1545. {
  1546. destroy_pval((yyvaluep->pval));
  1547. prev_word=0;
  1548. };
  1549. /* Line 1391 of yacc.c */
  1550. #line 1764 "ael.tab.c"
  1551. break;
  1552. case 74: /* "statement" */
  1553. /* Line 1391 of yacc.c */
  1554. #line 170 "ael.y"
  1555. {
  1556. destroy_pval((yyvaluep->pval));
  1557. prev_word=0;
  1558. };
  1559. /* Line 1391 of yacc.c */
  1560. #line 1776 "ael.tab.c"
  1561. break;
  1562. case 79: /* "opt_else" */
  1563. /* Line 1391 of yacc.c */
  1564. #line 170 "ael.y"
  1565. {
  1566. destroy_pval((yyvaluep->pval));
  1567. prev_word=0;
  1568. };
  1569. /* Line 1391 of yacc.c */
  1570. #line 1788 "ael.tab.c"
  1571. break;
  1572. case 80: /* "target" */
  1573. /* Line 1391 of yacc.c */
  1574. #line 170 "ael.y"
  1575. {
  1576. destroy_pval((yyvaluep->pval));
  1577. prev_word=0;
  1578. };
  1579. /* Line 1391 of yacc.c */
  1580. #line 1800 "ael.tab.c"
  1581. break;
  1582. case 81: /* "opt_pri" */
  1583. /* Line 1391 of yacc.c */
  1584. #line 183 "ael.y"
  1585. { free((yyvaluep->str));};
  1586. /* Line 1391 of yacc.c */
  1587. #line 1809 "ael.tab.c"
  1588. break;
  1589. case 82: /* "jumptarget" */
  1590. /* Line 1391 of yacc.c */
  1591. #line 170 "ael.y"
  1592. {
  1593. destroy_pval((yyvaluep->pval));
  1594. prev_word=0;
  1595. };
  1596. /* Line 1391 of yacc.c */
  1597. #line 1821 "ael.tab.c"
  1598. break;
  1599. case 83: /* "macro_call" */
  1600. /* Line 1391 of yacc.c */
  1601. #line 170 "ael.y"
  1602. {
  1603. destroy_pval((yyvaluep->pval));
  1604. prev_word=0;
  1605. };
  1606. /* Line 1391 of yacc.c */
  1607. #line 1833 "ael.tab.c"
  1608. break;
  1609. case 85: /* "application_call_head" */
  1610. /* Line 1391 of yacc.c */
  1611. #line 170 "ael.y"
  1612. {
  1613. destroy_pval((yyvaluep->pval));
  1614. prev_word=0;
  1615. };
  1616. /* Line 1391 of yacc.c */
  1617. #line 1845 "ael.tab.c"
  1618. break;
  1619. case 87: /* "application_call" */
  1620. /* Line 1391 of yacc.c */
  1621. #line 170 "ael.y"
  1622. {
  1623. destroy_pval((yyvaluep->pval));
  1624. prev_word=0;
  1625. };
  1626. /* Line 1391 of yacc.c */
  1627. #line 1857 "ael.tab.c"
  1628. break;
  1629. case 88: /* "opt_word" */
  1630. /* Line 1391 of yacc.c */
  1631. #line 183 "ael.y"
  1632. { free((yyvaluep->str));};
  1633. /* Line 1391 of yacc.c */
  1634. #line 1866 "ael.tab.c"
  1635. break;
  1636. case 89: /* "eval_arglist" */
  1637. /* Line 1391 of yacc.c */
  1638. #line 170 "ael.y"
  1639. {
  1640. destroy_pval((yyvaluep->pval));
  1641. prev_word=0;
  1642. };
  1643. /* Line 1391 of yacc.c */
  1644. #line 1878 "ael.tab.c"
  1645. break;
  1646. case 90: /* "case_statements" */
  1647. /* Line 1391 of yacc.c */
  1648. #line 170 "ael.y"
  1649. {
  1650. destroy_pval((yyvaluep->pval));
  1651. prev_word=0;
  1652. };
  1653. /* Line 1391 of yacc.c */
  1654. #line 1890 "ael.tab.c"
  1655. break;
  1656. case 91: /* "case_statement" */
  1657. /* Line 1391 of yacc.c */
  1658. #line 170 "ael.y"
  1659. {
  1660. destroy_pval((yyvaluep->pval));
  1661. prev_word=0;
  1662. };
  1663. /* Line 1391 of yacc.c */
  1664. #line 1902 "ael.tab.c"
  1665. break;
  1666. case 92: /* "macro_statements" */
  1667. /* Line 1391 of yacc.c */
  1668. #line 170 "ael.y"
  1669. {
  1670. destroy_pval((yyvaluep->pval));
  1671. prev_word=0;
  1672. };
  1673. /* Line 1391 of yacc.c */
  1674. #line 1914 "ael.tab.c"
  1675. break;
  1676. case 93: /* "macro_statement" */
  1677. /* Line 1391 of yacc.c */
  1678. #line 170 "ael.y"
  1679. {
  1680. destroy_pval((yyvaluep->pval));
  1681. prev_word=0;
  1682. };
  1683. /* Line 1391 of yacc.c */
  1684. #line 1926 "ael.tab.c"
  1685. break;
  1686. case 94: /* "switches" */
  1687. /* Line 1391 of yacc.c */
  1688. #line 170 "ael.y"
  1689. {
  1690. destroy_pval((yyvaluep->pval));
  1691. prev_word=0;
  1692. };
  1693. /* Line 1391 of yacc.c */
  1694. #line 1938 "ael.tab.c"
  1695. break;
  1696. case 95: /* "eswitches" */
  1697. /* Line 1391 of yacc.c */
  1698. #line 170 "ael.y"
  1699. {
  1700. destroy_pval((yyvaluep->pval));
  1701. prev_word=0;
  1702. };
  1703. /* Line 1391 of yacc.c */
  1704. #line 1950 "ael.tab.c"
  1705. break;
  1706. case 96: /* "switchlist" */
  1707. /* Line 1391 of yacc.c */
  1708. #line 170 "ael.y"
  1709. {
  1710. destroy_pval((yyvaluep->pval));
  1711. prev_word=0;
  1712. };
  1713. /* Line 1391 of yacc.c */
  1714. #line 1962 "ael.tab.c"
  1715. break;
  1716. case 97: /* "included_entry" */
  1717. /* Line 1391 of yacc.c */
  1718. #line 170 "ael.y"
  1719. {
  1720. destroy_pval((yyvaluep->pval));
  1721. prev_word=0;
  1722. };
  1723. /* Line 1391 of yacc.c */
  1724. #line 1974 "ael.tab.c"
  1725. break;
  1726. case 98: /* "includeslist" */
  1727. /* Line 1391 of yacc.c */
  1728. #line 170 "ael.y"
  1729. {
  1730. destroy_pval((yyvaluep->pval));
  1731. prev_word=0;
  1732. };
  1733. /* Line 1391 of yacc.c */
  1734. #line 1986 "ael.tab.c"
  1735. break;
  1736. case 99: /* "includes" */
  1737. /* Line 1391 of yacc.c */
  1738. #line 170 "ael.y"
  1739. {
  1740. destroy_pval((yyvaluep->pval));
  1741. prev_word=0;
  1742. };
  1743. /* Line 1391 of yacc.c */
  1744. #line 1998 "ael.tab.c"
  1745. break;
  1746. default:
  1747. break;
  1748. }
  1749. }
  1750. /* Prevent warnings from -Wmissing-prototypes. */
  1751. #ifdef YYPARSE_PARAM
  1752. #if defined __STDC__ || defined __cplusplus
  1753. int yyparse (void *YYPARSE_PARAM);
  1754. #else
  1755. int yyparse ();
  1756. #endif
  1757. #else /* ! YYPARSE_PARAM */
  1758. #if defined __STDC__ || defined __cplusplus
  1759. int yyparse (struct parse_io *parseio);
  1760. #else
  1761. int yyparse ();
  1762. #endif
  1763. #endif /* ! YYPARSE_PARAM */
  1764. /*----------.
  1765. | yyparse. |
  1766. `----------*/
  1767. #ifdef YYPARSE_PARAM
  1768. #if (defined __STDC__ || defined __C99__FUNC__ \
  1769. || defined __cplusplus || defined _MSC_VER)
  1770. int
  1771. yyparse (void *YYPARSE_PARAM)
  1772. #else
  1773. int
  1774. yyparse (YYPARSE_PARAM)
  1775. void *YYPARSE_PARAM;
  1776. #endif
  1777. #else /* ! YYPARSE_PARAM */
  1778. #if (defined __STDC__ || defined __C99__FUNC__ \
  1779. || defined __cplusplus || defined _MSC_VER)
  1780. int
  1781. yyparse (struct parse_io *parseio)
  1782. #else
  1783. int
  1784. yyparse (parseio)
  1785. struct parse_io *parseio;
  1786. #endif
  1787. #endif
  1788. {
  1789. /* The lookahead symbol. */
  1790. int yychar;
  1791. /* The semantic value of the lookahead symbol. */
  1792. YYSTYPE yylval;
  1793. /* Location data for the lookahead symbol. */
  1794. YYLTYPE yylloc;
  1795. /* Number of syntax errors so far. */
  1796. int yynerrs;
  1797. int yystate;
  1798. /* Number of tokens to shift before error messages enabled. */
  1799. int yyerrstatus;
  1800. /* The stacks and their tools:
  1801. `yyss': related to states.
  1802. `yyvs': related to semantic values.
  1803. `yyls': related to locations.
  1804. Refer to the stacks thru separate pointers, to allow yyoverflow
  1805. to reallocate them elsewhere. */
  1806. /* The state stack. */
  1807. yytype_int16 yyssa[YYINITDEPTH];
  1808. yytype_int16 *yyss;
  1809. yytype_int16 *yyssp;
  1810. /* The semantic value stack. */
  1811. YYSTYPE yyvsa[YYINITDEPTH];
  1812. YYSTYPE *yyvs;
  1813. YYSTYPE *yyvsp;
  1814. /* The location stack. */
  1815. YYLTYPE yylsa[YYINITDEPTH];
  1816. YYLTYPE *yyls;
  1817. YYLTYPE *yylsp;
  1818. /* The locations where the error started and ended. */
  1819. YYLTYPE yyerror_range[3];
  1820. YYSIZE_T yystacksize;
  1821. int yyn;
  1822. int yyresult;
  1823. /* Lookahead token as an internal (translated) token number. */
  1824. int yytoken;
  1825. /* The variables used to return semantic value and location from the
  1826. action routines. */
  1827. YYSTYPE yyval;
  1828. YYLTYPE yyloc;
  1829. #if YYERROR_VERBOSE
  1830. /* Buffer for error messages, and its allocated size. */
  1831. char yymsgbuf[128];
  1832. char *yymsg = yymsgbuf;
  1833. YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
  1834. #endif
  1835. #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
  1836. /* The number of symbols on the RHS of the reduced rule.
  1837. Keep to zero when no symbol should be popped. */
  1838. int yylen = 0;
  1839. yytoken = 0;
  1840. yyss = yyssa;
  1841. yyvs = yyvsa;
  1842. yyls = yylsa;
  1843. yystacksize = YYINITDEPTH;
  1844. YYDPRINTF ((stderr, "Starting parse\n"));
  1845. yystate = 0;
  1846. yyerrstatus = 0;
  1847. yynerrs = 0;
  1848. yychar = YYEMPTY; /* Cause a token to be read. */
  1849. /* Initialize stack pointers.
  1850. Waste one element of value and location stack
  1851. so that they stay on the same level as the state stack.
  1852. The wasted elements are never initialized. */
  1853. yyssp = yyss;
  1854. yyvsp = yyvs;
  1855. yylsp = yyls;
  1856. #if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
  1857. /* Initialize the default location before parsing starts. */
  1858. yylloc.first_line = yylloc.last_line = 1;
  1859. yylloc.first_column = yylloc.last_column = 1;
  1860. #endif
  1861. goto yysetstate;
  1862. /*------------------------------------------------------------.
  1863. | yynewstate -- Push a new state, which is found in yystate. |
  1864. `------------------------------------------------------------*/
  1865. yynewstate:
  1866. /* In all cases, when you get here, the value and location stacks
  1867. have just been pushed. So pushing a state here evens the stacks. */
  1868. yyssp++;
  1869. yysetstate:
  1870. *yyssp = yystate;
  1871. if (yyss + yystacksize - 1 <= yyssp)
  1872. {
  1873. /* Get the current used size of the three stacks, in elements. */
  1874. YYSIZE_T yysize = yyssp - yyss + 1;
  1875. #ifdef yyoverflow
  1876. {
  1877. /* Give user a chance to reallocate the stack. Use copies of
  1878. these so that the &'s don't force the real ones into
  1879. memory. */
  1880. YYSTYPE *yyvs1 = yyvs;
  1881. yytype_int16 *yyss1 = yyss;
  1882. YYLTYPE *yyls1 = yyls;
  1883. /* Each stack pointer address is followed by the size of the
  1884. data in use in that stack, in bytes. This used to be a
  1885. conditional around just the two extra args, but that might
  1886. be undefined if yyoverflow is a macro. */
  1887. yyoverflow (YY_("memory exhausted"),
  1888. &yyss1, yysize * sizeof (*yyssp),
  1889. &yyvs1, yysize * sizeof (*yyvsp),
  1890. &yyls1, yysize * sizeof (*yylsp),
  1891. &yystacksize);
  1892. yyls = yyls1;
  1893. yyss = yyss1;
  1894. yyvs = yyvs1;
  1895. }
  1896. #else /* no yyoverflow */
  1897. # ifndef YYSTACK_RELOCATE
  1898. goto yyexhaustedlab;
  1899. # else
  1900. /* Extend the stack our own way. */
  1901. if (YYMAXDEPTH <= yystacksize)
  1902. goto yyexhaustedlab;
  1903. yystacksize *= 2;
  1904. if (YYMAXDEPTH < yystacksize)
  1905. yystacksize = YYMAXDEPTH;
  1906. {
  1907. yytype_int16 *yyss1 = yyss;
  1908. union yyalloc *yyptr =
  1909. (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
  1910. if (! yyptr)
  1911. goto yyexhaustedlab;
  1912. YYSTACK_RELOCATE (yyss_alloc, yyss);
  1913. YYSTACK_RELOCATE (yyvs_alloc, yyvs);
  1914. YYSTACK_RELOCATE (yyls_alloc, yyls);
  1915. # undef YYSTACK_RELOCATE
  1916. if (yyss1 != yyssa)
  1917. YYSTACK_FREE (yyss1);
  1918. }
  1919. # endif
  1920. #endif /* no yyoverflow */
  1921. yyssp = yyss + yysize - 1;
  1922. yyvsp = yyvs + yysize - 1;
  1923. yylsp = yyls + yysize - 1;
  1924. YYDPRINTF ((stderr, "Stack size increased to %lu\n",
  1925. (unsigned long int) yystacksize));
  1926. if (yyss + yystacksize - 1 <= yyssp)
  1927. YYABORT;
  1928. }
  1929. YYDPRINTF ((stderr, "Entering state %d\n", yystate));
  1930. if (yystate == YYFINAL)
  1931. YYACCEPT;
  1932. goto yybackup;
  1933. /*-----------.
  1934. | yybackup. |
  1935. `-----------*/
  1936. yybackup:
  1937. /* Do appropriate processing given the current state. Read a
  1938. lookahead token if we need one and don't already have one. */
  1939. /* First try to decide what to do without reference to lookahead token. */
  1940. yyn = yypact[yystate];
  1941. if (yypact_value_is_default (yyn))
  1942. goto yydefault;
  1943. /* Not known => get a lookahead token if don't already have one. */
  1944. /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
  1945. if (yychar == YYEMPTY)
  1946. {
  1947. YYDPRINTF ((stderr, "Reading a token: "));
  1948. yychar = YYLEX;
  1949. }
  1950. if (yychar <= YYEOF)
  1951. {
  1952. yychar = yytoken = YYEOF;
  1953. YYDPRINTF ((stderr, "Now at end of input.\n"));
  1954. }
  1955. else
  1956. {
  1957. yytoken = YYTRANSLATE (yychar);
  1958. YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
  1959. }
  1960. /* If the proper action on seeing token YYTOKEN is to reduce or to
  1961. detect an error, take that action. */
  1962. yyn += yytoken;
  1963. if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
  1964. goto yydefault;
  1965. yyn = yytable[yyn];
  1966. if (yyn <= 0)
  1967. {
  1968. if (yytable_value_is_error (yyn))
  1969. goto yyerrlab;
  1970. yyn = -yyn;
  1971. goto yyreduce;
  1972. }
  1973. /* Count tokens shifted since error; after three, turn off error
  1974. status. */
  1975. if (yyerrstatus)
  1976. yyerrstatus--;
  1977. /* Shift the lookahead token. */
  1978. YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
  1979. /* Discard the shifted token. */
  1980. yychar = YYEMPTY;
  1981. yystate = yyn;
  1982. *++yyvsp = yylval;
  1983. *++yylsp = yylloc;
  1984. goto yynewstate;
  1985. /*-----------------------------------------------------------.
  1986. | yydefault -- do the default action for the current state. |
  1987. `-----------------------------------------------------------*/
  1988. yydefault:
  1989. yyn = yydefact[yystate];
  1990. if (yyn == 0)
  1991. goto yyerrlab;
  1992. goto yyreduce;
  1993. /*-----------------------------.
  1994. | yyreduce -- Do a reduction. |
  1995. `-----------------------------*/
  1996. yyreduce:
  1997. /* yyn is the number of a rule to reduce with. */
  1998. yylen = yyr2[yyn];
  1999. /* If YYLEN is nonzero, implement the default value of the action:
  2000. `$$ = $1'.
  2001. Otherwise, the following line sets YYVAL to garbage.
  2002. This behavior is undocumented and Bison
  2003. users should not rely upon it. Assigning to YYVAL
  2004. unconditionally makes the parser a bit smaller, and it avoids a
  2005. GCC warning that YYVAL may be used uninitialized. */
  2006. yyval = yyvsp[1-yylen];
  2007. /* Default location. */
  2008. YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
  2009. YY_REDUCE_PRINT (yyn);
  2010. switch (yyn)
  2011. {
  2012. case 2:
  2013. /* Line 1806 of yacc.c */
  2014. #line 191 "ael.y"
  2015. { (yyval.pval) = parseio->pval = (yyvsp[(1) - (1)].pval); }
  2016. break;
  2017. case 3:
  2018. /* Line 1806 of yacc.c */
  2019. #line 194 "ael.y"
  2020. {(yyval.pval)=(yyvsp[(1) - (1)].pval);}
  2021. break;
  2022. case 4:
  2023. /* Line 1806 of yacc.c */
  2024. #line 195 "ael.y"
  2025. { (yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); }
  2026. break;
  2027. case 5:
  2028. /* Line 1806 of yacc.c */
  2029. #line 196 "ael.y"
  2030. {(yyval.pval)=(yyvsp[(1) - (2)].pval);}
  2031. break;
  2032. case 6:
  2033. /* Line 1806 of yacc.c */
  2034. #line 199 "ael.y"
  2035. {(yyval.pval)=(yyvsp[(1) - (1)].pval);}
  2036. break;
  2037. case 7:
  2038. /* Line 1806 of yacc.c */
  2039. #line 200 "ael.y"
  2040. {(yyval.pval)=(yyvsp[(1) - (1)].pval);}
  2041. break;
  2042. case 8:
  2043. /* Line 1806 of yacc.c */
  2044. #line 201 "ael.y"
  2045. {(yyval.pval)=(yyvsp[(1) - (1)].pval);}
  2046. break;
  2047. case 9:
  2048. /* Line 1806 of yacc.c */
  2049. #line 202 "ael.y"
  2050. {(yyval.pval)=0;/* allow older docs to be read */}
  2051. break;
  2052. case 10:
  2053. /* Line 1806 of yacc.c */
  2054. #line 205 "ael.y"
  2055. { (yyval.str) = (yyvsp[(1) - (1)].str); }
  2056. break;
  2057. case 11:
  2058. /* Line 1806 of yacc.c */
  2059. #line 206 "ael.y"
  2060. { (yyval.str) = strdup("default"); }
  2061. break;
  2062. case 12:
  2063. /* Line 1806 of yacc.c */
  2064. #line 209 "ael.y"
  2065. {
  2066. (yyval.pval) = npval2(PV_CONTEXT, &(yylsp[(1) - (6)]), &(yylsp[(6) - (6)]));
  2067. (yyval.pval)->u1.str = (yyvsp[(3) - (6)].str);
  2068. (yyval.pval)->u2.statements = (yyvsp[(5) - (6)].pval);
  2069. set_dads((yyval.pval),(yyvsp[(5) - (6)].pval));
  2070. (yyval.pval)->u3.abstract = (yyvsp[(1) - (6)].intval);}
  2071. break;
  2072. case 13:
  2073. /* Line 1806 of yacc.c */
  2074. #line 218 "ael.y"
  2075. { (yyval.intval) = 1; }
  2076. break;
  2077. case 14:
  2078. /* Line 1806 of yacc.c */
  2079. #line 219 "ael.y"
  2080. { (yyval.intval) = 0; }
  2081. break;
  2082. case 15:
  2083. /* Line 1806 of yacc.c */
  2084. #line 220 "ael.y"
  2085. { (yyval.intval) = 2; }
  2086. break;
  2087. case 16:
  2088. /* Line 1806 of yacc.c */
  2089. #line 221 "ael.y"
  2090. { (yyval.intval)=3; }
  2091. break;
  2092. case 17:
  2093. /* Line 1806 of yacc.c */
  2094. #line 222 "ael.y"
  2095. { (yyval.intval)=3; }
  2096. break;
  2097. case 18:
  2098. /* Line 1806 of yacc.c */
  2099. #line 225 "ael.y"
  2100. {
  2101. (yyval.pval) = npval2(PV_MACRO, &(yylsp[(1) - (8)]), &(yylsp[(8) - (8)]));
  2102. (yyval.pval)->u1.str = (yyvsp[(2) - (8)].str); (yyval.pval)->u2.arglist = (yyvsp[(4) - (8)].pval); (yyval.pval)->u3.macro_statements = (yyvsp[(7) - (8)].pval);
  2103. set_dads((yyval.pval),(yyvsp[(7) - (8)].pval));}
  2104. break;
  2105. case 19:
  2106. /* Line 1806 of yacc.c */
  2107. #line 231 "ael.y"
  2108. {
  2109. (yyval.pval) = npval2(PV_GLOBALS, &(yylsp[(1) - (4)]), &(yylsp[(4) - (4)]));
  2110. (yyval.pval)->u1.statements = (yyvsp[(3) - (4)].pval);
  2111. set_dads((yyval.pval),(yyvsp[(3) - (4)].pval));}
  2112. break;
  2113. case 20:
  2114. /* Line 1806 of yacc.c */
  2115. #line 237 "ael.y"
  2116. { (yyval.pval) = NULL; }
  2117. break;
  2118. case 21:
  2119. /* Line 1806 of yacc.c */
  2120. #line 238 "ael.y"
  2121. {(yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); }
  2122. break;
  2123. case 22:
  2124. /* Line 1806 of yacc.c */
  2125. #line 239 "ael.y"
  2126. {(yyval.pval)=(yyvsp[(2) - (2)].pval);}
  2127. break;
  2128. case 23:
  2129. /* Line 1806 of yacc.c */
  2130. #line 242 "ael.y"
  2131. { reset_semicount(parseio->scanner); }
  2132. break;
  2133. case 24:
  2134. /* Line 1806 of yacc.c */
  2135. #line 242 "ael.y"
  2136. {
  2137. (yyval.pval) = npval2(PV_VARDEC, &(yylsp[(1) - (5)]), &(yylsp[(5) - (5)]));
  2138. (yyval.pval)->u1.str = (yyvsp[(1) - (5)].str);
  2139. (yyval.pval)->u2.val = (yyvsp[(4) - (5)].str); }
  2140. break;
  2141. case 25:
  2142. /* Line 1806 of yacc.c */
  2143. #line 248 "ael.y"
  2144. { reset_semicount(parseio->scanner); }
  2145. break;
  2146. case 26:
  2147. /* Line 1806 of yacc.c */
  2148. #line 248 "ael.y"
  2149. {
  2150. (yyval.pval) = npval2(PV_LOCALVARDEC, &(yylsp[(1) - (6)]), &(yylsp[(6) - (6)]));
  2151. (yyval.pval)->u1.str = (yyvsp[(2) - (6)].str);
  2152. (yyval.pval)->u2.val = (yyvsp[(5) - (6)].str); }
  2153. break;
  2154. case 27:
  2155. /* Line 1806 of yacc.c */
  2156. #line 255 "ael.y"
  2157. { (yyval.pval) = NULL; }
  2158. break;
  2159. case 28:
  2160. /* Line 1806 of yacc.c */
  2161. #line 256 "ael.y"
  2162. { (yyval.pval) = nword((yyvsp[(1) - (1)].str), &(yylsp[(1) - (1)])); }
  2163. break;
  2164. case 29:
  2165. /* Line 1806 of yacc.c */
  2166. #line 257 "ael.y"
  2167. { (yyval.pval) = linku1((yyvsp[(1) - (3)].pval), nword((yyvsp[(3) - (3)].str), &(yylsp[(3) - (3)]))); }
  2168. break;
  2169. case 30:
  2170. /* Line 1806 of yacc.c */
  2171. #line 258 "ael.y"
  2172. {(yyval.pval)=(yyvsp[(1) - (2)].pval);}
  2173. break;
  2174. case 31:
  2175. /* Line 1806 of yacc.c */
  2176. #line 261 "ael.y"
  2177. {(yyval.pval)=0;}
  2178. break;
  2179. case 32:
  2180. /* Line 1806 of yacc.c */
  2181. #line 262 "ael.y"
  2182. { (yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); }
  2183. break;
  2184. case 33:
  2185. /* Line 1806 of yacc.c */
  2186. #line 263 "ael.y"
  2187. { (yyval.pval)=(yyvsp[(2) - (2)].pval);}
  2188. break;
  2189. case 34:
  2190. /* Line 1806 of yacc.c */
  2191. #line 266 "ael.y"
  2192. {(yyval.pval)=(yyvsp[(1) - (1)].pval);}
  2193. break;
  2194. case 35:
  2195. /* Line 1806 of yacc.c */
  2196. #line 267 "ael.y"
  2197. {(yyval.pval)=(yyvsp[(1) - (1)].pval);}
  2198. break;
  2199. case 36:
  2200. /* Line 1806 of yacc.c */
  2201. #line 268 "ael.y"
  2202. {(yyval.pval)=(yyvsp[(1) - (1)].pval);}
  2203. break;
  2204. case 37:
  2205. /* Line 1806 of yacc.c */
  2206. #line 269 "ael.y"
  2207. {(yyval.pval)=(yyvsp[(1) - (1)].pval);}
  2208. break;
  2209. case 38:
  2210. /* Line 1806 of yacc.c */
  2211. #line 270 "ael.y"
  2212. {(yyval.pval)=(yyvsp[(1) - (1)].pval);}
  2213. break;
  2214. case 39:
  2215. /* Line 1806 of yacc.c */
  2216. #line 271 "ael.y"
  2217. {(yyval.pval)=(yyvsp[(1) - (1)].pval);}
  2218. break;
  2219. case 40:
  2220. /* Line 1806 of yacc.c */
  2221. #line 272 "ael.y"
  2222. {(yyval.pval)=(yyvsp[(1) - (1)].pval);}
  2223. break;
  2224. case 41:
  2225. /* Line 1806 of yacc.c */
  2226. #line 273 "ael.y"
  2227. {free((yyvsp[(1) - (2)].str)); (yyval.pval)=0;}
  2228. break;
  2229. case 42:
  2230. /* Line 1806 of yacc.c */
  2231. #line 274 "ael.y"
  2232. {(yyval.pval)=0;/* allow older docs to be read */}
  2233. break;
  2234. case 43:
  2235. /* Line 1806 of yacc.c */
  2236. #line 277 "ael.y"
  2237. {
  2238. (yyval.pval) = npval2(PV_IGNOREPAT, &(yylsp[(1) - (4)]), &(yylsp[(4) - (4)]));
  2239. (yyval.pval)->u1.str = (yyvsp[(3) - (4)].str);}
  2240. break;
  2241. case 44:
  2242. /* Line 1806 of yacc.c */
  2243. #line 282 "ael.y"
  2244. {
  2245. (yyval.pval) = npval2(PV_EXTENSION, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
  2246. (yyval.pval)->u1.str = (yyvsp[(1) - (3)].str);
  2247. (yyval.pval)->u2.statements = (yyvsp[(3) - (3)].pval); set_dads((yyval.pval),(yyvsp[(3) - (3)].pval));}
  2248. break;
  2249. case 45:
  2250. /* Line 1806 of yacc.c */
  2251. #line 286 "ael.y"
  2252. {
  2253. (yyval.pval) = npval2(PV_EXTENSION, &(yylsp[(1) - (5)]), &(yylsp[(3) - (5)]));
  2254. (yyval.pval)->u1.str = malloc(strlen((yyvsp[(1) - (5)].str))+strlen((yyvsp[(3) - (5)].str))+2);
  2255. strcpy((yyval.pval)->u1.str,(yyvsp[(1) - (5)].str));
  2256. strcat((yyval.pval)->u1.str,"@");
  2257. strcat((yyval.pval)->u1.str,(yyvsp[(3) - (5)].str));
  2258. free((yyvsp[(1) - (5)].str));
  2259. (yyval.pval)->u2.statements = (yyvsp[(5) - (5)].pval); set_dads((yyval.pval),(yyvsp[(5) - (5)].pval));}
  2260. break;
  2261. case 46:
  2262. /* Line 1806 of yacc.c */
  2263. #line 294 "ael.y"
  2264. {
  2265. (yyval.pval) = npval2(PV_EXTENSION, &(yylsp[(1) - (4)]), &(yylsp[(4) - (4)]));
  2266. (yyval.pval)->u1.str = (yyvsp[(2) - (4)].str);
  2267. (yyval.pval)->u2.statements = (yyvsp[(4) - (4)].pval); set_dads((yyval.pval),(yyvsp[(4) - (4)].pval));
  2268. (yyval.pval)->u4.regexten=1;}
  2269. break;
  2270. case 47:
  2271. /* Line 1806 of yacc.c */
  2272. #line 299 "ael.y"
  2273. {
  2274. (yyval.pval) = npval2(PV_EXTENSION, &(yylsp[(1) - (7)]), &(yylsp[(7) - (7)]));
  2275. (yyval.pval)->u1.str = (yyvsp[(5) - (7)].str);
  2276. (yyval.pval)->u2.statements = (yyvsp[(7) - (7)].pval); set_dads((yyval.pval),(yyvsp[(7) - (7)].pval));
  2277. (yyval.pval)->u3.hints = (yyvsp[(3) - (7)].str);}
  2278. break;
  2279. case 48:
  2280. /* Line 1806 of yacc.c */
  2281. #line 304 "ael.y"
  2282. {
  2283. (yyval.pval) = npval2(PV_EXTENSION, &(yylsp[(1) - (8)]), &(yylsp[(8) - (8)]));
  2284. (yyval.pval)->u1.str = (yyvsp[(6) - (8)].str);
  2285. (yyval.pval)->u2.statements = (yyvsp[(8) - (8)].pval); set_dads((yyval.pval),(yyvsp[(8) - (8)].pval));
  2286. (yyval.pval)->u4.regexten=1;
  2287. (yyval.pval)->u3.hints = (yyvsp[(4) - (8)].str);}
  2288. break;
  2289. case 49:
  2290. /* Line 1806 of yacc.c */
  2291. #line 313 "ael.y"
  2292. { (yyval.pval) = NULL; }
  2293. break;
  2294. case 50:
  2295. /* Line 1806 of yacc.c */
  2296. #line 314 "ael.y"
  2297. { (yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); }
  2298. break;
  2299. case 51:
  2300. /* Line 1806 of yacc.c */
  2301. #line 315 "ael.y"
  2302. {(yyval.pval)=(yyvsp[(2) - (2)].pval);}
  2303. break;
  2304. case 52:
  2305. /* Line 1806 of yacc.c */
  2306. #line 321 "ael.y"
  2307. {
  2308. if (asprintf(&(yyval.str), "%s:%s:%s", (yyvsp[(1) - (5)].str), (yyvsp[(3) - (5)].str), (yyvsp[(5) - (5)].str)) < 0) {
  2309. ast_log(LOG_WARNING, "asprintf() failed\n");
  2310. (yyval.str) = NULL;
  2311. } else {
  2312. free((yyvsp[(1) - (5)].str));
  2313. free((yyvsp[(3) - (5)].str));
  2314. free((yyvsp[(5) - (5)].str));
  2315. }
  2316. }
  2317. break;
  2318. case 53:
  2319. /* Line 1806 of yacc.c */
  2320. #line 331 "ael.y"
  2321. { (yyval.str) = (yyvsp[(1) - (1)].str); }
  2322. break;
  2323. case 54:
  2324. /* Line 1806 of yacc.c */
  2325. #line 335 "ael.y"
  2326. {
  2327. (yyval.pval) = nword((yyvsp[(1) - (7)].str), &(yylsp[(1) - (7)]));
  2328. (yyval.pval)->next = nword((yyvsp[(3) - (7)].str), &(yylsp[(3) - (7)]));
  2329. (yyval.pval)->next->next = nword((yyvsp[(5) - (7)].str), &(yylsp[(5) - (7)]));
  2330. (yyval.pval)->next->next->next = nword((yyvsp[(7) - (7)].str), &(yylsp[(7) - (7)])); }
  2331. break;
  2332. case 55:
  2333. /* Line 1806 of yacc.c */
  2334. #line 343 "ael.y"
  2335. { reset_parencount(parseio->scanner); }
  2336. break;
  2337. case 56:
  2338. /* Line 1806 of yacc.c */
  2339. #line 343 "ael.y"
  2340. { (yyval.str) = (yyvsp[(3) - (4)].str); }
  2341. break;
  2342. case 57:
  2343. /* Line 1806 of yacc.c */
  2344. #line 347 "ael.y"
  2345. {
  2346. (yyval.pval)= npval2(PV_IF, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)]));
  2347. (yyval.pval)->u1.str = (yyvsp[(2) - (2)].str); }
  2348. break;
  2349. case 58:
  2350. /* Line 1806 of yacc.c */
  2351. #line 350 "ael.y"
  2352. {
  2353. (yyval.pval) = npval2(PV_RANDOM, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)]));
  2354. (yyval.pval)->u1.str=(yyvsp[(2) - (2)].str);}
  2355. break;
  2356. case 59:
  2357. /* Line 1806 of yacc.c */
  2358. #line 353 "ael.y"
  2359. {
  2360. (yyval.pval) = npval2(PV_IFTIME, &(yylsp[(1) - (4)]), &(yylsp[(4) - (4)]));
  2361. (yyval.pval)->u1.list = (yyvsp[(3) - (4)].pval);
  2362. prev_word = 0; }
  2363. break;
  2364. case 60:
  2365. /* Line 1806 of yacc.c */
  2366. #line 364 "ael.y"
  2367. { (yyval.str) = (yyvsp[(1) - (1)].str);}
  2368. break;
  2369. case 61:
  2370. /* Line 1806 of yacc.c */
  2371. #line 365 "ael.y"
  2372. {
  2373. if (asprintf(&((yyval.str)), "%s%s", (yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].str)) < 0) {
  2374. ast_log(LOG_WARNING, "asprintf() failed\n");
  2375. (yyval.str) = NULL;
  2376. } else {
  2377. free((yyvsp[(1) - (2)].str));
  2378. free((yyvsp[(2) - (2)].str));
  2379. prev_word = (yyval.str);
  2380. }
  2381. }
  2382. break;
  2383. case 62:
  2384. /* Line 1806 of yacc.c */
  2385. #line 377 "ael.y"
  2386. { (yyval.str) = (yyvsp[(1) - (1)].str); }
  2387. break;
  2388. case 63:
  2389. /* Line 1806 of yacc.c */
  2390. #line 378 "ael.y"
  2391. {
  2392. if (asprintf(&((yyval.str)), "%s %s", (yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].str)) < 0) {
  2393. ast_log(LOG_WARNING, "asprintf() failed\n");
  2394. (yyval.str) = NULL;
  2395. } else {
  2396. free((yyvsp[(1) - (2)].str));
  2397. free((yyvsp[(2) - (2)].str));
  2398. }
  2399. }
  2400. break;
  2401. case 64:
  2402. /* Line 1806 of yacc.c */
  2403. #line 387 "ael.y"
  2404. {
  2405. if (asprintf(&((yyval.str)), "%s:%s", (yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].str)) < 0) {
  2406. ast_log(LOG_WARNING, "asprintf() failed\n");
  2407. (yyval.str) = NULL;
  2408. } else {
  2409. free((yyvsp[(1) - (3)].str));
  2410. free((yyvsp[(3) - (3)].str));
  2411. }
  2412. }
  2413. break;
  2414. case 65:
  2415. /* Line 1806 of yacc.c */
  2416. #line 396 "ael.y"
  2417. { /* there are often '&' in hints */
  2418. if (asprintf(&((yyval.str)), "%s&%s", (yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].str)) < 0) {
  2419. ast_log(LOG_WARNING, "asprintf() failed\n");
  2420. (yyval.str) = NULL;
  2421. } else {
  2422. free((yyvsp[(1) - (3)].str));
  2423. free((yyvsp[(3) - (3)].str));
  2424. }
  2425. }
  2426. break;
  2427. case 66:
  2428. /* Line 1806 of yacc.c */
  2429. #line 405 "ael.y"
  2430. {
  2431. if (asprintf(&((yyval.str)), "%s@%s", (yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].str)) < 0) {
  2432. ast_log(LOG_WARNING, "asprintf() failed\n");
  2433. (yyval.str) = NULL;
  2434. } else {
  2435. free((yyvsp[(1) - (3)].str));
  2436. free((yyvsp[(3) - (3)].str));
  2437. }
  2438. }
  2439. break;
  2440. case 67:
  2441. /* Line 1806 of yacc.c */
  2442. #line 416 "ael.y"
  2443. { (yyval.str) = (yyvsp[(1) - (1)].str);}
  2444. break;
  2445. case 68:
  2446. /* Line 1806 of yacc.c */
  2447. #line 417 "ael.y"
  2448. {
  2449. if (asprintf(&((yyval.str)), "%s%s", (yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].str)) < 0) {
  2450. ast_log(LOG_WARNING, "asprintf() failed\n");
  2451. (yyval.str) = NULL;
  2452. } else {
  2453. free((yyvsp[(1) - (2)].str));
  2454. free((yyvsp[(2) - (2)].str));
  2455. prev_word = (yyval.str);
  2456. }
  2457. }
  2458. break;
  2459. case 69:
  2460. /* Line 1806 of yacc.c */
  2461. #line 427 "ael.y"
  2462. {
  2463. if (asprintf(&((yyval.str)), "%s%s%s", (yyvsp[(1) - (3)].str), (yyvsp[(2) - (3)].str), (yyvsp[(3) - (3)].str)) < 0) {
  2464. ast_log(LOG_WARNING, "asprintf() failed\n");
  2465. (yyval.str) = NULL;
  2466. } else {
  2467. free((yyvsp[(1) - (3)].str));
  2468. free((yyvsp[(2) - (3)].str));
  2469. free((yyvsp[(3) - (3)].str));
  2470. prev_word=(yyval.str);
  2471. }
  2472. }
  2473. break;
  2474. case 70:
  2475. /* Line 1806 of yacc.c */
  2476. #line 440 "ael.y"
  2477. { (yyval.str) = (yyvsp[(1) - (1)].str);}
  2478. break;
  2479. case 71:
  2480. /* Line 1806 of yacc.c */
  2481. #line 441 "ael.y"
  2482. {
  2483. if (asprintf(&((yyval.str)), "%s%s", (yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].str)) < 0) {
  2484. ast_log(LOG_WARNING, "asprintf() failed\n");
  2485. (yyval.str) = NULL;
  2486. } else {
  2487. free((yyvsp[(1) - (2)].str));
  2488. free((yyvsp[(2) - (2)].str));
  2489. }
  2490. }
  2491. break;
  2492. case 72:
  2493. /* Line 1806 of yacc.c */
  2494. #line 450 "ael.y"
  2495. {
  2496. if (asprintf(&((yyval.str)), "%s:%s", (yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].str)) < 0) {
  2497. ast_log(LOG_WARNING, "asprintf() failed\n");
  2498. (yyval.str) = NULL;
  2499. } else {
  2500. free((yyvsp[(1) - (3)].str));
  2501. free((yyvsp[(3) - (3)].str));
  2502. }
  2503. }
  2504. break;
  2505. case 73:
  2506. /* Line 1806 of yacc.c */
  2507. #line 461 "ael.y"
  2508. {
  2509. (yyval.pval) = npval2(PV_SWITCH, &(yylsp[(1) - (5)]), &(yylsp[(5) - (5)]));
  2510. (yyval.pval)->u1.str = (yyvsp[(2) - (5)].str);
  2511. (yyval.pval)->u2.statements = (yyvsp[(4) - (5)].pval); set_dads((yyval.pval),(yyvsp[(4) - (5)].pval));}
  2512. break;
  2513. case 74:
  2514. /* Line 1806 of yacc.c */
  2515. #line 470 "ael.y"
  2516. {
  2517. (yyval.pval) = npval2(PV_STATEMENTBLOCK, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
  2518. (yyval.pval)->u1.list = (yyvsp[(2) - (3)].pval); set_dads((yyval.pval),(yyvsp[(2) - (3)].pval));}
  2519. break;
  2520. case 75:
  2521. /* Line 1806 of yacc.c */
  2522. #line 473 "ael.y"
  2523. { (yyval.pval) = (yyvsp[(1) - (1)].pval); }
  2524. break;
  2525. case 76:
  2526. /* Line 1806 of yacc.c */
  2527. #line 474 "ael.y"
  2528. { (yyval.pval) = (yyvsp[(1) - (1)].pval); }
  2529. break;
  2530. case 77:
  2531. /* Line 1806 of yacc.c */
  2532. #line 475 "ael.y"
  2533. {
  2534. (yyval.pval) = npval2(PV_GOTO, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
  2535. (yyval.pval)->u1.list = (yyvsp[(2) - (3)].pval);}
  2536. break;
  2537. case 78:
  2538. /* Line 1806 of yacc.c */
  2539. #line 478 "ael.y"
  2540. {
  2541. (yyval.pval) = npval2(PV_GOTO, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
  2542. (yyval.pval)->u1.list = (yyvsp[(2) - (3)].pval);}
  2543. break;
  2544. case 79:
  2545. /* Line 1806 of yacc.c */
  2546. #line 481 "ael.y"
  2547. {
  2548. (yyval.pval) = npval2(PV_LABEL, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)]));
  2549. (yyval.pval)->u1.str = (yyvsp[(1) - (2)].str); }
  2550. break;
  2551. case 80:
  2552. /* Line 1806 of yacc.c */
  2553. #line 484 "ael.y"
  2554. {reset_semicount(parseio->scanner);}
  2555. break;
  2556. case 81:
  2557. /* Line 1806 of yacc.c */
  2558. #line 485 "ael.y"
  2559. {reset_semicount(parseio->scanner);}
  2560. break;
  2561. case 82:
  2562. /* Line 1806 of yacc.c */
  2563. #line 486 "ael.y"
  2564. {reset_parencount(parseio->scanner);}
  2565. break;
  2566. case 83:
  2567. /* Line 1806 of yacc.c */
  2568. #line 486 "ael.y"
  2569. { /* XXX word_list maybe ? */
  2570. (yyval.pval) = npval2(PV_FOR, &(yylsp[(1) - (12)]), &(yylsp[(12) - (12)]));
  2571. (yyval.pval)->u1.for_init = (yyvsp[(4) - (12)].str);
  2572. (yyval.pval)->u2.for_test=(yyvsp[(7) - (12)].str);
  2573. (yyval.pval)->u3.for_inc = (yyvsp[(10) - (12)].str);
  2574. (yyval.pval)->u4.for_statements = (yyvsp[(12) - (12)].pval); set_dads((yyval.pval),(yyvsp[(12) - (12)].pval));}
  2575. break;
  2576. case 84:
  2577. /* Line 1806 of yacc.c */
  2578. #line 492 "ael.y"
  2579. {
  2580. (yyval.pval) = npval2(PV_WHILE, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
  2581. (yyval.pval)->u1.str = (yyvsp[(2) - (3)].str);
  2582. (yyval.pval)->u2.statements = (yyvsp[(3) - (3)].pval); set_dads((yyval.pval),(yyvsp[(3) - (3)].pval));}
  2583. break;
  2584. case 85:
  2585. /* Line 1806 of yacc.c */
  2586. #line 496 "ael.y"
  2587. { (yyval.pval) = (yyvsp[(1) - (1)].pval); }
  2588. break;
  2589. case 86:
  2590. /* Line 1806 of yacc.c */
  2591. #line 497 "ael.y"
  2592. { (yyval.pval) = update_last((yyvsp[(2) - (3)].pval), &(yylsp[(2) - (3)])); }
  2593. break;
  2594. case 87:
  2595. /* Line 1806 of yacc.c */
  2596. #line 498 "ael.y"
  2597. { (yyval.pval) = update_last((yyvsp[(1) - (2)].pval), &(yylsp[(2) - (2)])); }
  2598. break;
  2599. case 88:
  2600. /* Line 1806 of yacc.c */
  2601. #line 499 "ael.y"
  2602. {
  2603. (yyval.pval)= npval2(PV_APPLICATION_CALL, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)]));
  2604. (yyval.pval)->u1.str = (yyvsp[(1) - (2)].str);}
  2605. break;
  2606. case 89:
  2607. /* Line 1806 of yacc.c */
  2608. #line 502 "ael.y"
  2609. {reset_semicount(parseio->scanner);}
  2610. break;
  2611. case 90:
  2612. /* Line 1806 of yacc.c */
  2613. #line 502 "ael.y"
  2614. {
  2615. char *bufx;
  2616. int tot=0;
  2617. pval *pptr;
  2618. (yyval.pval) = npval2(PV_VARDEC, &(yylsp[(1) - (5)]), &(yylsp[(5) - (5)]));
  2619. (yyval.pval)->u2.val=(yyvsp[(4) - (5)].str);
  2620. /* rebuild the original string-- this is not an app call, it's an unwrapped vardec, with a func call on the LHS */
  2621. /* string to big to fit in the buffer? */
  2622. tot+=strlen((yyvsp[(1) - (5)].pval)->u1.str);
  2623. for(pptr=(yyvsp[(1) - (5)].pval)->u2.arglist;pptr;pptr=pptr->next) {
  2624. tot+=strlen(pptr->u1.str);
  2625. tot++; /* for a sep like a comma */
  2626. }
  2627. tot+=4; /* for safety */
  2628. bufx = calloc(1, tot);
  2629. strcpy(bufx,(yyvsp[(1) - (5)].pval)->u1.str);
  2630. strcat(bufx,"(");
  2631. /* XXX need to advance the pointer or the loop is very inefficient */
  2632. for (pptr=(yyvsp[(1) - (5)].pval)->u2.arglist;pptr;pptr=pptr->next) {
  2633. if ( pptr != (yyvsp[(1) - (5)].pval)->u2.arglist )
  2634. strcat(bufx,",");
  2635. strcat(bufx,pptr->u1.str);
  2636. }
  2637. strcat(bufx,")");
  2638. #ifdef AAL_ARGCHECK
  2639. if ( !ael_is_funcname((yyvsp[(1) - (5)].pval)->u1.str) )
  2640. ast_log(LOG_WARNING, "==== File: %s, Line %d, Cols: %d-%d: Function call? The name %s is not in my internal list of function names\n",
  2641. my_file, (yylsp[(1) - (5)]).first_line, (yylsp[(1) - (5)]).first_column, (yylsp[(1) - (5)]).last_column, (yyvsp[(1) - (5)].pval)->u1.str);
  2642. #endif
  2643. (yyval.pval)->u1.str = bufx;
  2644. destroy_pval((yyvsp[(1) - (5)].pval)); /* the app call it is not, get rid of that chain */
  2645. prev_word = 0;
  2646. }
  2647. break;
  2648. case 91:
  2649. /* Line 1806 of yacc.c */
  2650. #line 535 "ael.y"
  2651. { (yyval.pval) = npval2(PV_BREAK, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)])); }
  2652. break;
  2653. case 92:
  2654. /* Line 1806 of yacc.c */
  2655. #line 536 "ael.y"
  2656. { (yyval.pval) = npval2(PV_RETURN, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)])); }
  2657. break;
  2658. case 93:
  2659. /* Line 1806 of yacc.c */
  2660. #line 537 "ael.y"
  2661. { (yyval.pval) = npval2(PV_CONTINUE, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)])); }
  2662. break;
  2663. case 94:
  2664. /* Line 1806 of yacc.c */
  2665. #line 538 "ael.y"
  2666. {
  2667. (yyval.pval) = update_last((yyvsp[(1) - (3)].pval), &(yylsp[(2) - (3)]));
  2668. (yyval.pval)->u2.statements = (yyvsp[(2) - (3)].pval); set_dads((yyval.pval),(yyvsp[(2) - (3)].pval));
  2669. (yyval.pval)->u3.else_statements = (yyvsp[(3) - (3)].pval);set_dads((yyval.pval),(yyvsp[(3) - (3)].pval));}
  2670. break;
  2671. case 95:
  2672. /* Line 1806 of yacc.c */
  2673. #line 542 "ael.y"
  2674. { (yyval.pval)=0; }
  2675. break;
  2676. case 96:
  2677. /* Line 1806 of yacc.c */
  2678. #line 545 "ael.y"
  2679. { (yyval.pval) = (yyvsp[(2) - (2)].pval); }
  2680. break;
  2681. case 97:
  2682. /* Line 1806 of yacc.c */
  2683. #line 546 "ael.y"
  2684. { (yyval.pval) = NULL ; }
  2685. break;
  2686. case 98:
  2687. /* Line 1806 of yacc.c */
  2688. #line 549 "ael.y"
  2689. { (yyval.pval) = nword((yyvsp[(1) - (1)].str), &(yylsp[(1) - (1)])); }
  2690. break;
  2691. case 99:
  2692. /* Line 1806 of yacc.c */
  2693. #line 550 "ael.y"
  2694. {
  2695. (yyval.pval) = nword((yyvsp[(1) - (3)].str), &(yylsp[(1) - (3)]));
  2696. (yyval.pval)->next = nword((yyvsp[(3) - (3)].str), &(yylsp[(3) - (3)])); }
  2697. break;
  2698. case 100:
  2699. /* Line 1806 of yacc.c */
  2700. #line 553 "ael.y"
  2701. {
  2702. (yyval.pval) = nword((yyvsp[(1) - (3)].str), &(yylsp[(1) - (3)]));
  2703. (yyval.pval)->next = nword((yyvsp[(3) - (3)].str), &(yylsp[(3) - (3)])); }
  2704. break;
  2705. case 101:
  2706. /* Line 1806 of yacc.c */
  2707. #line 556 "ael.y"
  2708. {
  2709. (yyval.pval) = nword((yyvsp[(1) - (5)].str), &(yylsp[(1) - (5)]));
  2710. (yyval.pval)->next = nword((yyvsp[(3) - (5)].str), &(yylsp[(3) - (5)]));
  2711. (yyval.pval)->next->next = nword((yyvsp[(5) - (5)].str), &(yylsp[(5) - (5)])); }
  2712. break;
  2713. case 102:
  2714. /* Line 1806 of yacc.c */
  2715. #line 560 "ael.y"
  2716. {
  2717. (yyval.pval) = nword((yyvsp[(1) - (5)].str), &(yylsp[(1) - (5)]));
  2718. (yyval.pval)->next = nword((yyvsp[(3) - (5)].str), &(yylsp[(3) - (5)]));
  2719. (yyval.pval)->next->next = nword((yyvsp[(5) - (5)].str), &(yylsp[(5) - (5)])); }
  2720. break;
  2721. case 103:
  2722. /* Line 1806 of yacc.c */
  2723. #line 564 "ael.y"
  2724. {
  2725. (yyval.pval) = nword(strdup("default"), &(yylsp[(1) - (5)]));
  2726. (yyval.pval)->next = nword((yyvsp[(3) - (5)].str), &(yylsp[(3) - (5)]));
  2727. (yyval.pval)->next->next = nword((yyvsp[(5) - (5)].str), &(yylsp[(5) - (5)])); }
  2728. break;
  2729. case 104:
  2730. /* Line 1806 of yacc.c */
  2731. #line 568 "ael.y"
  2732. {
  2733. (yyval.pval) = nword(strdup("default"), &(yylsp[(1) - (5)]));
  2734. (yyval.pval)->next = nword((yyvsp[(3) - (5)].str), &(yylsp[(3) - (5)]));
  2735. (yyval.pval)->next->next = nword((yyvsp[(5) - (5)].str), &(yylsp[(5) - (5)])); }
  2736. break;
  2737. case 105:
  2738. /* Line 1806 of yacc.c */
  2739. #line 574 "ael.y"
  2740. { (yyval.str) = strdup("1"); }
  2741. break;
  2742. case 106:
  2743. /* Line 1806 of yacc.c */
  2744. #line 575 "ael.y"
  2745. { (yyval.str) = (yyvsp[(2) - (2)].str); }
  2746. break;
  2747. case 107:
  2748. /* Line 1806 of yacc.c */
  2749. #line 579 "ael.y"
  2750. { /* ext[, pri] default 1 */
  2751. (yyval.pval) = nword((yyvsp[(1) - (2)].str), &(yylsp[(1) - (2)]));
  2752. (yyval.pval)->next = nword((yyvsp[(2) - (2)].str), &(yylsp[(2) - (2)])); }
  2753. break;
  2754. case 108:
  2755. /* Line 1806 of yacc.c */
  2756. #line 582 "ael.y"
  2757. { /* context, ext, pri */
  2758. (yyval.pval) = nword((yyvsp[(4) - (4)].str), &(yylsp[(4) - (4)]));
  2759. (yyval.pval)->next = nword((yyvsp[(1) - (4)].str), &(yylsp[(1) - (4)]));
  2760. (yyval.pval)->next->next = nword((yyvsp[(2) - (4)].str), &(yylsp[(2) - (4)])); }
  2761. break;
  2762. case 109:
  2763. /* Line 1806 of yacc.c */
  2764. #line 588 "ael.y"
  2765. {reset_argcount(parseio->scanner);}
  2766. break;
  2767. case 110:
  2768. /* Line 1806 of yacc.c */
  2769. #line 588 "ael.y"
  2770. {
  2771. /* XXX original code had @2 but i think we need @5 */
  2772. (yyval.pval) = npval2(PV_MACRO_CALL, &(yylsp[(1) - (5)]), &(yylsp[(5) - (5)]));
  2773. (yyval.pval)->u1.str = (yyvsp[(1) - (5)].str);
  2774. (yyval.pval)->u2.arglist = (yyvsp[(4) - (5)].pval);}
  2775. break;
  2776. case 111:
  2777. /* Line 1806 of yacc.c */
  2778. #line 593 "ael.y"
  2779. {
  2780. (yyval.pval)= npval2(PV_MACRO_CALL, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
  2781. (yyval.pval)->u1.str = (yyvsp[(1) - (3)].str); }
  2782. break;
  2783. case 112:
  2784. /* Line 1806 of yacc.c */
  2785. #line 601 "ael.y"
  2786. {reset_argcount(parseio->scanner);}
  2787. break;
  2788. case 113:
  2789. /* Line 1806 of yacc.c */
  2790. #line 601 "ael.y"
  2791. {
  2792. if (strcasecmp((yyvsp[(1) - (3)].str),"goto") == 0) {
  2793. (yyval.pval) = npval2(PV_GOTO, &(yylsp[(1) - (3)]), &(yylsp[(2) - (3)]));
  2794. free((yyvsp[(1) - (3)].str)); /* won't be using this */
  2795. ast_log(LOG_WARNING, "==== File: %s, Line %d, Cols: %d-%d: Suggestion: Use the goto statement instead of the Goto() application call in AEL.\n", my_file, (yylsp[(1) - (3)]).first_line, (yylsp[(1) - (3)]).first_column, (yylsp[(1) - (3)]).last_column );
  2796. } else {
  2797. (yyval.pval)= npval2(PV_APPLICATION_CALL, &(yylsp[(1) - (3)]), &(yylsp[(2) - (3)]));
  2798. (yyval.pval)->u1.str = (yyvsp[(1) - (3)].str);
  2799. } }
  2800. break;
  2801. case 114:
  2802. /* Line 1806 of yacc.c */
  2803. #line 612 "ael.y"
  2804. {
  2805. (yyval.pval) = update_last((yyvsp[(1) - (3)].pval), &(yylsp[(3) - (3)]));
  2806. if( (yyval.pval)->type == PV_GOTO )
  2807. (yyval.pval)->u1.list = (yyvsp[(2) - (3)].pval);
  2808. else
  2809. (yyval.pval)->u2.arglist = (yyvsp[(2) - (3)].pval);
  2810. }
  2811. break;
  2812. case 115:
  2813. /* Line 1806 of yacc.c */
  2814. #line 619 "ael.y"
  2815. { (yyval.pval) = update_last((yyvsp[(1) - (2)].pval), &(yylsp[(2) - (2)])); }
  2816. break;
  2817. case 116:
  2818. /* Line 1806 of yacc.c */
  2819. #line 622 "ael.y"
  2820. { (yyval.str) = (yyvsp[(1) - (1)].str) ;}
  2821. break;
  2822. case 117:
  2823. /* Line 1806 of yacc.c */
  2824. #line 623 "ael.y"
  2825. { (yyval.str) = strdup(""); }
  2826. break;
  2827. case 118:
  2828. /* Line 1806 of yacc.c */
  2829. #line 626 "ael.y"
  2830. { (yyval.pval) = nword((yyvsp[(1) - (1)].str), &(yylsp[(1) - (1)])); }
  2831. break;
  2832. case 119:
  2833. /* Line 1806 of yacc.c */
  2834. #line 627 "ael.y"
  2835. {
  2836. (yyval.pval)= npval(PV_WORD,0/*@1.first_line*/,0/*@1.last_line*/,0/* @1.first_column*/, 0/*@1.last_column*/);
  2837. (yyval.pval)->u1.str = strdup(""); }
  2838. break;
  2839. case 120:
  2840. /* Line 1806 of yacc.c */
  2841. #line 630 "ael.y"
  2842. { (yyval.pval) = linku1((yyvsp[(1) - (3)].pval), nword((yyvsp[(3) - (3)].str), &(yylsp[(3) - (3)]))); }
  2843. break;
  2844. case 121:
  2845. /* Line 1806 of yacc.c */
  2846. #line 633 "ael.y"
  2847. { (yyval.pval) = NULL; }
  2848. break;
  2849. case 122:
  2850. /* Line 1806 of yacc.c */
  2851. #line 634 "ael.y"
  2852. { (yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); }
  2853. break;
  2854. case 123:
  2855. /* Line 1806 of yacc.c */
  2856. #line 637 "ael.y"
  2857. {
  2858. (yyval.pval) = npval2(PV_CASE, &(yylsp[(1) - (4)]), &(yylsp[(3) - (4)])); /* XXX 3 or 4 ? */
  2859. (yyval.pval)->u1.str = (yyvsp[(2) - (4)].str);
  2860. (yyval.pval)->u2.statements = (yyvsp[(4) - (4)].pval); set_dads((yyval.pval),(yyvsp[(4) - (4)].pval));}
  2861. break;
  2862. case 124:
  2863. /* Line 1806 of yacc.c */
  2864. #line 641 "ael.y"
  2865. {
  2866. (yyval.pval) = npval2(PV_DEFAULT, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
  2867. (yyval.pval)->u1.str = NULL;
  2868. (yyval.pval)->u2.statements = (yyvsp[(3) - (3)].pval);set_dads((yyval.pval),(yyvsp[(3) - (3)].pval));}
  2869. break;
  2870. case 125:
  2871. /* Line 1806 of yacc.c */
  2872. #line 645 "ael.y"
  2873. {
  2874. (yyval.pval) = npval2(PV_PATTERN, &(yylsp[(1) - (4)]), &(yylsp[(4) - (4)])); /* XXX@3 or @4 ? */
  2875. (yyval.pval)->u1.str = (yyvsp[(2) - (4)].str);
  2876. (yyval.pval)->u2.statements = (yyvsp[(4) - (4)].pval);set_dads((yyval.pval),(yyvsp[(4) - (4)].pval));}
  2877. break;
  2878. case 126:
  2879. /* Line 1806 of yacc.c */
  2880. #line 651 "ael.y"
  2881. { (yyval.pval) = NULL; }
  2882. break;
  2883. case 127:
  2884. /* Line 1806 of yacc.c */
  2885. #line 652 "ael.y"
  2886. { (yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); }
  2887. break;
  2888. case 128:
  2889. /* Line 1806 of yacc.c */
  2890. #line 655 "ael.y"
  2891. {(yyval.pval)=(yyvsp[(1) - (1)].pval);}
  2892. break;
  2893. case 129:
  2894. /* Line 1806 of yacc.c */
  2895. #line 656 "ael.y"
  2896. { (yyval.pval)=(yyvsp[(1) - (1)].pval);}
  2897. break;
  2898. case 130:
  2899. /* Line 1806 of yacc.c */
  2900. #line 657 "ael.y"
  2901. {
  2902. (yyval.pval) = npval2(PV_CATCH, &(yylsp[(1) - (5)]), &(yylsp[(5) - (5)]));
  2903. (yyval.pval)->u1.str = (yyvsp[(2) - (5)].str);
  2904. (yyval.pval)->u2.statements = (yyvsp[(4) - (5)].pval); set_dads((yyval.pval),(yyvsp[(4) - (5)].pval));}
  2905. break;
  2906. case 131:
  2907. /* Line 1806 of yacc.c */
  2908. #line 663 "ael.y"
  2909. {
  2910. (yyval.pval) = npval2(PV_SWITCHES, &(yylsp[(1) - (4)]), &(yylsp[(2) - (4)]));
  2911. (yyval.pval)->u1.list = (yyvsp[(3) - (4)].pval); set_dads((yyval.pval),(yyvsp[(3) - (4)].pval));}
  2912. break;
  2913. case 132:
  2914. /* Line 1806 of yacc.c */
  2915. #line 668 "ael.y"
  2916. {
  2917. (yyval.pval) = npval2(PV_ESWITCHES, &(yylsp[(1) - (4)]), &(yylsp[(2) - (4)]));
  2918. (yyval.pval)->u1.list = (yyvsp[(3) - (4)].pval); set_dads((yyval.pval),(yyvsp[(3) - (4)].pval));}
  2919. break;
  2920. case 133:
  2921. /* Line 1806 of yacc.c */
  2922. #line 673 "ael.y"
  2923. { (yyval.pval) = NULL; }
  2924. break;
  2925. case 134:
  2926. /* Line 1806 of yacc.c */
  2927. #line 674 "ael.y"
  2928. { (yyval.pval) = linku1((yyvsp[(1) - (3)].pval),nword((yyvsp[(2) - (3)].str), &(yylsp[(2) - (3)]))); }
  2929. break;
  2930. case 135:
  2931. /* Line 1806 of yacc.c */
  2932. #line 675 "ael.y"
  2933. {
  2934. char *x;
  2935. if (asprintf(&x,"%s@%s", (yyvsp[(2) - (5)].str), (yyvsp[(4) - (5)].str)) < 0) {
  2936. ast_log(LOG_WARNING, "asprintf() failed\n");
  2937. (yyval.pval) = NULL;
  2938. } else {
  2939. free((yyvsp[(2) - (5)].str));
  2940. free((yyvsp[(4) - (5)].str));
  2941. (yyval.pval) = linku1((yyvsp[(1) - (5)].pval),nword(x, &(yylsp[(2) - (5)])));
  2942. }
  2943. }
  2944. break;
  2945. case 136:
  2946. /* Line 1806 of yacc.c */
  2947. #line 686 "ael.y"
  2948. {(yyval.pval)=(yyvsp[(2) - (2)].pval);}
  2949. break;
  2950. case 137:
  2951. /* Line 1806 of yacc.c */
  2952. #line 689 "ael.y"
  2953. { (yyval.pval) = nword((yyvsp[(1) - (1)].str), &(yylsp[(1) - (1)])); }
  2954. break;
  2955. case 138:
  2956. /* Line 1806 of yacc.c */
  2957. #line 690 "ael.y"
  2958. {
  2959. (yyval.pval) = nword((yyvsp[(1) - (3)].str), &(yylsp[(1) - (3)]));
  2960. (yyval.pval)->u2.arglist = (yyvsp[(3) - (3)].pval);
  2961. prev_word=0; /* XXX sure ? */ }
  2962. break;
  2963. case 139:
  2964. /* Line 1806 of yacc.c */
  2965. #line 697 "ael.y"
  2966. { (yyval.pval) = (yyvsp[(1) - (2)].pval); }
  2967. break;
  2968. case 140:
  2969. /* Line 1806 of yacc.c */
  2970. #line 698 "ael.y"
  2971. { (yyval.pval) = linku1((yyvsp[(1) - (3)].pval), (yyvsp[(2) - (3)].pval)); }
  2972. break;
  2973. case 141:
  2974. /* Line 1806 of yacc.c */
  2975. #line 699 "ael.y"
  2976. {(yyval.pval)=(yyvsp[(1) - (2)].pval);}
  2977. break;
  2978. case 142:
  2979. /* Line 1806 of yacc.c */
  2980. #line 702 "ael.y"
  2981. {
  2982. (yyval.pval) = npval2(PV_INCLUDES, &(yylsp[(1) - (4)]), &(yylsp[(4) - (4)]));
  2983. (yyval.pval)->u1.list = (yyvsp[(3) - (4)].pval);set_dads((yyval.pval),(yyvsp[(3) - (4)].pval));}
  2984. break;
  2985. case 143:
  2986. /* Line 1806 of yacc.c */
  2987. #line 705 "ael.y"
  2988. {
  2989. (yyval.pval) = npval2(PV_INCLUDES, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));}
  2990. break;
  2991. /* Line 1806 of yacc.c */
  2992. #line 3590 "ael.tab.c"
  2993. default: break;
  2994. }
  2995. /* User semantic actions sometimes alter yychar, and that requires
  2996. that yytoken be updated with the new translation. We take the
  2997. approach of translating immediately before every use of yytoken.
  2998. One alternative is translating here after every semantic action,
  2999. but that translation would be missed if the semantic action invokes
  3000. YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
  3001. if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
  3002. incorrect destructor might then be invoked immediately. In the
  3003. case of YYERROR or YYBACKUP, subsequent parser actions might lead
  3004. to an incorrect destructor call or verbose syntax error message
  3005. before the lookahead is translated. */
  3006. YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
  3007. YYPOPSTACK (yylen);
  3008. yylen = 0;
  3009. YY_STACK_PRINT (yyss, yyssp);
  3010. *++yyvsp = yyval;
  3011. *++yylsp = yyloc;
  3012. /* Now `shift' the result of the reduction. Determine what state
  3013. that goes to, based on the state we popped back to and the rule
  3014. number reduced by. */
  3015. yyn = yyr1[yyn];
  3016. yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
  3017. if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
  3018. yystate = yytable[yystate];
  3019. else
  3020. yystate = yydefgoto[yyn - YYNTOKENS];
  3021. goto yynewstate;
  3022. /*------------------------------------.
  3023. | yyerrlab -- here on detecting error |
  3024. `------------------------------------*/
  3025. yyerrlab:
  3026. /* Make sure we have latest lookahead translation. See comments at
  3027. user semantic actions for why this is necessary. */
  3028. yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
  3029. /* If not already recovering from an error, report this error. */
  3030. if (!yyerrstatus)
  3031. {
  3032. ++yynerrs;
  3033. #if ! YYERROR_VERBOSE
  3034. yyerror (&yylloc, parseio, YY_("syntax error"));
  3035. #else
  3036. # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
  3037. yyssp, yytoken)
  3038. {
  3039. char const *yymsgp = YY_("syntax error");
  3040. int yysyntax_error_status;
  3041. yysyntax_error_status = YYSYNTAX_ERROR;
  3042. if (yysyntax_error_status == 0)
  3043. yymsgp = yymsg;
  3044. else if (yysyntax_error_status == 1)
  3045. {
  3046. if (yymsg != yymsgbuf)
  3047. YYSTACK_FREE (yymsg);
  3048. yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
  3049. if (!yymsg)
  3050. {
  3051. yymsg = yymsgbuf;
  3052. yymsg_alloc = sizeof yymsgbuf;
  3053. yysyntax_error_status = 2;
  3054. }
  3055. else
  3056. {
  3057. yysyntax_error_status = YYSYNTAX_ERROR;
  3058. yymsgp = yymsg;
  3059. }
  3060. }
  3061. yyerror (&yylloc, parseio, yymsgp);
  3062. if (yysyntax_error_status == 2)
  3063. goto yyexhaustedlab;
  3064. }
  3065. # undef YYSYNTAX_ERROR
  3066. #endif
  3067. }
  3068. yyerror_range[1] = yylloc;
  3069. if (yyerrstatus == 3)
  3070. {
  3071. /* If just tried and failed to reuse lookahead token after an
  3072. error, discard it. */
  3073. if (yychar <= YYEOF)
  3074. {
  3075. /* Return failure if at end of input. */
  3076. if (yychar == YYEOF)
  3077. YYABORT;
  3078. }
  3079. else
  3080. {
  3081. yydestruct ("Error: discarding",
  3082. yytoken, &yylval, &yylloc, parseio);
  3083. yychar = YYEMPTY;
  3084. }
  3085. }
  3086. /* Else will try to reuse lookahead token after shifting the error
  3087. token. */
  3088. goto yyerrlab1;
  3089. /*---------------------------------------------------.
  3090. | yyerrorlab -- error raised explicitly by YYERROR. |
  3091. `---------------------------------------------------*/
  3092. yyerrorlab:
  3093. /* Pacify compilers like GCC when the user code never invokes
  3094. YYERROR and the label yyerrorlab therefore never appears in user
  3095. code. */
  3096. if (/*CONSTCOND*/ 0)
  3097. goto yyerrorlab;
  3098. yyerror_range[1] = yylsp[1-yylen];
  3099. /* Do not reclaim the symbols of the rule which action triggered
  3100. this YYERROR. */
  3101. YYPOPSTACK (yylen);
  3102. yylen = 0;
  3103. YY_STACK_PRINT (yyss, yyssp);
  3104. yystate = *yyssp;
  3105. goto yyerrlab1;
  3106. /*-------------------------------------------------------------.
  3107. | yyerrlab1 -- common code for both syntax error and YYERROR. |
  3108. `-------------------------------------------------------------*/
  3109. yyerrlab1:
  3110. yyerrstatus = 3; /* Each real token shifted decrements this. */
  3111. for (;;)
  3112. {
  3113. yyn = yypact[yystate];
  3114. if (!yypact_value_is_default (yyn))
  3115. {
  3116. yyn += YYTERROR;
  3117. if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
  3118. {
  3119. yyn = yytable[yyn];
  3120. if (0 < yyn)
  3121. break;
  3122. }
  3123. }
  3124. /* Pop the current state because it cannot handle the error token. */
  3125. if (yyssp == yyss)
  3126. YYABORT;
  3127. yyerror_range[1] = *yylsp;
  3128. yydestruct ("Error: popping",
  3129. yystos[yystate], yyvsp, yylsp, parseio);
  3130. YYPOPSTACK (1);
  3131. yystate = *yyssp;
  3132. YY_STACK_PRINT (yyss, yyssp);
  3133. }
  3134. *++yyvsp = yylval;
  3135. yyerror_range[2] = yylloc;
  3136. /* Using YYLLOC is tempting, but would change the location of
  3137. the lookahead. YYLOC is available though. */
  3138. YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
  3139. *++yylsp = yyloc;
  3140. /* Shift the error token. */
  3141. YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
  3142. yystate = yyn;
  3143. goto yynewstate;
  3144. /*-------------------------------------.
  3145. | yyacceptlab -- YYACCEPT comes here. |
  3146. `-------------------------------------*/
  3147. yyacceptlab:
  3148. yyresult = 0;
  3149. goto yyreturn;
  3150. /*-----------------------------------.
  3151. | yyabortlab -- YYABORT comes here. |
  3152. `-----------------------------------*/
  3153. yyabortlab:
  3154. yyresult = 1;
  3155. goto yyreturn;
  3156. #if !defined(yyoverflow) || YYERROR_VERBOSE
  3157. /*-------------------------------------------------.
  3158. | yyexhaustedlab -- memory exhaustion comes here. |
  3159. `-------------------------------------------------*/
  3160. yyexhaustedlab:
  3161. yyerror (&yylloc, parseio, YY_("memory exhausted"));
  3162. yyresult = 2;
  3163. /* Fall through. */
  3164. #endif
  3165. yyreturn:
  3166. if (yychar != YYEMPTY)
  3167. {
  3168. /* Make sure we have latest lookahead translation. See comments at
  3169. user semantic actions for why this is necessary. */
  3170. yytoken = YYTRANSLATE (yychar);
  3171. yydestruct ("Cleanup: discarding lookahead",
  3172. yytoken, &yylval, &yylloc, parseio);
  3173. }
  3174. /* Do not reclaim the symbols of the rule which action triggered
  3175. this YYABORT or YYACCEPT. */
  3176. YYPOPSTACK (yylen);
  3177. YY_STACK_PRINT (yyss, yyssp);
  3178. while (yyssp != yyss)
  3179. {
  3180. yydestruct ("Cleanup: popping",
  3181. yystos[*yyssp], yyvsp, yylsp, parseio);
  3182. YYPOPSTACK (1);
  3183. }
  3184. #ifndef yyoverflow
  3185. if (yyss != yyssa)
  3186. YYSTACK_FREE (yyss);
  3187. #endif
  3188. #if YYERROR_VERBOSE
  3189. if (yymsg != yymsgbuf)
  3190. YYSTACK_FREE (yymsg);
  3191. #endif
  3192. /* Make sure YYID is used. */
  3193. return YYID (yyresult);
  3194. }
  3195. /* Line 2067 of yacc.c */
  3196. #line 710 "ael.y"
  3197. static char *token_equivs1[] =
  3198. {
  3199. "AMPER",
  3200. "AT",
  3201. "BAR",
  3202. "COLON",
  3203. "COMMA",
  3204. "EQ",
  3205. "EXTENMARK",
  3206. "KW_BREAK",
  3207. "KW_CASE",
  3208. "KW_CATCH",
  3209. "KW_CONTEXT",
  3210. "KW_CONTINUE",
  3211. "KW_DEFAULT",
  3212. "KW_ELSE",
  3213. "KW_ESWITCHES",
  3214. "KW_FOR",
  3215. "KW_GLOBALS",
  3216. "KW_GOTO",
  3217. "KW_HINT",
  3218. "KW_IFTIME",
  3219. "KW_IF",
  3220. "KW_IGNOREPAT",
  3221. "KW_INCLUDES"
  3222. "KW_JUMP",
  3223. "KW_MACRO",
  3224. "KW_PATTERN",
  3225. "KW_REGEXTEN",
  3226. "KW_RETURN",
  3227. "KW_SWITCHES",
  3228. "KW_SWITCH",
  3229. "KW_WHILE",
  3230. "LC",
  3231. "LP",
  3232. "RC",
  3233. "RP",
  3234. "SEMI",
  3235. };
  3236. static char *token_equivs2[] =
  3237. {
  3238. "&",
  3239. "@",
  3240. "|",
  3241. ":",
  3242. ",",
  3243. "=",
  3244. "=>",
  3245. "break",
  3246. "case",
  3247. "catch",
  3248. "context",
  3249. "continue",
  3250. "default",
  3251. "else",
  3252. "eswitches",
  3253. "for",
  3254. "globals",
  3255. "goto",
  3256. "hint",
  3257. "ifTime",
  3258. "if",
  3259. "ignorepat",
  3260. "includes"
  3261. "jump",
  3262. "macro",
  3263. "pattern",
  3264. "regexten",
  3265. "return",
  3266. "switches",
  3267. "switch",
  3268. "while",
  3269. "{",
  3270. "(",
  3271. "}",
  3272. ")",
  3273. ";",
  3274. };
  3275. static char *ael_token_subst(const char *mess)
  3276. {
  3277. /* calc a length, malloc, fill, and return; yyerror had better free it! */
  3278. int len=0,i;
  3279. const char *p;
  3280. char *res, *s,*t;
  3281. int token_equivs_entries = sizeof(token_equivs1)/sizeof(char*);
  3282. for (p=mess; *p; p++) {
  3283. for (i=0; i<token_equivs_entries; i++) {
  3284. if ( strncmp(p,token_equivs1[i],strlen(token_equivs1[i])) == 0 )
  3285. {
  3286. len+=strlen(token_equivs2[i])+2;
  3287. p += strlen(token_equivs1[i])-1;
  3288. break;
  3289. }
  3290. }
  3291. len++;
  3292. }
  3293. res = calloc(1, len+1);
  3294. res[0] = 0;
  3295. s = res;
  3296. for (p=mess; *p;) {
  3297. int found = 0;
  3298. for (i=0; i<token_equivs_entries; i++) {
  3299. if ( strncmp(p,token_equivs1[i],strlen(token_equivs1[i])) == 0 ) {
  3300. *s++ = '\'';
  3301. for (t=token_equivs2[i]; *t;) {
  3302. *s++ = *t++;
  3303. }
  3304. *s++ = '\'';
  3305. p += strlen(token_equivs1[i]);
  3306. found = 1;
  3307. break;
  3308. }
  3309. }
  3310. if( !found )
  3311. *s++ = *p++;
  3312. }
  3313. *s++ = 0;
  3314. return res;
  3315. }
  3316. void yyerror(YYLTYPE *locp, struct parse_io *parseio, char const *s)
  3317. {
  3318. char *s2 = ael_token_subst((char *)s);
  3319. if (locp->first_line == locp->last_line) {
  3320. ast_log(LOG_ERROR, "==== File: %s, Line %d, Cols: %d-%d: Error: %s\n", my_file, locp->first_line, locp->first_column, locp->last_column, s2);
  3321. } else {
  3322. ast_log(LOG_ERROR, "==== File: %s, Line %d Col %d to Line %d Col %d: Error: %s\n", my_file, locp->first_line, locp->first_column, locp->last_line, locp->last_column, s2);
  3323. }
  3324. free(s2);
  3325. parseio->syntax_error_count++;
  3326. }
  3327. struct pval *npval(pvaltype type, int first_line, int last_line,
  3328. int first_column, int last_column)
  3329. {
  3330. pval *z = calloc(1, sizeof(struct pval));
  3331. z->type = type;
  3332. z->startline = first_line;
  3333. z->endline = last_line;
  3334. z->startcol = first_column;
  3335. z->endcol = last_column;
  3336. z->filename = strdup(S_OR(my_file, "<none>"));
  3337. return z;
  3338. }
  3339. static struct pval *npval2(pvaltype type, YYLTYPE *first, YYLTYPE *last)
  3340. {
  3341. return npval(type, first->first_line, last->last_line,
  3342. first->first_column, last->last_column);
  3343. }
  3344. static struct pval *update_last(pval *obj, YYLTYPE *last)
  3345. {
  3346. obj->endline = last->last_line;
  3347. obj->endcol = last->last_column;
  3348. return obj;
  3349. }
  3350. /* frontend for npval to create a PV_WORD string from the given token */
  3351. static pval *nword(char *string, YYLTYPE *pos)
  3352. {
  3353. pval *p = npval2(PV_WORD, pos, pos);
  3354. if (p)
  3355. p->u1.str = string;
  3356. return p;
  3357. }
  3358. /* this routine adds a dad ptr to each element in the list */
  3359. static void set_dads(struct pval *dad, struct pval *child_list)
  3360. {
  3361. struct pval *t;
  3362. for(t=child_list;t;t=t->next) /* simple stuff */
  3363. t->dad = dad;
  3364. }