ematch_grammar.c 80 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846
  1. #line 2 "route/cls/ematch_grammar.c"
  2. #line 4 "route/cls/ematch_grammar.c"
  3. #define YY_INT_ALIGNED short int
  4. /* A lexical scanner generated by flex */
  5. #define FLEX_SCANNER
  6. #define YY_FLEX_MAJOR_VERSION 2
  7. #define YY_FLEX_MINOR_VERSION 6
  8. #define YY_FLEX_SUBMINOR_VERSION 4
  9. #if YY_FLEX_SUBMINOR_VERSION > 0
  10. #define FLEX_BETA
  11. #endif
  12. #ifdef yy_create_buffer
  13. #define ematch__create_buffer_ALREADY_DEFINED
  14. #else
  15. #define yy_create_buffer ematch__create_buffer
  16. #endif
  17. #ifdef yy_delete_buffer
  18. #define ematch__delete_buffer_ALREADY_DEFINED
  19. #else
  20. #define yy_delete_buffer ematch__delete_buffer
  21. #endif
  22. #ifdef yy_scan_buffer
  23. #define ematch__scan_buffer_ALREADY_DEFINED
  24. #else
  25. #define yy_scan_buffer ematch__scan_buffer
  26. #endif
  27. #ifdef yy_scan_string
  28. #define ematch__scan_string_ALREADY_DEFINED
  29. #else
  30. #define yy_scan_string ematch__scan_string
  31. #endif
  32. #ifdef yy_scan_bytes
  33. #define ematch__scan_bytes_ALREADY_DEFINED
  34. #else
  35. #define yy_scan_bytes ematch__scan_bytes
  36. #endif
  37. #ifdef yy_init_buffer
  38. #define ematch__init_buffer_ALREADY_DEFINED
  39. #else
  40. #define yy_init_buffer ematch__init_buffer
  41. #endif
  42. #ifdef yy_flush_buffer
  43. #define ematch__flush_buffer_ALREADY_DEFINED
  44. #else
  45. #define yy_flush_buffer ematch__flush_buffer
  46. #endif
  47. #ifdef yy_load_buffer_state
  48. #define ematch__load_buffer_state_ALREADY_DEFINED
  49. #else
  50. #define yy_load_buffer_state ematch__load_buffer_state
  51. #endif
  52. #ifdef yy_switch_to_buffer
  53. #define ematch__switch_to_buffer_ALREADY_DEFINED
  54. #else
  55. #define yy_switch_to_buffer ematch__switch_to_buffer
  56. #endif
  57. #ifdef yypush_buffer_state
  58. #define ematch_push_buffer_state_ALREADY_DEFINED
  59. #else
  60. #define yypush_buffer_state ematch_push_buffer_state
  61. #endif
  62. #ifdef yypop_buffer_state
  63. #define ematch_pop_buffer_state_ALREADY_DEFINED
  64. #else
  65. #define yypop_buffer_state ematch_pop_buffer_state
  66. #endif
  67. #ifdef yyensure_buffer_stack
  68. #define ematch_ensure_buffer_stack_ALREADY_DEFINED
  69. #else
  70. #define yyensure_buffer_stack ematch_ensure_buffer_stack
  71. #endif
  72. #ifdef yylex
  73. #define ematch_lex_ALREADY_DEFINED
  74. #else
  75. #define yylex ematch_lex
  76. #endif
  77. #ifdef yyrestart
  78. #define ematch_restart_ALREADY_DEFINED
  79. #else
  80. #define yyrestart ematch_restart
  81. #endif
  82. #ifdef yylex_init
  83. #define ematch_lex_init_ALREADY_DEFINED
  84. #else
  85. #define yylex_init ematch_lex_init
  86. #endif
  87. #ifdef yylex_init_extra
  88. #define ematch_lex_init_extra_ALREADY_DEFINED
  89. #else
  90. #define yylex_init_extra ematch_lex_init_extra
  91. #endif
  92. #ifdef yylex_destroy
  93. #define ematch_lex_destroy_ALREADY_DEFINED
  94. #else
  95. #define yylex_destroy ematch_lex_destroy
  96. #endif
  97. #ifdef yyget_debug
  98. #define ematch_get_debug_ALREADY_DEFINED
  99. #else
  100. #define yyget_debug ematch_get_debug
  101. #endif
  102. #ifdef yyset_debug
  103. #define ematch_set_debug_ALREADY_DEFINED
  104. #else
  105. #define yyset_debug ematch_set_debug
  106. #endif
  107. #ifdef yyget_extra
  108. #define ematch_get_extra_ALREADY_DEFINED
  109. #else
  110. #define yyget_extra ematch_get_extra
  111. #endif
  112. #ifdef yyset_extra
  113. #define ematch_set_extra_ALREADY_DEFINED
  114. #else
  115. #define yyset_extra ematch_set_extra
  116. #endif
  117. #ifdef yyget_in
  118. #define ematch_get_in_ALREADY_DEFINED
  119. #else
  120. #define yyget_in ematch_get_in
  121. #endif
  122. #ifdef yyset_in
  123. #define ematch_set_in_ALREADY_DEFINED
  124. #else
  125. #define yyset_in ematch_set_in
  126. #endif
  127. #ifdef yyget_out
  128. #define ematch_get_out_ALREADY_DEFINED
  129. #else
  130. #define yyget_out ematch_get_out
  131. #endif
  132. #ifdef yyset_out
  133. #define ematch_set_out_ALREADY_DEFINED
  134. #else
  135. #define yyset_out ematch_set_out
  136. #endif
  137. #ifdef yyget_leng
  138. #define ematch_get_leng_ALREADY_DEFINED
  139. #else
  140. #define yyget_leng ematch_get_leng
  141. #endif
  142. #ifdef yyget_text
  143. #define ematch_get_text_ALREADY_DEFINED
  144. #else
  145. #define yyget_text ematch_get_text
  146. #endif
  147. #ifdef yyget_lineno
  148. #define ematch_get_lineno_ALREADY_DEFINED
  149. #else
  150. #define yyget_lineno ematch_get_lineno
  151. #endif
  152. #ifdef yyset_lineno
  153. #define ematch_set_lineno_ALREADY_DEFINED
  154. #else
  155. #define yyset_lineno ematch_set_lineno
  156. #endif
  157. #ifdef yyget_column
  158. #define ematch_get_column_ALREADY_DEFINED
  159. #else
  160. #define yyget_column ematch_get_column
  161. #endif
  162. #ifdef yyset_column
  163. #define ematch_set_column_ALREADY_DEFINED
  164. #else
  165. #define yyset_column ematch_set_column
  166. #endif
  167. #ifdef yywrap
  168. #define ematch_wrap_ALREADY_DEFINED
  169. #else
  170. #define yywrap ematch_wrap
  171. #endif
  172. #ifdef yyget_lval
  173. #define ematch_get_lval_ALREADY_DEFINED
  174. #else
  175. #define yyget_lval ematch_get_lval
  176. #endif
  177. #ifdef yyset_lval
  178. #define ematch_set_lval_ALREADY_DEFINED
  179. #else
  180. #define yyset_lval ematch_set_lval
  181. #endif
  182. #ifdef yyalloc
  183. #define ematch_alloc_ALREADY_DEFINED
  184. #else
  185. #define yyalloc ematch_alloc
  186. #endif
  187. #ifdef yyrealloc
  188. #define ematch_realloc_ALREADY_DEFINED
  189. #else
  190. #define yyrealloc ematch_realloc
  191. #endif
  192. #ifdef yyfree
  193. #define ematch_free_ALREADY_DEFINED
  194. #else
  195. #define yyfree ematch_free
  196. #endif
  197. /* First, we deal with platform-specific or compiler-specific issues. */
  198. /* begin standard C headers. */
  199. #include <stdio.h>
  200. #include <string.h>
  201. #include <errno.h>
  202. #include <stdlib.h>
  203. /* end standard C headers. */
  204. /* flex integer type definitions */
  205. #ifndef FLEXINT_H
  206. #define FLEXINT_H
  207. /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
  208. #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
  209. /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
  210. * if you want the limit (max/min) macros for int types.
  211. */
  212. #ifndef __STDC_LIMIT_MACROS
  213. #define __STDC_LIMIT_MACROS 1
  214. #endif
  215. #include <inttypes.h>
  216. typedef int8_t flex_int8_t;
  217. typedef uint8_t flex_uint8_t;
  218. typedef int16_t flex_int16_t;
  219. typedef uint16_t flex_uint16_t;
  220. typedef int32_t flex_int32_t;
  221. typedef uint32_t flex_uint32_t;
  222. #else
  223. typedef signed char flex_int8_t;
  224. typedef short int flex_int16_t;
  225. typedef int flex_int32_t;
  226. typedef unsigned char flex_uint8_t;
  227. typedef unsigned short int flex_uint16_t;
  228. typedef unsigned int flex_uint32_t;
  229. /* Limits of integral types. */
  230. #ifndef INT8_MIN
  231. #define INT8_MIN (-128)
  232. #endif
  233. #ifndef INT16_MIN
  234. #define INT16_MIN (-32767-1)
  235. #endif
  236. #ifndef INT32_MIN
  237. #define INT32_MIN (-2147483647-1)
  238. #endif
  239. #ifndef INT8_MAX
  240. #define INT8_MAX (127)
  241. #endif
  242. #ifndef INT16_MAX
  243. #define INT16_MAX (32767)
  244. #endif
  245. #ifndef INT32_MAX
  246. #define INT32_MAX (2147483647)
  247. #endif
  248. #ifndef UINT8_MAX
  249. #define UINT8_MAX (255U)
  250. #endif
  251. #ifndef UINT16_MAX
  252. #define UINT16_MAX (65535U)
  253. #endif
  254. #ifndef UINT32_MAX
  255. #define UINT32_MAX (4294967295U)
  256. #endif
  257. #ifndef SIZE_MAX
  258. #define SIZE_MAX (~(size_t)0)
  259. #endif
  260. #endif /* ! C99 */
  261. #endif /* ! FLEXINT_H */
  262. /* begin standard C++ headers. */
  263. /* TODO: this is always defined, so inline it */
  264. #define yyconst const
  265. #if defined(__GNUC__) && __GNUC__ >= 3
  266. #define yynoreturn __attribute__((__noreturn__))
  267. #else
  268. #define yynoreturn
  269. #endif
  270. /* Returned upon end-of-file. */
  271. #define YY_NULL 0
  272. /* Promotes a possibly negative, possibly signed char to an
  273. * integer in range [0..255] for use as an array index.
  274. */
  275. #define YY_SC_TO_UI(c) ((YY_CHAR) (c))
  276. /* An opaque pointer. */
  277. #ifndef YY_TYPEDEF_YY_SCANNER_T
  278. #define YY_TYPEDEF_YY_SCANNER_T
  279. typedef void* yyscan_t;
  280. #endif
  281. /* For convenience, these vars (plus the bison vars far below)
  282. are macros in the reentrant scanner. */
  283. #define yyin yyg->yyin_r
  284. #define yyout yyg->yyout_r
  285. #define yyextra yyg->yyextra_r
  286. #define yyleng yyg->yyleng_r
  287. #define yytext yyg->yytext_r
  288. #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
  289. #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
  290. #define yy_flex_debug yyg->yy_flex_debug_r
  291. /* Enter a start condition. This macro really ought to take a parameter,
  292. * but we do it the disgusting crufty way forced on us by the ()-less
  293. * definition of BEGIN.
  294. */
  295. #define BEGIN yyg->yy_start = 1 + 2 *
  296. /* Translate the current start state into a value that can be later handed
  297. * to BEGIN to return to the state. The YYSTATE alias is for lex
  298. * compatibility.
  299. */
  300. #define YY_START ((yyg->yy_start - 1) / 2)
  301. #define YYSTATE YY_START
  302. /* Action number for EOF rule of a given start state. */
  303. #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
  304. /* Special action meaning "start processing a new file". */
  305. #define YY_NEW_FILE yyrestart( yyin , yyscanner )
  306. #define YY_END_OF_BUFFER_CHAR 0
  307. /* Size of default input buffer. */
  308. #ifndef YY_BUF_SIZE
  309. #ifdef __ia64__
  310. /* On IA-64, the buffer size is 16k, not 8k.
  311. * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
  312. * Ditto for the __ia64__ case accordingly.
  313. */
  314. #define YY_BUF_SIZE 32768
  315. #else
  316. #define YY_BUF_SIZE 16384
  317. #endif /* __ia64__ */
  318. #endif
  319. /* The state buf must be large enough to hold one state per character in the main buffer.
  320. */
  321. #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
  322. #ifndef YY_TYPEDEF_YY_BUFFER_STATE
  323. #define YY_TYPEDEF_YY_BUFFER_STATE
  324. typedef struct yy_buffer_state *YY_BUFFER_STATE;
  325. #endif
  326. #ifndef YY_TYPEDEF_YY_SIZE_T
  327. #define YY_TYPEDEF_YY_SIZE_T
  328. typedef size_t yy_size_t;
  329. #endif
  330. #define EOB_ACT_CONTINUE_SCAN 0
  331. #define EOB_ACT_END_OF_FILE 1
  332. #define EOB_ACT_LAST_MATCH 2
  333. #define YY_LESS_LINENO(n)
  334. #define YY_LINENO_REWIND_TO(ptr)
  335. /* Return all but the first "n" matched characters back to the input stream. */
  336. #define yyless(n) \
  337. do \
  338. { \
  339. /* Undo effects of setting up yytext. */ \
  340. int yyless_macro_arg = (n); \
  341. YY_LESS_LINENO(yyless_macro_arg);\
  342. *yy_cp = yyg->yy_hold_char; \
  343. YY_RESTORE_YY_MORE_OFFSET \
  344. yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
  345. YY_DO_BEFORE_ACTION; /* set up yytext again */ \
  346. } \
  347. while ( 0 )
  348. #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
  349. #ifndef YY_STRUCT_YY_BUFFER_STATE
  350. #define YY_STRUCT_YY_BUFFER_STATE
  351. struct yy_buffer_state
  352. {
  353. FILE *yy_input_file;
  354. char *yy_ch_buf; /* input buffer */
  355. char *yy_buf_pos; /* current position in input buffer */
  356. /* Size of input buffer in bytes, not including room for EOB
  357. * characters.
  358. */
  359. int yy_buf_size;
  360. /* Number of characters read into yy_ch_buf, not including EOB
  361. * characters.
  362. */
  363. int yy_n_chars;
  364. /* Whether we "own" the buffer - i.e., we know we created it,
  365. * and can realloc() it to grow it, and should free() it to
  366. * delete it.
  367. */
  368. int yy_is_our_buffer;
  369. /* Whether this is an "interactive" input source; if so, and
  370. * if we're using stdio for input, then we want to use getc()
  371. * instead of fread(), to make sure we stop fetching input after
  372. * each newline.
  373. */
  374. int yy_is_interactive;
  375. /* Whether we're considered to be at the beginning of a line.
  376. * If so, '^' rules will be active on the next match, otherwise
  377. * not.
  378. */
  379. int yy_at_bol;
  380. int yy_bs_lineno; /**< The line count. */
  381. int yy_bs_column; /**< The column count. */
  382. /* Whether to try to fill the input buffer when we reach the
  383. * end of it.
  384. */
  385. int yy_fill_buffer;
  386. int yy_buffer_status;
  387. #define YY_BUFFER_NEW 0
  388. #define YY_BUFFER_NORMAL 1
  389. /* When an EOF's been seen but there's still some text to process
  390. * then we mark the buffer as YY_EOF_PENDING, to indicate that we
  391. * shouldn't try reading from the input source any more. We might
  392. * still have a bunch of tokens to match, though, because of
  393. * possible backing-up.
  394. *
  395. * When we actually see the EOF, we change the status to "new"
  396. * (via yyrestart()), so that the user can continue scanning by
  397. * just pointing yyin at a new input file.
  398. */
  399. #define YY_BUFFER_EOF_PENDING 2
  400. };
  401. #endif /* !YY_STRUCT_YY_BUFFER_STATE */
  402. /* We provide macros for accessing buffer states in case in the
  403. * future we want to put the buffer states in a more general
  404. * "scanner state".
  405. *
  406. * Returns the top of the stack, or NULL.
  407. */
  408. #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
  409. ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
  410. : NULL)
  411. /* Same as previous macro, but useful when we know that the buffer stack is not
  412. * NULL or when we need an lvalue. For internal use only.
  413. */
  414. #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
  415. void yyrestart ( FILE *input_file , yyscan_t yyscanner );
  416. void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
  417. YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner );
  418. void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
  419. void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
  420. void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
  421. void yypop_buffer_state ( yyscan_t yyscanner );
  422. static void yyensure_buffer_stack ( yyscan_t yyscanner );
  423. static void yy_load_buffer_state ( yyscan_t yyscanner );
  424. static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner );
  425. #define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner)
  426. YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner );
  427. YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner );
  428. YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner );
  429. void *yyalloc ( yy_size_t , yyscan_t yyscanner );
  430. void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner );
  431. void yyfree ( void * , yyscan_t yyscanner );
  432. #define yy_new_buffer yy_create_buffer
  433. #define yy_set_interactive(is_interactive) \
  434. { \
  435. if ( ! YY_CURRENT_BUFFER ){ \
  436. yyensure_buffer_stack (yyscanner); \
  437. YY_CURRENT_BUFFER_LVALUE = \
  438. yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
  439. } \
  440. YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
  441. }
  442. #define yy_set_bol(at_bol) \
  443. { \
  444. if ( ! YY_CURRENT_BUFFER ){\
  445. yyensure_buffer_stack (yyscanner); \
  446. YY_CURRENT_BUFFER_LVALUE = \
  447. yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
  448. } \
  449. YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
  450. }
  451. #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
  452. #define ematch_wrap(yyscanner) (/*CONSTCOND*/1)
  453. #define YY_SKIP_YYWRAP
  454. typedef flex_uint8_t YY_CHAR;
  455. typedef int yy_state_type;
  456. #define yytext_ptr yytext_r
  457. static yy_state_type yy_get_previous_state ( yyscan_t yyscanner );
  458. static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner);
  459. static int yy_get_next_buffer ( yyscan_t yyscanner );
  460. static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner );
  461. /* Done after the current pattern has been matched and before the
  462. * corresponding action - sets up yytext.
  463. */
  464. #define YY_DO_BEFORE_ACTION \
  465. yyg->yytext_ptr = yy_bp; \
  466. yyleng = (int) (yy_cp - yy_bp); \
  467. yyg->yy_hold_char = *yy_cp; \
  468. *yy_cp = '\0'; \
  469. yyg->yy_c_buf_p = yy_cp;
  470. #define YY_NUM_RULES 91
  471. #define YY_END_OF_BUFFER 92
  472. /* This struct is not used in this scanner,
  473. but its presence is necessary. */
  474. struct yy_trans_info
  475. {
  476. flex_int32_t yy_verify;
  477. flex_int32_t yy_nxt;
  478. };
  479. static const flex_int16_t yy_accept[393] =
  480. { 0,
  481. 0, 0, 0, 0, 92, 90, 1, 18, 2, 26,
  482. 23, 24, 30, 5, 5, 12, 8, 10, 90, 90,
  483. 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
  484. 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
  485. 90, 91, 3, 91, 4, 90, 1, 14, 5, 90,
  486. 28, 90, 29, 90, 90, 90, 40, 90, 90, 90,
  487. 90, 90, 15, 90, 90, 90, 90, 32, 90, 90,
  488. 90, 33, 90, 90, 7, 9, 90, 11, 90, 90,
  489. 90, 90, 90, 90, 90, 90, 90, 16, 3, 6,
  490. 13, 19, 37, 90, 39, 90, 90, 90, 38, 17,
  491. 90, 90, 42, 90, 90, 34, 35, 90, 47, 90,
  492. 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
  493. 90, 90, 31, 36, 25, 22, 90, 90, 21, 90,
  494. 90, 90, 90, 90, 54, 90, 90, 48, 90, 90,
  495. 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
  496. 90, 90, 90, 90, 90, 90, 86, 90, 27, 90,
  497. 90, 90, 90, 90, 90, 90, 49, 90, 90, 57,
  498. 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
  499. 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
  500. 90, 90, 90, 90, 90, 90, 90, 90, 53, 51,
  501. 90, 43, 90, 87, 90, 90, 90, 90, 90, 90,
  502. 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
  503. 90, 90, 90, 90, 90, 90, 90, 90, 20, 90,
  504. 52, 88, 90, 50, 90, 90, 90, 90, 90, 90,
  505. 90, 76, 90, 90, 80, 90, 90, 90, 90, 90,
  506. 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
  507. 66, 90, 90, 55, 90, 90, 90, 90, 90, 90,
  508. 90, 90, 90, 90, 90, 65, 90, 90, 90, 90,
  509. 90, 60, 90, 90, 90, 90, 90, 90, 90, 59,
  510. 90, 90, 41, 44, 45, 46, 56, 90, 74, 90,
  511. 90, 58, 90, 90, 90, 90, 62, 90, 90, 61,
  512. 90, 90, 90, 90, 90, 63, 90, 90, 90, 90,
  513. 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
  514. 90, 90, 90, 90, 90, 90, 90, 90, 90, 89,
  515. 72, 90, 90, 90, 70, 81, 82, 90, 90, 90,
  516. 64, 71, 83, 90, 90, 90, 90, 90, 90, 90,
  517. 90, 90, 90, 90, 90, 90, 90, 90, 77, 90,
  518. 67, 75, 90, 68, 90, 90, 78, 90, 90, 84,
  519. 69, 90, 90, 90, 90, 90, 90, 85, 73, 90,
  520. 79, 0
  521. } ;
  522. static const YY_CHAR yy_ec[256] =
  523. { 0,
  524. 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
  525. 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
  526. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  527. 1, 2, 4, 5, 1, 1, 1, 6, 1, 7,
  528. 8, 1, 9, 1, 1, 1, 1, 10, 11, 12,
  529. 13, 14, 14, 15, 14, 16, 14, 1, 1, 17,
  530. 18, 19, 1, 1, 20, 21, 22, 23, 24, 25,
  531. 1, 26, 27, 1, 28, 29, 30, 31, 32, 33,
  532. 1, 34, 35, 36, 37, 1, 1, 38, 1, 1,
  533. 1, 39, 1, 1, 40, 1, 41, 42, 43, 44,
  534. 45, 46, 47, 48, 49, 1, 50, 51, 52, 53,
  535. 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
  536. 64, 1, 1, 65, 1, 1, 1, 1, 1, 1,
  537. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  538. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  539. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  540. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  541. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  542. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  543. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  544. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  545. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  546. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  547. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  548. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  549. 1, 1, 1, 1, 1
  550. } ;
  551. static const YY_CHAR yy_meta[66] =
  552. { 0,
  553. 1, 2, 3, 1, 3, 2, 2, 2, 2, 1,
  554. 1, 1, 1, 1, 1, 1, 2, 2, 2, 1,
  555. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  556. 1, 1, 1, 1, 1, 1, 1, 1, 4, 1,
  557. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  558. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  559. 1, 1, 1, 1, 2
  560. } ;
  561. static const flex_int16_t yy_base[396] =
  562. { 0,
  563. 0, 0, 63, 64, 537, 0, 68, 0, 538, 530,
  564. 538, 538, 538, 62, 69, 538, 538, 516, 55, 57,
  565. 52, 55, 60, 67, 72, 73, 64, 79, 75, 100,
  566. 115, 65, 83, 475, 102, 117, 118, 89, 121, 131,
  567. 482, 467, 0, 538, 538, 0, 133, 538, 167, 179,
  568. 538, 123, 0, 111, 124, 132, 516, 153, 138, 151,
  569. 169, 171, 0, 172, 170, 178, 171, 0, 129, 515,
  570. 517, 0, 469, 466, 0, 0, 485, 0, 183, 466,
  571. 41, 471, 186, 475, 482, 183, 480, 538, 0, 0,
  572. 0, 0, 0, 184, 0, 187, 189, 207, 0, 0,
  573. 206, 218, 0, 208, 215, 0, 0, 479, 466, 474,
  574. 466, 466, 194, 461, 455, 469, 461, 462, 469, 228,
  575. 456, 455, 0, 0, 0, 0, 226, 213, 0, 217,
  576. 456, 465, 464, 459, 0, 458, 438, 0, 447, 446,
  577. 458, 452, 439, 204, 442, 438, 237, 453, 444, 451,
  578. 434, 249, 236, 426, 199, 445, 0, 220, 0, 227,
  579. 443, 435, 425, 432, 431, 428, 0, 430, 423, 0,
  580. 432, 429, 427, 417, 419, 423, 417, 415, 419, 408,
  581. 208, 409, 152, 424, 408, 414, 406, 421, 423, 408,
  582. 417, 412, 415, 235, 261, 406, 413, 410, 0, 0,
  583. 411, 0, 397, 0, 414, 399, 399, 411, 401, 387,
  584. 400, 400, 406, 391, 385, 257, 400, 384, 389, 381,
  585. 395, 379, 258, 378, 391, 383, 375, 370, 0, 262,
  586. 0, 0, 392, 0, 382, 388, 386, 384, 371, 375,
  587. 384, 0, 379, 382, 0, 368, 365, 360, 365, 369,
  588. 364, 371, 375, 369, 361, 368, 355, 350, 360, 363,
  589. 0, 367, 361, 0, 266, 294, 361, 363, 345, 362,
  590. 350, 336, 342, 341, 354, 0, 345, 349, 332, 341,
  591. 333, 0, 350, 350, 331, 334, 336, 340, 333, 0,
  592. 266, 344, 0, 0, 0, 0, 0, 340, 0, 333,
  593. 336, 0, 336, 320, 328, 332, 0, 335, 330, 0,
  594. 323, 330, 325, 309, 325, 0, 324, 317, 307, 311,
  595. 315, 318, 310, 322, 312, 320, 306, 299, 303, 305,
  596. 314, 314, 300, 299, 297, 299, 304, 303, 296, 0,
  597. 0, 305, 293, 302, 0, 0, 0, 289, 287, 287,
  598. 0, 0, 0, 286, 279, 285, 283, 285, 287, 290,
  599. 281, 265, 275, 277, 273, 270, 266, 261, 0, 268,
  600. 0, 0, 264, 0, 265, 214, 0, 207, 209, 0,
  601. 0, 205, 170, 109, 93, 75, 53, 0, 0, 57,
  602. 0, 538, 325, 329, 333
  603. } ;
  604. static const flex_int16_t yy_def[396] =
  605. { 0,
  606. 392, 1, 393, 393, 392, 394, 392, 394, 392, 392,
  607. 392, 392, 392, 394, 394, 392, 392, 392, 394, 394,
  608. 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
  609. 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
  610. 394, 392, 395, 392, 392, 394, 392, 392, 394, 394,
  611. 392, 394, 394, 394, 394, 394, 394, 394, 394, 394,
  612. 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
  613. 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
  614. 394, 394, 394, 394, 394, 394, 394, 392, 395, 50,
  615. 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
  616. 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
  617. 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
  618. 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
  619. 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
  620. 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
  621. 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
  622. 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
  623. 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
  624. 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
  625. 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
  626. 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
  627. 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
  628. 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
  629. 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
  630. 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
  631. 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
  632. 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
  633. 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
  634. 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
  635. 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
  636. 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
  637. 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
  638. 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
  639. 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
  640. 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
  641. 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
  642. 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
  643. 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
  644. 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
  645. 394, 0, 392, 392, 392
  646. } ;
  647. static const flex_int16_t yy_nxt[604] =
  648. { 0,
  649. 6, 7, 7, 8, 9, 10, 11, 12, 13, 14,
  650. 15, 15, 15, 15, 15, 15, 16, 17, 18, 19,
  651. 6, 20, 6, 21, 22, 6, 23, 6, 24, 25,
  652. 26, 27, 28, 6, 29, 30, 31, 6, 6, 6,
  653. 19, 6, 20, 32, 33, 22, 34, 6, 23, 6,
  654. 35, 36, 26, 27, 37, 6, 38, 39, 40, 31,
  655. 41, 6, 6, 6, 42, 44, 44, 45, 45, 47,
  656. 47, 49, 49, 49, 49, 49, 49, 49, 49, 49,
  657. 49, 49, 49, 49, 49, 52, 54, 55, 56, 114,
  658. 53, 59, 57, 58, 115, 60, 61, 63, 64, 50,
  659. 65, 44, 44, 391, 62, 73, 390, 52, 54, 74,
  660. 55, 56, 59, 53, 57, 58, 60, 61, 55, 64,
  661. 63, 66, 65, 67, 50, 70, 62, 71, 58, 82,
  662. 72, 68, 389, 69, 47, 47, 59, 64, 75, 388,
  663. 60, 55, 66, 92, 67, 91, 65, 83, 105, 93,
  664. 58, 84, 66, 68, 67, 77, 69, 79, 64, 387,
  665. 78, 60, 68, 94, 69, 92, 91, 80, 65, 105,
  666. 85, 93, 97, 86, 81, 67, 49, 49, 49, 49,
  667. 49, 49, 49, 96, 68, 94, 98, 69, 90, 90,
  668. 90, 90, 90, 90, 90, 97, 102, 217, 90, 90,
  669. 90, 90, 90, 90, 99, 96, 100, 101, 104, 98,
  670. 103, 218, 386, 123, 124, 103, 125, 97, 102, 90,
  671. 90, 90, 90, 90, 90, 111, 126, 99, 117, 100,
  672. 101, 121, 103, 104, 118, 123, 124, 103, 125, 112,
  673. 97, 127, 128, 129, 136, 130, 172, 126, 159, 158,
  674. 191, 160, 137, 194, 173, 192, 214, 385, 384, 195,
  675. 383, 215, 382, 128, 127, 229, 129, 130, 144, 145,
  676. 158, 159, 146, 147, 160, 148, 194, 176, 149, 150,
  677. 186, 195, 151, 187, 152, 153, 154, 229, 188, 155,
  678. 177, 182, 230, 183, 189, 265, 247, 257, 248, 258,
  679. 184, 293, 185, 294, 295, 296, 318, 249, 381, 380,
  680. 379, 378, 377, 376, 230, 250, 259, 375, 265, 374,
  681. 373, 319, 372, 371, 293, 43, 43, 43, 43, 46,
  682. 370, 369, 46, 89, 89, 368, 367, 366, 365, 364,
  683. 363, 362, 361, 360, 359, 358, 357, 356, 355, 354,
  684. 353, 352, 351, 350, 349, 348, 347, 346, 345, 344,
  685. 343, 342, 341, 340, 339, 338, 337, 336, 335, 334,
  686. 333, 332, 331, 330, 329, 328, 327, 326, 325, 324,
  687. 323, 322, 321, 320, 317, 316, 315, 314, 313, 312,
  688. 311, 310, 309, 308, 307, 306, 305, 304, 303, 302,
  689. 301, 300, 299, 298, 297, 292, 291, 290, 289, 288,
  690. 287, 286, 285, 284, 283, 282, 281, 280, 279, 278,
  691. 277, 276, 275, 274, 273, 272, 271, 270, 269, 268,
  692. 267, 266, 264, 263, 262, 261, 260, 256, 255, 254,
  693. 253, 252, 251, 246, 245, 244, 243, 242, 241, 240,
  694. 239, 238, 237, 236, 235, 234, 233, 232, 231, 228,
  695. 227, 226, 225, 224, 223, 222, 221, 220, 219, 216,
  696. 213, 212, 211, 210, 209, 208, 207, 206, 205, 204,
  697. 203, 202, 201, 200, 199, 198, 197, 196, 193, 190,
  698. 181, 180, 179, 178, 175, 174, 171, 170, 169, 168,
  699. 167, 166, 165, 164, 163, 162, 161, 157, 156, 143,
  700. 142, 141, 140, 139, 138, 135, 134, 133, 132, 131,
  701. 122, 120, 119, 116, 113, 110, 109, 108, 107, 106,
  702. 95, 88, 87, 76, 51, 48, 392, 5, 392, 392,
  703. 392, 392, 392, 392, 392, 392, 392, 392, 392, 392,
  704. 392, 392, 392, 392, 392, 392, 392, 392, 392, 392,
  705. 392, 392, 392, 392, 392, 392, 392, 392, 392, 392,
  706. 392, 392, 392, 392, 392, 392, 392, 392, 392, 392,
  707. 392, 392, 392, 392, 392, 392, 392, 392, 392, 392,
  708. 392, 392, 392, 392, 392, 392, 392, 392, 392, 392,
  709. 392, 392, 392
  710. } ;
  711. static const flex_int16_t yy_chk[604] =
  712. { 0,
  713. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  714. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  715. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  716. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  717. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  718. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  719. 1, 1, 1, 1, 1, 3, 4, 3, 4, 7,
  720. 7, 14, 14, 14, 14, 14, 14, 14, 15, 15,
  721. 15, 15, 15, 15, 15, 19, 20, 21, 22, 81,
  722. 19, 25, 23, 24, 81, 25, 26, 27, 28, 14,
  723. 29, 3, 4, 390, 26, 32, 387, 19, 20, 32,
  724. 21, 22, 25, 19, 23, 24, 25, 26, 33, 28,
  725. 27, 30, 29, 30, 14, 31, 26, 31, 35, 38,
  726. 31, 30, 386, 30, 47, 47, 36, 37, 33, 385,
  727. 36, 33, 30, 54, 30, 52, 39, 38, 69, 55,
  728. 35, 38, 40, 30, 40, 35, 30, 36, 37, 384,
  729. 35, 36, 40, 56, 40, 54, 52, 37, 39, 69,
  730. 39, 55, 59, 40, 37, 40, 49, 49, 49, 49,
  731. 49, 49, 49, 58, 40, 56, 60, 40, 50, 50,
  732. 50, 50, 50, 50, 50, 59, 65, 183, 50, 50,
  733. 50, 50, 50, 50, 61, 58, 62, 64, 67, 60,
  734. 66, 183, 383, 94, 96, 86, 97, 79, 65, 50,
  735. 50, 50, 50, 50, 50, 79, 98, 61, 83, 62,
  736. 64, 86, 66, 67, 83, 94, 96, 86, 97, 79,
  737. 79, 101, 102, 104, 113, 105, 144, 98, 128, 127,
  738. 155, 130, 113, 158, 144, 155, 181, 382, 379, 160,
  739. 378, 181, 376, 102, 101, 194, 104, 105, 120, 120,
  740. 127, 128, 120, 120, 130, 120, 158, 147, 120, 120,
  741. 153, 160, 120, 153, 120, 120, 120, 194, 153, 120,
  742. 147, 152, 195, 152, 153, 230, 216, 223, 216, 223,
  743. 152, 265, 152, 266, 266, 266, 291, 216, 375, 373,
  744. 370, 368, 367, 366, 195, 216, 223, 365, 230, 364,
  745. 363, 291, 362, 361, 265, 393, 393, 393, 393, 394,
  746. 360, 359, 394, 395, 395, 358, 357, 356, 355, 354,
  747. 350, 349, 348, 344, 343, 342, 339, 338, 337, 336,
  748. 335, 334, 333, 332, 331, 330, 329, 328, 327, 326,
  749. 325, 324, 323, 322, 321, 320, 319, 318, 317, 315,
  750. 314, 313, 312, 311, 309, 308, 306, 305, 304, 303,
  751. 301, 300, 298, 292, 289, 288, 287, 286, 285, 284,
  752. 283, 281, 280, 279, 278, 277, 275, 274, 273, 272,
  753. 271, 270, 269, 268, 267, 263, 262, 260, 259, 258,
  754. 257, 256, 255, 254, 253, 252, 251, 250, 249, 248,
  755. 247, 246, 244, 243, 241, 240, 239, 238, 237, 236,
  756. 235, 233, 228, 227, 226, 225, 224, 222, 221, 220,
  757. 219, 218, 217, 215, 214, 213, 212, 211, 210, 209,
  758. 208, 207, 206, 205, 203, 201, 198, 197, 196, 193,
  759. 192, 191, 190, 189, 188, 187, 186, 185, 184, 182,
  760. 180, 179, 178, 177, 176, 175, 174, 173, 172, 171,
  761. 169, 168, 166, 165, 164, 163, 162, 161, 156, 154,
  762. 151, 150, 149, 148, 146, 145, 143, 142, 141, 140,
  763. 139, 137, 136, 134, 133, 132, 131, 122, 121, 119,
  764. 118, 117, 116, 115, 114, 112, 111, 110, 109, 108,
  765. 87, 85, 84, 82, 80, 77, 74, 73, 71, 70,
  766. 57, 42, 41, 34, 18, 10, 5, 392, 392, 392,
  767. 392, 392, 392, 392, 392, 392, 392, 392, 392, 392,
  768. 392, 392, 392, 392, 392, 392, 392, 392, 392, 392,
  769. 392, 392, 392, 392, 392, 392, 392, 392, 392, 392,
  770. 392, 392, 392, 392, 392, 392, 392, 392, 392, 392,
  771. 392, 392, 392, 392, 392, 392, 392, 392, 392, 392,
  772. 392, 392, 392, 392, 392, 392, 392, 392, 392, 392,
  773. 392, 392, 392
  774. } ;
  775. /* The intent behind this definition is that it'll catch
  776. * any uses of REJECT which flex missed.
  777. */
  778. #define REJECT reject_used_but_not_detected
  779. #define yymore() yymore_used_but_not_detected
  780. #define YY_MORE_ADJ 0
  781. #define YY_RESTORE_YY_MORE_OFFSET
  782. #line 1 "route/cls/ematch_grammar.l"
  783. /*
  784. * lib/route/cls/ematch_grammar.l ematch expression grammar
  785. *
  786. * This library is free software; you can redistribute it and/or
  787. * modify it under the terms of the GNU Lesser General Public
  788. * License as published by the Free Software Foundation version 2.1
  789. * of the License.
  790. *
  791. * Copyright (c) 2010-2013 Thomas Graf <tgraf@suug.ch>
  792. */
  793. #line 13 "route/cls/ematch_grammar.l"
  794. #include <netlink-private/netlink.h>
  795. #include <netlink-private/tc.h>
  796. #include <netlink/netlink.h>
  797. #include <netlink/route/cls/ematch.h>
  798. #include <netlink/route/cls/ematch/cmp.h>
  799. #include "ematch_syntax.h"
  800. #line 926 "route/cls/ematch_grammar.c"
  801. #define YY_NO_INPUT 1
  802. #line 929 "route/cls/ematch_grammar.c"
  803. #define INITIAL 0
  804. #define QUOTE 1
  805. #ifndef YY_NO_UNISTD_H
  806. /* Special case for "unistd.h", since it is non-ANSI. We include it way
  807. * down here because we want the user's section 1 to have been scanned first.
  808. * The user has a chance to override it with an option.
  809. */
  810. #include <unistd.h>
  811. #endif
  812. #ifndef YY_EXTRA_TYPE
  813. #define YY_EXTRA_TYPE void *
  814. #endif
  815. /* Holds the entire state of the reentrant scanner. */
  816. struct yyguts_t
  817. {
  818. /* User-defined. Not touched by flex. */
  819. YY_EXTRA_TYPE yyextra_r;
  820. /* The rest are the same as the globals declared in the non-reentrant scanner. */
  821. FILE *yyin_r, *yyout_r;
  822. size_t yy_buffer_stack_top; /**< index of top of stack. */
  823. size_t yy_buffer_stack_max; /**< capacity of stack. */
  824. YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
  825. char yy_hold_char;
  826. int yy_n_chars;
  827. int yyleng_r;
  828. char *yy_c_buf_p;
  829. int yy_init;
  830. int yy_start;
  831. int yy_did_buffer_switch_on_eof;
  832. int yy_start_stack_ptr;
  833. int yy_start_stack_depth;
  834. int *yy_start_stack;
  835. yy_state_type yy_last_accepting_state;
  836. char* yy_last_accepting_cpos;
  837. int yylineno_r;
  838. int yy_flex_debug_r;
  839. char *yytext_r;
  840. int yy_more_flag;
  841. int yy_more_len;
  842. YYSTYPE * yylval_r;
  843. }; /* end struct yyguts_t */
  844. static int yy_init_globals ( yyscan_t yyscanner );
  845. /* This must go here because YYSTYPE and YYLTYPE are included
  846. * from bison output in section 1.*/
  847. # define yylval yyg->yylval_r
  848. int yylex_init (yyscan_t* scanner);
  849. int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner);
  850. /* Accessor methods to globals.
  851. These are made visible to non-reentrant scanners for convenience. */
  852. int yylex_destroy ( yyscan_t yyscanner );
  853. int yyget_debug ( yyscan_t yyscanner );
  854. void yyset_debug ( int debug_flag , yyscan_t yyscanner );
  855. YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner );
  856. void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner );
  857. FILE *yyget_in ( yyscan_t yyscanner );
  858. void yyset_in ( FILE * _in_str , yyscan_t yyscanner );
  859. FILE *yyget_out ( yyscan_t yyscanner );
  860. void yyset_out ( FILE * _out_str , yyscan_t yyscanner );
  861. int yyget_leng ( yyscan_t yyscanner );
  862. char *yyget_text ( yyscan_t yyscanner );
  863. int yyget_lineno ( yyscan_t yyscanner );
  864. void yyset_lineno ( int _line_number , yyscan_t yyscanner );
  865. int yyget_column ( yyscan_t yyscanner );
  866. void yyset_column ( int _column_no , yyscan_t yyscanner );
  867. YYSTYPE * yyget_lval ( yyscan_t yyscanner );
  868. void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner );
  869. /* Macros after this point can all be overridden by user definitions in
  870. * section 1.
  871. */
  872. #ifndef YY_SKIP_YYWRAP
  873. #ifdef __cplusplus
  874. extern "C" int yywrap ( yyscan_t yyscanner );
  875. #else
  876. extern int yywrap ( yyscan_t yyscanner );
  877. #endif
  878. #endif
  879. #ifndef YY_NO_UNPUT
  880. #endif
  881. #ifndef yytext_ptr
  882. static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner);
  883. #endif
  884. #ifdef YY_NEED_STRLEN
  885. static int yy_flex_strlen ( const char * , yyscan_t yyscanner);
  886. #endif
  887. #ifndef YY_NO_INPUT
  888. #ifdef __cplusplus
  889. static int yyinput ( yyscan_t yyscanner );
  890. #else
  891. static int input ( yyscan_t yyscanner );
  892. #endif
  893. #endif
  894. /* Amount of stuff to slurp up with each read. */
  895. #ifndef YY_READ_BUF_SIZE
  896. #ifdef __ia64__
  897. /* On IA-64, the buffer size is 16k, not 8k */
  898. #define YY_READ_BUF_SIZE 16384
  899. #else
  900. #define YY_READ_BUF_SIZE 8192
  901. #endif /* __ia64__ */
  902. #endif
  903. /* Copy whatever the last rule matched to the standard output. */
  904. #ifndef ECHO
  905. /* This used to be an fputs(), but since the string might contain NUL's,
  906. * we now use fwrite().
  907. */
  908. #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
  909. #endif
  910. /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
  911. * is returned in "result".
  912. */
  913. #ifndef YY_INPUT
  914. #define YY_INPUT(buf,result,max_size) \
  915. if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
  916. { \
  917. int c = '*'; \
  918. int n; \
  919. for ( n = 0; n < max_size && \
  920. (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
  921. buf[n] = (char) c; \
  922. if ( c == '\n' ) \
  923. buf[n++] = (char) c; \
  924. if ( c == EOF && ferror( yyin ) ) \
  925. YY_FATAL_ERROR( "input in flex scanner failed" ); \
  926. result = n; \
  927. } \
  928. else \
  929. { \
  930. errno=0; \
  931. while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
  932. { \
  933. if( errno != EINTR) \
  934. { \
  935. YY_FATAL_ERROR( "input in flex scanner failed" ); \
  936. break; \
  937. } \
  938. errno=0; \
  939. clearerr(yyin); \
  940. } \
  941. }\
  942. \
  943. #endif
  944. /* No semi-colon after return; correct usage is to write "yyterminate();" -
  945. * we don't want an extra ';' after the "return" because that will cause
  946. * some compilers to complain about unreachable statements.
  947. */
  948. #ifndef yyterminate
  949. #define yyterminate() return YY_NULL
  950. #endif
  951. /* Number of entries by which start-condition stack grows. */
  952. #ifndef YY_START_STACK_INCR
  953. #define YY_START_STACK_INCR 25
  954. #endif
  955. /* Report a fatal error. */
  956. #ifndef YY_FATAL_ERROR
  957. #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
  958. #endif
  959. /* end tables serialization structures and prototypes */
  960. /* Default declaration of generated scanner - a define so the user can
  961. * easily add parameters.
  962. */
  963. #ifndef YY_DECL
  964. #define YY_DECL_IS_OURS 1
  965. extern int yylex \
  966. (YYSTYPE * yylval_param , yyscan_t yyscanner);
  967. #define YY_DECL int yylex \
  968. (YYSTYPE * yylval_param , yyscan_t yyscanner)
  969. #endif /* !YY_DECL */
  970. /* Code executed at the beginning of each rule, after yytext and yyleng
  971. * have been set up.
  972. */
  973. #ifndef YY_USER_ACTION
  974. #define YY_USER_ACTION
  975. #endif
  976. /* Code executed at the end of each rule. */
  977. #ifndef YY_BREAK
  978. #define YY_BREAK /*LINTED*/break;
  979. #endif
  980. #define YY_RULE_SETUP \
  981. YY_USER_ACTION
  982. /** The main scanner function which does all the work.
  983. */
  984. YY_DECL
  985. {
  986. yy_state_type yy_current_state;
  987. char *yy_cp, *yy_bp;
  988. int yy_act;
  989. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  990. yylval = yylval_param;
  991. if ( !yyg->yy_init )
  992. {
  993. yyg->yy_init = 1;
  994. #ifdef YY_USER_INIT
  995. YY_USER_INIT;
  996. #endif
  997. if ( ! yyg->yy_start )
  998. yyg->yy_start = 1; /* first start state */
  999. if ( ! yyin )
  1000. yyin = stdin;
  1001. if ( ! yyout )
  1002. yyout = stdout;
  1003. if ( ! YY_CURRENT_BUFFER ) {
  1004. yyensure_buffer_stack (yyscanner);
  1005. YY_CURRENT_BUFFER_LVALUE =
  1006. yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
  1007. }
  1008. yy_load_buffer_state( yyscanner );
  1009. }
  1010. {
  1011. #line 32 "route/cls/ematch_grammar.l"
  1012. #line 1205 "route/cls/ematch_grammar.c"
  1013. while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
  1014. {
  1015. yy_cp = yyg->yy_c_buf_p;
  1016. /* Support of yytext. */
  1017. *yy_cp = yyg->yy_hold_char;
  1018. /* yy_bp points to the position in yy_ch_buf of the start of
  1019. * the current run.
  1020. */
  1021. yy_bp = yy_cp;
  1022. yy_current_state = yyg->yy_start;
  1023. yy_match:
  1024. do
  1025. {
  1026. YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
  1027. if ( yy_accept[yy_current_state] )
  1028. {
  1029. yyg->yy_last_accepting_state = yy_current_state;
  1030. yyg->yy_last_accepting_cpos = yy_cp;
  1031. }
  1032. while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  1033. {
  1034. yy_current_state = (int) yy_def[yy_current_state];
  1035. if ( yy_current_state >= 393 )
  1036. yy_c = yy_meta[yy_c];
  1037. }
  1038. yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
  1039. ++yy_cp;
  1040. }
  1041. while ( yy_base[yy_current_state] != 538 );
  1042. yy_find_action:
  1043. yy_act = yy_accept[yy_current_state];
  1044. if ( yy_act == 0 )
  1045. { /* have to back up */
  1046. yy_cp = yyg->yy_last_accepting_cpos;
  1047. yy_current_state = yyg->yy_last_accepting_state;
  1048. yy_act = yy_accept[yy_current_state];
  1049. }
  1050. YY_DO_BEFORE_ACTION;
  1051. do_action: /* This label is used only to access EOF actions. */
  1052. switch ( yy_act )
  1053. { /* beginning of action switch */
  1054. case 0: /* must back up */
  1055. /* undo the effects of YY_DO_BEFORE_ACTION */
  1056. *yy_cp = yyg->yy_hold_char;
  1057. yy_cp = yyg->yy_last_accepting_cpos;
  1058. yy_current_state = yyg->yy_last_accepting_state;
  1059. goto yy_find_action;
  1060. case 1:
  1061. /* rule 1 can match eol */
  1062. YY_RULE_SETUP
  1063. #line 34 "route/cls/ematch_grammar.l"
  1064. YY_BREAK
  1065. case 2:
  1066. YY_RULE_SETUP
  1067. #line 36 "route/cls/ematch_grammar.l"
  1068. {
  1069. NL_DBG(4, "Beginning of quote\n");
  1070. yylval->q.len = 32;
  1071. if (!(yylval->q.data = calloc(1, yylval->q.len)))
  1072. return ERROR;
  1073. yylval->q.index = 0;
  1074. BEGIN(QUOTE);
  1075. }
  1076. YY_BREAK
  1077. case 3:
  1078. YY_RULE_SETUP
  1079. #line 46 "route/cls/ematch_grammar.l"
  1080. {
  1081. memcpy(yylval->q.data + yylval->q.index, yytext,
  1082. strlen(yytext));
  1083. yylval->q.index += strlen(yytext);
  1084. }
  1085. YY_BREAK
  1086. case 4:
  1087. YY_RULE_SETUP
  1088. #line 52 "route/cls/ematch_grammar.l"
  1089. {
  1090. BEGIN(0);
  1091. return QUOTED;
  1092. }
  1093. YY_BREAK
  1094. case 5:
  1095. #line 59 "route/cls/ematch_grammar.l"
  1096. case 6:
  1097. YY_RULE_SETUP
  1098. #line 59 "route/cls/ematch_grammar.l"
  1099. {
  1100. yylval->i = strtoul(yytext, NULL, 0);
  1101. return NUMBER;
  1102. }
  1103. YY_BREAK
  1104. case 7:
  1105. #line 65 "route/cls/ematch_grammar.l"
  1106. case 8:
  1107. YY_RULE_SETUP
  1108. #line 65 "route/cls/ematch_grammar.l"
  1109. return KW_EQ;
  1110. YY_BREAK
  1111. case 9:
  1112. #line 67 "route/cls/ematch_grammar.l"
  1113. case 10:
  1114. YY_RULE_SETUP
  1115. #line 67 "route/cls/ematch_grammar.l"
  1116. return KW_GT;
  1117. YY_BREAK
  1118. case 11:
  1119. #line 69 "route/cls/ematch_grammar.l"
  1120. case 12:
  1121. YY_RULE_SETUP
  1122. #line 69 "route/cls/ematch_grammar.l"
  1123. return KW_LT;
  1124. YY_BREAK
  1125. case 13:
  1126. #line 72 "route/cls/ematch_grammar.l"
  1127. case 14:
  1128. YY_RULE_SETUP
  1129. #line 72 "route/cls/ematch_grammar.l"
  1130. { yylval->i = TCF_EM_REL_AND; return LOGIC; }
  1131. YY_BREAK
  1132. case 15:
  1133. #line 74 "route/cls/ematch_grammar.l"
  1134. case 16:
  1135. YY_RULE_SETUP
  1136. #line 74 "route/cls/ematch_grammar.l"
  1137. { yylval->i = TCF_EM_REL_OR; return LOGIC; }
  1138. YY_BREAK
  1139. case 17:
  1140. #line 76 "route/cls/ematch_grammar.l"
  1141. case 18:
  1142. YY_RULE_SETUP
  1143. #line 76 "route/cls/ematch_grammar.l"
  1144. return NOT;
  1145. YY_BREAK
  1146. case 19:
  1147. YY_RULE_SETUP
  1148. #line 78 "route/cls/ematch_grammar.l"
  1149. { yylval->i = TCF_EM_CMP; return EMATCH_CMP; }
  1150. YY_BREAK
  1151. case 20:
  1152. YY_RULE_SETUP
  1153. #line 79 "route/cls/ematch_grammar.l"
  1154. { yylval->i = TCF_EM_NBYTE; return EMATCH_NBYTE; }
  1155. YY_BREAK
  1156. case 21:
  1157. YY_RULE_SETUP
  1158. #line 80 "route/cls/ematch_grammar.l"
  1159. { yylval->i = TCF_EM_TEXT; return EMATCH_TEXT; }
  1160. YY_BREAK
  1161. case 22:
  1162. YY_RULE_SETUP
  1163. #line 81 "route/cls/ematch_grammar.l"
  1164. { yylval->i = TCF_EM_META; return EMATCH_META; }
  1165. YY_BREAK
  1166. case 23:
  1167. YY_RULE_SETUP
  1168. #line 83 "route/cls/ematch_grammar.l"
  1169. return KW_OPEN;
  1170. YY_BREAK
  1171. case 24:
  1172. YY_RULE_SETUP
  1173. #line 84 "route/cls/ematch_grammar.l"
  1174. return KW_CLOSE;
  1175. YY_BREAK
  1176. case 25:
  1177. #line 86 "route/cls/ematch_grammar.l"
  1178. case 26:
  1179. YY_RULE_SETUP
  1180. #line 86 "route/cls/ematch_grammar.l"
  1181. return KW_MASK;
  1182. YY_BREAK
  1183. case 27:
  1184. #line 88 "route/cls/ematch_grammar.l"
  1185. case 28:
  1186. YY_RULE_SETUP
  1187. #line 88 "route/cls/ematch_grammar.l"
  1188. return KW_SHIFT;
  1189. YY_BREAK
  1190. case 29:
  1191. YY_RULE_SETUP
  1192. #line 89 "route/cls/ematch_grammar.l"
  1193. return KW_AT;
  1194. YY_BREAK
  1195. case 30:
  1196. YY_RULE_SETUP
  1197. #line 90 "route/cls/ematch_grammar.l"
  1198. return KW_PLUS;
  1199. YY_BREAK
  1200. case 31:
  1201. YY_RULE_SETUP
  1202. #line 91 "route/cls/ematch_grammar.l"
  1203. return KW_FROM;
  1204. YY_BREAK
  1205. case 32:
  1206. YY_RULE_SETUP
  1207. #line 92 "route/cls/ematch_grammar.l"
  1208. return KW_TO;
  1209. YY_BREAK
  1210. case 33:
  1211. YY_RULE_SETUP
  1212. #line 94 "route/cls/ematch_grammar.l"
  1213. { yylval->i = TCF_EM_ALIGN_U8; return ALIGN; }
  1214. YY_BREAK
  1215. case 34:
  1216. YY_RULE_SETUP
  1217. #line 95 "route/cls/ematch_grammar.l"
  1218. { yylval->i = TCF_EM_ALIGN_U16; return ALIGN; }
  1219. YY_BREAK
  1220. case 35:
  1221. YY_RULE_SETUP
  1222. #line 96 "route/cls/ematch_grammar.l"
  1223. { yylval->i = TCF_EM_ALIGN_U32; return ALIGN; }
  1224. YY_BREAK
  1225. case 36:
  1226. #line 99 "route/cls/ematch_grammar.l"
  1227. case 37:
  1228. YY_RULE_SETUP
  1229. #line 99 "route/cls/ematch_grammar.l"
  1230. { yylval->i = TCF_LAYER_LINK; return LAYER; }
  1231. YY_BREAK
  1232. case 38:
  1233. #line 101 "route/cls/ematch_grammar.l"
  1234. case 39:
  1235. #line 102 "route/cls/ematch_grammar.l"
  1236. case 40:
  1237. YY_RULE_SETUP
  1238. #line 102 "route/cls/ematch_grammar.l"
  1239. { yylval->i = TCF_LAYER_NETWORK; return LAYER; }
  1240. YY_BREAK
  1241. case 41:
  1242. #line 104 "route/cls/ematch_grammar.l"
  1243. case 42:
  1244. YY_RULE_SETUP
  1245. #line 104 "route/cls/ematch_grammar.l"
  1246. { yylval->i = TCF_LAYER_TRANSPORT; return LAYER; }
  1247. YY_BREAK
  1248. case 43:
  1249. YY_RULE_SETUP
  1250. #line 106 "route/cls/ematch_grammar.l"
  1251. return META_RANDOM;
  1252. YY_BREAK
  1253. case 44:
  1254. YY_RULE_SETUP
  1255. #line 107 "route/cls/ematch_grammar.l"
  1256. return META_LOADAVG_0;
  1257. YY_BREAK
  1258. case 45:
  1259. YY_RULE_SETUP
  1260. #line 108 "route/cls/ematch_grammar.l"
  1261. return META_LOADAVG_1;
  1262. YY_BREAK
  1263. case 46:
  1264. YY_RULE_SETUP
  1265. #line 109 "route/cls/ematch_grammar.l"
  1266. return META_LOADAVG_2;
  1267. YY_BREAK
  1268. case 47:
  1269. YY_RULE_SETUP
  1270. #line 110 "route/cls/ematch_grammar.l"
  1271. return META_DEV;
  1272. YY_BREAK
  1273. case 48:
  1274. YY_RULE_SETUP
  1275. #line 111 "route/cls/ematch_grammar.l"
  1276. return META_PRIO;
  1277. YY_BREAK
  1278. case 49:
  1279. YY_RULE_SETUP
  1280. #line 112 "route/cls/ematch_grammar.l"
  1281. return META_PROTO;
  1282. YY_BREAK
  1283. case 50:
  1284. YY_RULE_SETUP
  1285. #line 113 "route/cls/ematch_grammar.l"
  1286. return META_PKTTYPE;
  1287. YY_BREAK
  1288. case 51:
  1289. YY_RULE_SETUP
  1290. #line 114 "route/cls/ematch_grammar.l"
  1291. return META_PKTLEN;
  1292. YY_BREAK
  1293. case 52:
  1294. YY_RULE_SETUP
  1295. #line 115 "route/cls/ematch_grammar.l"
  1296. return META_DATALEN;
  1297. YY_BREAK
  1298. case 53:
  1299. YY_RULE_SETUP
  1300. #line 116 "route/cls/ematch_grammar.l"
  1301. return META_MACLEN;
  1302. YY_BREAK
  1303. case 54:
  1304. YY_RULE_SETUP
  1305. #line 117 "route/cls/ematch_grammar.l"
  1306. return META_MARK;
  1307. YY_BREAK
  1308. case 55:
  1309. YY_RULE_SETUP
  1310. #line 118 "route/cls/ematch_grammar.l"
  1311. return META_TCINDEX;
  1312. YY_BREAK
  1313. case 56:
  1314. YY_RULE_SETUP
  1315. #line 119 "route/cls/ematch_grammar.l"
  1316. return META_RTCLASSID;
  1317. YY_BREAK
  1318. case 57:
  1319. YY_RULE_SETUP
  1320. #line 120 "route/cls/ematch_grammar.l"
  1321. return META_RTIIF;
  1322. YY_BREAK
  1323. case 58:
  1324. YY_RULE_SETUP
  1325. #line 121 "route/cls/ematch_grammar.l"
  1326. return META_SK_FAMILY;
  1327. YY_BREAK
  1328. case 59:
  1329. YY_RULE_SETUP
  1330. #line 122 "route/cls/ematch_grammar.l"
  1331. return META_SK_STATE;
  1332. YY_BREAK
  1333. case 60:
  1334. YY_RULE_SETUP
  1335. #line 123 "route/cls/ematch_grammar.l"
  1336. return META_SK_REUSE;
  1337. YY_BREAK
  1338. case 61:
  1339. YY_RULE_SETUP
  1340. #line 124 "route/cls/ematch_grammar.l"
  1341. return META_SK_REFCNT;
  1342. YY_BREAK
  1343. case 62:
  1344. YY_RULE_SETUP
  1345. #line 125 "route/cls/ematch_grammar.l"
  1346. return META_SK_RCVBUF;
  1347. YY_BREAK
  1348. case 63:
  1349. YY_RULE_SETUP
  1350. #line 126 "route/cls/ematch_grammar.l"
  1351. return META_SK_SNDBUF;
  1352. YY_BREAK
  1353. case 64:
  1354. YY_RULE_SETUP
  1355. #line 127 "route/cls/ematch_grammar.l"
  1356. return META_SK_SHUTDOWN;
  1357. YY_BREAK
  1358. case 65:
  1359. YY_RULE_SETUP
  1360. #line 128 "route/cls/ematch_grammar.l"
  1361. return META_SK_PROTO;
  1362. YY_BREAK
  1363. case 66:
  1364. YY_RULE_SETUP
  1365. #line 129 "route/cls/ematch_grammar.l"
  1366. return META_SK_TYPE;
  1367. YY_BREAK
  1368. case 67:
  1369. YY_RULE_SETUP
  1370. #line 130 "route/cls/ematch_grammar.l"
  1371. return META_SK_RMEM_ALLOC;
  1372. YY_BREAK
  1373. case 68:
  1374. YY_RULE_SETUP
  1375. #line 131 "route/cls/ematch_grammar.l"
  1376. return META_SK_WMEM_ALLOC;
  1377. YY_BREAK
  1378. case 69:
  1379. YY_RULE_SETUP
  1380. #line 132 "route/cls/ematch_grammar.l"
  1381. return META_SK_WMEM_QUEUED;
  1382. YY_BREAK
  1383. case 70:
  1384. YY_RULE_SETUP
  1385. #line 133 "route/cls/ematch_grammar.l"
  1386. return META_SK_RCV_QLEN;
  1387. YY_BREAK
  1388. case 71:
  1389. YY_RULE_SETUP
  1390. #line 134 "route/cls/ematch_grammar.l"
  1391. return META_SK_SND_QLEN;
  1392. YY_BREAK
  1393. case 72:
  1394. YY_RULE_SETUP
  1395. #line 135 "route/cls/ematch_grammar.l"
  1396. return META_SK_ERR_QLEN;
  1397. YY_BREAK
  1398. case 73:
  1399. YY_RULE_SETUP
  1400. #line 136 "route/cls/ematch_grammar.l"
  1401. return META_SK_FORWARD_ALLOCS;
  1402. YY_BREAK
  1403. case 74:
  1404. YY_RULE_SETUP
  1405. #line 137 "route/cls/ematch_grammar.l"
  1406. return META_SK_ALLOCS;
  1407. YY_BREAK
  1408. case 75:
  1409. YY_RULE_SETUP
  1410. #line 138 "route/cls/ematch_grammar.l"
  1411. return META_SK_ROUTE_CAPS;
  1412. YY_BREAK
  1413. case 76:
  1414. YY_RULE_SETUP
  1415. #line 139 "route/cls/ematch_grammar.l"
  1416. return META_SK_HASH;
  1417. YY_BREAK
  1418. case 77:
  1419. YY_RULE_SETUP
  1420. #line 140 "route/cls/ematch_grammar.l"
  1421. return META_SK_LINGERTIME;
  1422. YY_BREAK
  1423. case 78:
  1424. YY_RULE_SETUP
  1425. #line 141 "route/cls/ematch_grammar.l"
  1426. return META_SK_ACK_BACKLOG;
  1427. YY_BREAK
  1428. case 79:
  1429. YY_RULE_SETUP
  1430. #line 142 "route/cls/ematch_grammar.l"
  1431. return META_SK_MAX_ACK_BACKLOG;
  1432. YY_BREAK
  1433. case 80:
  1434. YY_RULE_SETUP
  1435. #line 143 "route/cls/ematch_grammar.l"
  1436. return META_SK_PRIO;
  1437. YY_BREAK
  1438. case 81:
  1439. YY_RULE_SETUP
  1440. #line 144 "route/cls/ematch_grammar.l"
  1441. return META_SK_RCVLOWAT;
  1442. YY_BREAK
  1443. case 82:
  1444. YY_RULE_SETUP
  1445. #line 145 "route/cls/ematch_grammar.l"
  1446. return META_SK_RCVTIMEO;
  1447. YY_BREAK
  1448. case 83:
  1449. YY_RULE_SETUP
  1450. #line 146 "route/cls/ematch_grammar.l"
  1451. return META_SK_SNDTIMEO;
  1452. YY_BREAK
  1453. case 84:
  1454. YY_RULE_SETUP
  1455. #line 147 "route/cls/ematch_grammar.l"
  1456. return META_SK_SENDMSG_OFF;
  1457. YY_BREAK
  1458. case 85:
  1459. YY_RULE_SETUP
  1460. #line 148 "route/cls/ematch_grammar.l"
  1461. return META_SK_WRITE_PENDING;
  1462. YY_BREAK
  1463. case 86:
  1464. YY_RULE_SETUP
  1465. #line 149 "route/cls/ematch_grammar.l"
  1466. return META_VLAN;
  1467. YY_BREAK
  1468. case 87:
  1469. YY_RULE_SETUP
  1470. #line 150 "route/cls/ematch_grammar.l"
  1471. return META_RXHASH;
  1472. YY_BREAK
  1473. case 88:
  1474. YY_RULE_SETUP
  1475. #line 152 "route/cls/ematch_grammar.l"
  1476. return META_DEVNAME;
  1477. YY_BREAK
  1478. case 89:
  1479. YY_RULE_SETUP
  1480. #line 153 "route/cls/ematch_grammar.l"
  1481. return META_SK_BOUND_IF;
  1482. YY_BREAK
  1483. case 90:
  1484. YY_RULE_SETUP
  1485. #line 156 "route/cls/ematch_grammar.l"
  1486. {
  1487. yylval->s = strdup(yytext);
  1488. if (yylval->s == NULL)
  1489. return ERROR;
  1490. NL_DBG(4, "lex STR=%s\n", yylval->s);
  1491. return STR;
  1492. }
  1493. YY_BREAK
  1494. case 91:
  1495. YY_RULE_SETUP
  1496. #line 163 "route/cls/ematch_grammar.l"
  1497. ECHO;
  1498. YY_BREAK
  1499. #line 1703 "route/cls/ematch_grammar.c"
  1500. case YY_STATE_EOF(INITIAL):
  1501. case YY_STATE_EOF(QUOTE):
  1502. yyterminate();
  1503. case YY_END_OF_BUFFER:
  1504. {
  1505. /* Amount of text matched not including the EOB char. */
  1506. int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
  1507. /* Undo the effects of YY_DO_BEFORE_ACTION. */
  1508. *yy_cp = yyg->yy_hold_char;
  1509. YY_RESTORE_YY_MORE_OFFSET
  1510. if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
  1511. {
  1512. /* We're scanning a new file or input source. It's
  1513. * possible that this happened because the user
  1514. * just pointed yyin at a new source and called
  1515. * yylex(). If so, then we have to assure
  1516. * consistency between YY_CURRENT_BUFFER and our
  1517. * globals. Here is the right place to do so, because
  1518. * this is the first action (other than possibly a
  1519. * back-up) that will match for the new input source.
  1520. */
  1521. yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
  1522. YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
  1523. YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
  1524. }
  1525. /* Note that here we test for yy_c_buf_p "<=" to the position
  1526. * of the first EOB in the buffer, since yy_c_buf_p will
  1527. * already have been incremented past the NUL character
  1528. * (since all states make transitions on EOB to the
  1529. * end-of-buffer state). Contrast this with the test
  1530. * in input().
  1531. */
  1532. if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
  1533. { /* This was really a NUL. */
  1534. yy_state_type yy_next_state;
  1535. yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
  1536. yy_current_state = yy_get_previous_state( yyscanner );
  1537. /* Okay, we're now positioned to make the NUL
  1538. * transition. We couldn't have
  1539. * yy_get_previous_state() go ahead and do it
  1540. * for us because it doesn't know how to deal
  1541. * with the possibility of jamming (and we don't
  1542. * want to build jamming into it because then it
  1543. * will run more slowly).
  1544. */
  1545. yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
  1546. yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
  1547. if ( yy_next_state )
  1548. {
  1549. /* Consume the NUL. */
  1550. yy_cp = ++yyg->yy_c_buf_p;
  1551. yy_current_state = yy_next_state;
  1552. goto yy_match;
  1553. }
  1554. else
  1555. {
  1556. yy_cp = yyg->yy_c_buf_p;
  1557. goto yy_find_action;
  1558. }
  1559. }
  1560. else switch ( yy_get_next_buffer( yyscanner ) )
  1561. {
  1562. case EOB_ACT_END_OF_FILE:
  1563. {
  1564. yyg->yy_did_buffer_switch_on_eof = 0;
  1565. if ( yywrap( yyscanner ) )
  1566. {
  1567. /* Note: because we've taken care in
  1568. * yy_get_next_buffer() to have set up
  1569. * yytext, we can now set up
  1570. * yy_c_buf_p so that if some total
  1571. * hoser (like flex itself) wants to
  1572. * call the scanner after we return the
  1573. * YY_NULL, it'll still work - another
  1574. * YY_NULL will get returned.
  1575. */
  1576. yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
  1577. yy_act = YY_STATE_EOF(YY_START);
  1578. goto do_action;
  1579. }
  1580. else
  1581. {
  1582. if ( ! yyg->yy_did_buffer_switch_on_eof )
  1583. YY_NEW_FILE;
  1584. }
  1585. break;
  1586. }
  1587. case EOB_ACT_CONTINUE_SCAN:
  1588. yyg->yy_c_buf_p =
  1589. yyg->yytext_ptr + yy_amount_of_matched_text;
  1590. yy_current_state = yy_get_previous_state( yyscanner );
  1591. yy_cp = yyg->yy_c_buf_p;
  1592. yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
  1593. goto yy_match;
  1594. case EOB_ACT_LAST_MATCH:
  1595. yyg->yy_c_buf_p =
  1596. &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
  1597. yy_current_state = yy_get_previous_state( yyscanner );
  1598. yy_cp = yyg->yy_c_buf_p;
  1599. yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
  1600. goto yy_find_action;
  1601. }
  1602. break;
  1603. }
  1604. default:
  1605. YY_FATAL_ERROR(
  1606. "fatal flex scanner internal error--no action found" );
  1607. } /* end of action switch */
  1608. } /* end of scanning one token */
  1609. } /* end of user's declarations */
  1610. } /* end of yylex */
  1611. /* yy_get_next_buffer - try to read in a new buffer
  1612. *
  1613. * Returns a code representing an action:
  1614. * EOB_ACT_LAST_MATCH -
  1615. * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
  1616. * EOB_ACT_END_OF_FILE - end of file
  1617. */
  1618. static int yy_get_next_buffer (yyscan_t yyscanner)
  1619. {
  1620. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  1621. char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
  1622. char *source = yyg->yytext_ptr;
  1623. int number_to_move, i;
  1624. int ret_val;
  1625. if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
  1626. YY_FATAL_ERROR(
  1627. "fatal flex scanner internal error--end of buffer missed" );
  1628. if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
  1629. { /* Don't try to fill the buffer, so this is an EOF. */
  1630. if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
  1631. {
  1632. /* We matched a single character, the EOB, so
  1633. * treat this as a final EOF.
  1634. */
  1635. return EOB_ACT_END_OF_FILE;
  1636. }
  1637. else
  1638. {
  1639. /* We matched some text prior to the EOB, first
  1640. * process it.
  1641. */
  1642. return EOB_ACT_LAST_MATCH;
  1643. }
  1644. }
  1645. /* Try to read more data. */
  1646. /* First move last chars to start of buffer. */
  1647. number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1);
  1648. for ( i = 0; i < number_to_move; ++i )
  1649. *(dest++) = *(source++);
  1650. if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
  1651. /* don't do the read, it's not guaranteed to return an EOF,
  1652. * just force an EOF
  1653. */
  1654. YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
  1655. else
  1656. {
  1657. int num_to_read =
  1658. YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
  1659. while ( num_to_read <= 0 )
  1660. { /* Not enough room in the buffer - grow it. */
  1661. /* just a shorter name for the current buffer */
  1662. YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
  1663. int yy_c_buf_p_offset =
  1664. (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
  1665. if ( b->yy_is_our_buffer )
  1666. {
  1667. int new_size = b->yy_buf_size * 2;
  1668. if ( new_size <= 0 )
  1669. b->yy_buf_size += b->yy_buf_size / 8;
  1670. else
  1671. b->yy_buf_size *= 2;
  1672. b->yy_ch_buf = (char *)
  1673. /* Include room in for 2 EOB chars. */
  1674. yyrealloc( (void *) b->yy_ch_buf,
  1675. (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
  1676. }
  1677. else
  1678. /* Can't grow it, we don't own it. */
  1679. b->yy_ch_buf = NULL;
  1680. if ( ! b->yy_ch_buf )
  1681. YY_FATAL_ERROR(
  1682. "fatal error - scanner input buffer overflow" );
  1683. yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
  1684. num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
  1685. number_to_move - 1;
  1686. }
  1687. if ( num_to_read > YY_READ_BUF_SIZE )
  1688. num_to_read = YY_READ_BUF_SIZE;
  1689. /* Read in more data. */
  1690. YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
  1691. yyg->yy_n_chars, num_to_read );
  1692. YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
  1693. }
  1694. if ( yyg->yy_n_chars == 0 )
  1695. {
  1696. if ( number_to_move == YY_MORE_ADJ )
  1697. {
  1698. ret_val = EOB_ACT_END_OF_FILE;
  1699. yyrestart( yyin , yyscanner);
  1700. }
  1701. else
  1702. {
  1703. ret_val = EOB_ACT_LAST_MATCH;
  1704. YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
  1705. YY_BUFFER_EOF_PENDING;
  1706. }
  1707. }
  1708. else
  1709. ret_val = EOB_ACT_CONTINUE_SCAN;
  1710. if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
  1711. /* Extend the array by 50%, plus the number we really need. */
  1712. int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
  1713. YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
  1714. (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner );
  1715. if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
  1716. YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
  1717. /* "- 2" to take care of EOB's */
  1718. YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
  1719. }
  1720. yyg->yy_n_chars += number_to_move;
  1721. YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
  1722. YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
  1723. yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
  1724. return ret_val;
  1725. }
  1726. /* yy_get_previous_state - get the state just before the EOB char was reached */
  1727. static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
  1728. {
  1729. yy_state_type yy_current_state;
  1730. char *yy_cp;
  1731. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  1732. yy_current_state = yyg->yy_start;
  1733. for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
  1734. {
  1735. YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
  1736. if ( yy_accept[yy_current_state] )
  1737. {
  1738. yyg->yy_last_accepting_state = yy_current_state;
  1739. yyg->yy_last_accepting_cpos = yy_cp;
  1740. }
  1741. while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  1742. {
  1743. yy_current_state = (int) yy_def[yy_current_state];
  1744. if ( yy_current_state >= 393 )
  1745. yy_c = yy_meta[yy_c];
  1746. }
  1747. yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
  1748. }
  1749. return yy_current_state;
  1750. }
  1751. /* yy_try_NUL_trans - try to make a transition on the NUL character
  1752. *
  1753. * synopsis
  1754. * next_state = yy_try_NUL_trans( current_state );
  1755. */
  1756. static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
  1757. {
  1758. int yy_is_jam;
  1759. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
  1760. char *yy_cp = yyg->yy_c_buf_p;
  1761. YY_CHAR yy_c = 1;
  1762. if ( yy_accept[yy_current_state] )
  1763. {
  1764. yyg->yy_last_accepting_state = yy_current_state;
  1765. yyg->yy_last_accepting_cpos = yy_cp;
  1766. }
  1767. while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  1768. {
  1769. yy_current_state = (int) yy_def[yy_current_state];
  1770. if ( yy_current_state >= 393 )
  1771. yy_c = yy_meta[yy_c];
  1772. }
  1773. yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
  1774. yy_is_jam = (yy_current_state == 392);
  1775. (void)yyg;
  1776. return yy_is_jam ? 0 : yy_current_state;
  1777. }
  1778. #ifndef YY_NO_UNPUT
  1779. #endif
  1780. #ifndef YY_NO_INPUT
  1781. #ifdef __cplusplus
  1782. static int yyinput (yyscan_t yyscanner)
  1783. #else
  1784. static int input (yyscan_t yyscanner)
  1785. #endif
  1786. {
  1787. int c;
  1788. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  1789. *yyg->yy_c_buf_p = yyg->yy_hold_char;
  1790. if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
  1791. {
  1792. /* yy_c_buf_p now points to the character we want to return.
  1793. * If this occurs *before* the EOB characters, then it's a
  1794. * valid NUL; if not, then we've hit the end of the buffer.
  1795. */
  1796. if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
  1797. /* This was really a NUL. */
  1798. *yyg->yy_c_buf_p = '\0';
  1799. else
  1800. { /* need more input */
  1801. int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr);
  1802. ++yyg->yy_c_buf_p;
  1803. switch ( yy_get_next_buffer( yyscanner ) )
  1804. {
  1805. case EOB_ACT_LAST_MATCH:
  1806. /* This happens because yy_g_n_b()
  1807. * sees that we've accumulated a
  1808. * token and flags that we need to
  1809. * try matching the token before
  1810. * proceeding. But for input(),
  1811. * there's no matching to consider.
  1812. * So convert the EOB_ACT_LAST_MATCH
  1813. * to EOB_ACT_END_OF_FILE.
  1814. */
  1815. /* Reset buffer status. */
  1816. yyrestart( yyin , yyscanner);
  1817. /*FALLTHROUGH*/
  1818. case EOB_ACT_END_OF_FILE:
  1819. {
  1820. if ( yywrap( yyscanner ) )
  1821. return 0;
  1822. if ( ! yyg->yy_did_buffer_switch_on_eof )
  1823. YY_NEW_FILE;
  1824. #ifdef __cplusplus
  1825. return yyinput(yyscanner);
  1826. #else
  1827. return input(yyscanner);
  1828. #endif
  1829. }
  1830. case EOB_ACT_CONTINUE_SCAN:
  1831. yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
  1832. break;
  1833. }
  1834. }
  1835. }
  1836. c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */
  1837. *yyg->yy_c_buf_p = '\0'; /* preserve yytext */
  1838. yyg->yy_hold_char = *++yyg->yy_c_buf_p;
  1839. return c;
  1840. }
  1841. #endif /* ifndef YY_NO_INPUT */
  1842. /** Immediately switch to a different input stream.
  1843. * @param input_file A readable stream.
  1844. * @param yyscanner The scanner object.
  1845. * @note This function does not reset the start condition to @c INITIAL .
  1846. */
  1847. void yyrestart (FILE * input_file , yyscan_t yyscanner)
  1848. {
  1849. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  1850. if ( ! YY_CURRENT_BUFFER ){
  1851. yyensure_buffer_stack (yyscanner);
  1852. YY_CURRENT_BUFFER_LVALUE =
  1853. yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
  1854. }
  1855. yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner);
  1856. yy_load_buffer_state( yyscanner );
  1857. }
  1858. /** Switch to a different input buffer.
  1859. * @param new_buffer The new input buffer.
  1860. * @param yyscanner The scanner object.
  1861. */
  1862. void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
  1863. {
  1864. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  1865. /* TODO. We should be able to replace this entire function body
  1866. * with
  1867. * yypop_buffer_state();
  1868. * yypush_buffer_state(new_buffer);
  1869. */
  1870. yyensure_buffer_stack (yyscanner);
  1871. if ( YY_CURRENT_BUFFER == new_buffer )
  1872. return;
  1873. if ( YY_CURRENT_BUFFER )
  1874. {
  1875. /* Flush out information for old buffer. */
  1876. *yyg->yy_c_buf_p = yyg->yy_hold_char;
  1877. YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
  1878. YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
  1879. }
  1880. YY_CURRENT_BUFFER_LVALUE = new_buffer;
  1881. yy_load_buffer_state( yyscanner );
  1882. /* We don't actually know whether we did this switch during
  1883. * EOF (yywrap()) processing, but the only time this flag
  1884. * is looked at is after yywrap() is called, so it's safe
  1885. * to go ahead and always set it.
  1886. */
  1887. yyg->yy_did_buffer_switch_on_eof = 1;
  1888. }
  1889. static void yy_load_buffer_state (yyscan_t yyscanner)
  1890. {
  1891. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  1892. yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
  1893. yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
  1894. yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
  1895. yyg->yy_hold_char = *yyg->yy_c_buf_p;
  1896. }
  1897. /** Allocate and initialize an input buffer state.
  1898. * @param file A readable stream.
  1899. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
  1900. * @param yyscanner The scanner object.
  1901. * @return the allocated buffer state.
  1902. */
  1903. YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)
  1904. {
  1905. YY_BUFFER_STATE b;
  1906. b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
  1907. if ( ! b )
  1908. YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
  1909. b->yy_buf_size = size;
  1910. /* yy_ch_buf has to be 2 characters longer than the size given because
  1911. * we need to put in 2 end-of-buffer characters.
  1912. */
  1913. b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
  1914. if ( ! b->yy_ch_buf )
  1915. YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
  1916. b->yy_is_our_buffer = 1;
  1917. yy_init_buffer( b, file , yyscanner);
  1918. return b;
  1919. }
  1920. /** Destroy the buffer.
  1921. * @param b a buffer created with yy_create_buffer()
  1922. * @param yyscanner The scanner object.
  1923. */
  1924. void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
  1925. {
  1926. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  1927. if ( ! b )
  1928. return;
  1929. if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
  1930. YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
  1931. if ( b->yy_is_our_buffer )
  1932. yyfree( (void *) b->yy_ch_buf , yyscanner );
  1933. yyfree( (void *) b , yyscanner );
  1934. }
  1935. /* Initializes or reinitializes a buffer.
  1936. * This function is sometimes called more than once on the same buffer,
  1937. * such as during a yyrestart() or at EOF.
  1938. */
  1939. static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
  1940. {
  1941. int oerrno = errno;
  1942. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  1943. yy_flush_buffer( b , yyscanner);
  1944. b->yy_input_file = file;
  1945. b->yy_fill_buffer = 1;
  1946. /* If b is the current buffer, then yy_init_buffer was _probably_
  1947. * called from yyrestart() or through yy_get_next_buffer.
  1948. * In that case, we don't want to reset the lineno or column.
  1949. */
  1950. if (b != YY_CURRENT_BUFFER){
  1951. b->yy_bs_lineno = 1;
  1952. b->yy_bs_column = 0;
  1953. }
  1954. b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
  1955. errno = oerrno;
  1956. }
  1957. /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
  1958. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
  1959. * @param yyscanner The scanner object.
  1960. */
  1961. void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
  1962. {
  1963. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  1964. if ( ! b )
  1965. return;
  1966. b->yy_n_chars = 0;
  1967. /* We always need two end-of-buffer characters. The first causes
  1968. * a transition to the end-of-buffer state. The second causes
  1969. * a jam in that state.
  1970. */
  1971. b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
  1972. b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
  1973. b->yy_buf_pos = &b->yy_ch_buf[0];
  1974. b->yy_at_bol = 1;
  1975. b->yy_buffer_status = YY_BUFFER_NEW;
  1976. if ( b == YY_CURRENT_BUFFER )
  1977. yy_load_buffer_state( yyscanner );
  1978. }
  1979. /** Pushes the new state onto the stack. The new state becomes
  1980. * the current state. This function will allocate the stack
  1981. * if necessary.
  1982. * @param new_buffer The new state.
  1983. * @param yyscanner The scanner object.
  1984. */
  1985. void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
  1986. {
  1987. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  1988. if (new_buffer == NULL)
  1989. return;
  1990. yyensure_buffer_stack(yyscanner);
  1991. /* This block is copied from yy_switch_to_buffer. */
  1992. if ( YY_CURRENT_BUFFER )
  1993. {
  1994. /* Flush out information for old buffer. */
  1995. *yyg->yy_c_buf_p = yyg->yy_hold_char;
  1996. YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
  1997. YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
  1998. }
  1999. /* Only push if top exists. Otherwise, replace top. */
  2000. if (YY_CURRENT_BUFFER)
  2001. yyg->yy_buffer_stack_top++;
  2002. YY_CURRENT_BUFFER_LVALUE = new_buffer;
  2003. /* copied from yy_switch_to_buffer. */
  2004. yy_load_buffer_state( yyscanner );
  2005. yyg->yy_did_buffer_switch_on_eof = 1;
  2006. }
  2007. /** Removes and deletes the top of the stack, if present.
  2008. * The next element becomes the new top.
  2009. * @param yyscanner The scanner object.
  2010. */
  2011. void yypop_buffer_state (yyscan_t yyscanner)
  2012. {
  2013. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  2014. if (!YY_CURRENT_BUFFER)
  2015. return;
  2016. yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner);
  2017. YY_CURRENT_BUFFER_LVALUE = NULL;
  2018. if (yyg->yy_buffer_stack_top > 0)
  2019. --yyg->yy_buffer_stack_top;
  2020. if (YY_CURRENT_BUFFER) {
  2021. yy_load_buffer_state( yyscanner );
  2022. yyg->yy_did_buffer_switch_on_eof = 1;
  2023. }
  2024. }
  2025. /* Allocates the stack if it does not exist.
  2026. * Guarantees space for at least one push.
  2027. */
  2028. static void yyensure_buffer_stack (yyscan_t yyscanner)
  2029. {
  2030. yy_size_t num_to_alloc;
  2031. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  2032. if (!yyg->yy_buffer_stack) {
  2033. /* First allocation is just for 2 elements, since we don't know if this
  2034. * scanner will even need a stack. We use 2 instead of 1 to avoid an
  2035. * immediate realloc on the next call.
  2036. */
  2037. num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
  2038. yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc
  2039. (num_to_alloc * sizeof(struct yy_buffer_state*)
  2040. , yyscanner);
  2041. if ( ! yyg->yy_buffer_stack )
  2042. YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
  2043. memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
  2044. yyg->yy_buffer_stack_max = num_to_alloc;
  2045. yyg->yy_buffer_stack_top = 0;
  2046. return;
  2047. }
  2048. if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
  2049. /* Increase the buffer to prepare for a possible push. */
  2050. yy_size_t grow_size = 8 /* arbitrary grow size */;
  2051. num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
  2052. yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc
  2053. (yyg->yy_buffer_stack,
  2054. num_to_alloc * sizeof(struct yy_buffer_state*)
  2055. , yyscanner);
  2056. if ( ! yyg->yy_buffer_stack )
  2057. YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
  2058. /* zero only the new slots.*/
  2059. memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
  2060. yyg->yy_buffer_stack_max = num_to_alloc;
  2061. }
  2062. }
  2063. /** Setup the input buffer state to scan directly from a user-specified character buffer.
  2064. * @param base the character buffer
  2065. * @param size the size in bytes of the character buffer
  2066. * @param yyscanner The scanner object.
  2067. * @return the newly allocated buffer state object.
  2068. */
  2069. YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
  2070. {
  2071. YY_BUFFER_STATE b;
  2072. if ( size < 2 ||
  2073. base[size-2] != YY_END_OF_BUFFER_CHAR ||
  2074. base[size-1] != YY_END_OF_BUFFER_CHAR )
  2075. /* They forgot to leave room for the EOB's. */
  2076. return NULL;
  2077. b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
  2078. if ( ! b )
  2079. YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
  2080. b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
  2081. b->yy_buf_pos = b->yy_ch_buf = base;
  2082. b->yy_is_our_buffer = 0;
  2083. b->yy_input_file = NULL;
  2084. b->yy_n_chars = b->yy_buf_size;
  2085. b->yy_is_interactive = 0;
  2086. b->yy_at_bol = 1;
  2087. b->yy_fill_buffer = 0;
  2088. b->yy_buffer_status = YY_BUFFER_NEW;
  2089. yy_switch_to_buffer( b , yyscanner );
  2090. return b;
  2091. }
  2092. /** Setup the input buffer state to scan a string. The next call to yylex() will
  2093. * scan from a @e copy of @a str.
  2094. * @param yystr a NUL-terminated string to scan
  2095. * @param yyscanner The scanner object.
  2096. * @return the newly allocated buffer state object.
  2097. * @note If you want to scan bytes that may contain NUL values, then use
  2098. * yy_scan_bytes() instead.
  2099. */
  2100. YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner)
  2101. {
  2102. return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner);
  2103. }
  2104. /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
  2105. * scan from a @e copy of @a bytes.
  2106. * @param yybytes the byte buffer to scan
  2107. * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
  2108. * @param yyscanner The scanner object.
  2109. * @return the newly allocated buffer state object.
  2110. */
  2111. YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner)
  2112. {
  2113. YY_BUFFER_STATE b;
  2114. char *buf;
  2115. yy_size_t n;
  2116. int i;
  2117. /* Get memory for full buffer, including space for trailing EOB's. */
  2118. n = (yy_size_t) (_yybytes_len + 2);
  2119. buf = (char *) yyalloc( n , yyscanner );
  2120. if ( ! buf )
  2121. YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
  2122. for ( i = 0; i < _yybytes_len; ++i )
  2123. buf[i] = yybytes[i];
  2124. buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
  2125. b = yy_scan_buffer( buf, n , yyscanner);
  2126. if ( ! b )
  2127. YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
  2128. /* It's okay to grow etc. this buffer, and we should throw it
  2129. * away when we're done.
  2130. */
  2131. b->yy_is_our_buffer = 1;
  2132. return b;
  2133. }
  2134. #ifndef YY_EXIT_FAILURE
  2135. #define YY_EXIT_FAILURE 2
  2136. #endif
  2137. static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner)
  2138. {
  2139. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  2140. (void)yyg;
  2141. fprintf( stderr, "%s\n", msg );
  2142. exit( YY_EXIT_FAILURE );
  2143. }
  2144. /* Redefine yyless() so it works in section 3 code. */
  2145. #undef yyless
  2146. #define yyless(n) \
  2147. do \
  2148. { \
  2149. /* Undo effects of setting up yytext. */ \
  2150. int yyless_macro_arg = (n); \
  2151. YY_LESS_LINENO(yyless_macro_arg);\
  2152. yytext[yyleng] = yyg->yy_hold_char; \
  2153. yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
  2154. yyg->yy_hold_char = *yyg->yy_c_buf_p; \
  2155. *yyg->yy_c_buf_p = '\0'; \
  2156. yyleng = yyless_macro_arg; \
  2157. } \
  2158. while ( 0 )
  2159. /* Accessor methods (get/set functions) to struct members. */
  2160. /** Get the user-defined data for this scanner.
  2161. * @param yyscanner The scanner object.
  2162. */
  2163. YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner)
  2164. {
  2165. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  2166. return yyextra;
  2167. }
  2168. /** Get the current line number.
  2169. * @param yyscanner The scanner object.
  2170. */
  2171. int yyget_lineno (yyscan_t yyscanner)
  2172. {
  2173. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  2174. if (! YY_CURRENT_BUFFER)
  2175. return 0;
  2176. return yylineno;
  2177. }
  2178. /** Get the current column number.
  2179. * @param yyscanner The scanner object.
  2180. */
  2181. int yyget_column (yyscan_t yyscanner)
  2182. {
  2183. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  2184. if (! YY_CURRENT_BUFFER)
  2185. return 0;
  2186. return yycolumn;
  2187. }
  2188. /** Get the input stream.
  2189. * @param yyscanner The scanner object.
  2190. */
  2191. FILE *yyget_in (yyscan_t yyscanner)
  2192. {
  2193. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  2194. return yyin;
  2195. }
  2196. /** Get the output stream.
  2197. * @param yyscanner The scanner object.
  2198. */
  2199. FILE *yyget_out (yyscan_t yyscanner)
  2200. {
  2201. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  2202. return yyout;
  2203. }
  2204. /** Get the length of the current token.
  2205. * @param yyscanner The scanner object.
  2206. */
  2207. int yyget_leng (yyscan_t yyscanner)
  2208. {
  2209. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  2210. return yyleng;
  2211. }
  2212. /** Get the current token.
  2213. * @param yyscanner The scanner object.
  2214. */
  2215. char *yyget_text (yyscan_t yyscanner)
  2216. {
  2217. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  2218. return yytext;
  2219. }
  2220. /** Set the user-defined data. This data is never touched by the scanner.
  2221. * @param user_defined The data to be associated with this scanner.
  2222. * @param yyscanner The scanner object.
  2223. */
  2224. void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
  2225. {
  2226. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  2227. yyextra = user_defined ;
  2228. }
  2229. /** Set the current line number.
  2230. * @param _line_number line number
  2231. * @param yyscanner The scanner object.
  2232. */
  2233. void yyset_lineno (int _line_number , yyscan_t yyscanner)
  2234. {
  2235. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  2236. /* lineno is only valid if an input buffer exists. */
  2237. if (! YY_CURRENT_BUFFER )
  2238. YY_FATAL_ERROR( "yyset_lineno called with no buffer" );
  2239. yylineno = _line_number;
  2240. }
  2241. /** Set the current column.
  2242. * @param _column_no column number
  2243. * @param yyscanner The scanner object.
  2244. */
  2245. void yyset_column (int _column_no , yyscan_t yyscanner)
  2246. {
  2247. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  2248. /* column is only valid if an input buffer exists. */
  2249. if (! YY_CURRENT_BUFFER )
  2250. YY_FATAL_ERROR( "yyset_column called with no buffer" );
  2251. yycolumn = _column_no;
  2252. }
  2253. /** Set the input stream. This does not discard the current
  2254. * input buffer.
  2255. * @param _in_str A readable stream.
  2256. * @param yyscanner The scanner object.
  2257. * @see yy_switch_to_buffer
  2258. */
  2259. void yyset_in (FILE * _in_str , yyscan_t yyscanner)
  2260. {
  2261. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  2262. yyin = _in_str ;
  2263. }
  2264. void yyset_out (FILE * _out_str , yyscan_t yyscanner)
  2265. {
  2266. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  2267. yyout = _out_str ;
  2268. }
  2269. int yyget_debug (yyscan_t yyscanner)
  2270. {
  2271. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  2272. return yy_flex_debug;
  2273. }
  2274. void yyset_debug (int _bdebug , yyscan_t yyscanner)
  2275. {
  2276. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  2277. yy_flex_debug = _bdebug ;
  2278. }
  2279. /* Accessor methods for yylval and yylloc */
  2280. YYSTYPE * yyget_lval (yyscan_t yyscanner)
  2281. {
  2282. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  2283. return yylval;
  2284. }
  2285. void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner)
  2286. {
  2287. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  2288. yylval = yylval_param;
  2289. }
  2290. /* User-visible API */
  2291. /* yylex_init is special because it creates the scanner itself, so it is
  2292. * the ONLY reentrant function that doesn't take the scanner as the last argument.
  2293. * That's why we explicitly handle the declaration, instead of using our macros.
  2294. */
  2295. int yylex_init(yyscan_t* ptr_yy_globals)
  2296. {
  2297. if (ptr_yy_globals == NULL){
  2298. errno = EINVAL;
  2299. return 1;
  2300. }
  2301. *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL );
  2302. if (*ptr_yy_globals == NULL){
  2303. errno = ENOMEM;
  2304. return 1;
  2305. }
  2306. /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
  2307. memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
  2308. return yy_init_globals ( *ptr_yy_globals );
  2309. }
  2310. /* yylex_init_extra has the same functionality as yylex_init, but follows the
  2311. * convention of taking the scanner as the last argument. Note however, that
  2312. * this is a *pointer* to a scanner, as it will be allocated by this call (and
  2313. * is the reason, too, why this function also must handle its own declaration).
  2314. * The user defined value in the first argument will be available to yyalloc in
  2315. * the yyextra field.
  2316. */
  2317. int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals )
  2318. {
  2319. struct yyguts_t dummy_yyguts;
  2320. yyset_extra (yy_user_defined, &dummy_yyguts);
  2321. if (ptr_yy_globals == NULL){
  2322. errno = EINVAL;
  2323. return 1;
  2324. }
  2325. *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
  2326. if (*ptr_yy_globals == NULL){
  2327. errno = ENOMEM;
  2328. return 1;
  2329. }
  2330. /* By setting to 0xAA, we expose bugs in
  2331. yy_init_globals. Leave at 0x00 for releases. */
  2332. memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
  2333. yyset_extra (yy_user_defined, *ptr_yy_globals);
  2334. return yy_init_globals ( *ptr_yy_globals );
  2335. }
  2336. static int yy_init_globals (yyscan_t yyscanner)
  2337. {
  2338. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  2339. /* Initialization is the same as for the non-reentrant scanner.
  2340. * This function is called from yylex_destroy(), so don't allocate here.
  2341. */
  2342. yyg->yy_buffer_stack = NULL;
  2343. yyg->yy_buffer_stack_top = 0;
  2344. yyg->yy_buffer_stack_max = 0;
  2345. yyg->yy_c_buf_p = NULL;
  2346. yyg->yy_init = 0;
  2347. yyg->yy_start = 0;
  2348. yyg->yy_start_stack_ptr = 0;
  2349. yyg->yy_start_stack_depth = 0;
  2350. yyg->yy_start_stack = NULL;
  2351. /* Defined in main.c */
  2352. #ifdef YY_STDINIT
  2353. yyin = stdin;
  2354. yyout = stdout;
  2355. #else
  2356. yyin = NULL;
  2357. yyout = NULL;
  2358. #endif
  2359. /* For future reference: Set errno on error, since we are called by
  2360. * yylex_init()
  2361. */
  2362. return 0;
  2363. }
  2364. /* yylex_destroy is for both reentrant and non-reentrant scanners. */
  2365. int yylex_destroy (yyscan_t yyscanner)
  2366. {
  2367. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  2368. /* Pop the buffer stack, destroying each element. */
  2369. while(YY_CURRENT_BUFFER){
  2370. yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner );
  2371. YY_CURRENT_BUFFER_LVALUE = NULL;
  2372. yypop_buffer_state(yyscanner);
  2373. }
  2374. /* Destroy the stack itself. */
  2375. yyfree(yyg->yy_buffer_stack , yyscanner);
  2376. yyg->yy_buffer_stack = NULL;
  2377. /* Destroy the start condition stack. */
  2378. yyfree( yyg->yy_start_stack , yyscanner );
  2379. yyg->yy_start_stack = NULL;
  2380. /* Reset the globals. This is important in a non-reentrant scanner so the next time
  2381. * yylex() is called, initialization will occur. */
  2382. yy_init_globals( yyscanner);
  2383. /* Destroy the main struct (reentrant only). */
  2384. yyfree ( yyscanner , yyscanner );
  2385. yyscanner = NULL;
  2386. return 0;
  2387. }
  2388. /*
  2389. * Internal utility routines.
  2390. */
  2391. #ifndef yytext_ptr
  2392. static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner)
  2393. {
  2394. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  2395. (void)yyg;
  2396. int i;
  2397. for ( i = 0; i < n; ++i )
  2398. s1[i] = s2[i];
  2399. }
  2400. #endif
  2401. #ifdef YY_NEED_STRLEN
  2402. static int yy_flex_strlen (const char * s , yyscan_t yyscanner)
  2403. {
  2404. int n;
  2405. for ( n = 0; s[n]; ++n )
  2406. ;
  2407. return n;
  2408. }
  2409. #endif
  2410. void *yyalloc (yy_size_t size , yyscan_t yyscanner)
  2411. {
  2412. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  2413. (void)yyg;
  2414. return malloc(size);
  2415. }
  2416. void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
  2417. {
  2418. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  2419. (void)yyg;
  2420. /* The cast to (char *) in the following accommodates both
  2421. * implementations that use char* generic pointers, and those
  2422. * that use void* generic pointers. It works with the latter
  2423. * because both ANSI C and C++ allow castless assignment from
  2424. * any pointer type to void*, and deal with argument conversions
  2425. * as though doing an assignment.
  2426. */
  2427. return realloc(ptr, size);
  2428. }
  2429. void yyfree (void * ptr , yyscan_t yyscanner)
  2430. {
  2431. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  2432. (void)yyg;
  2433. free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
  2434. }
  2435. #define YYTABLES_NAME "yytables"
  2436. #line 163 "route/cls/ematch_grammar.l"