ael.tab.c 110 KB

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