gmlscan.c 61 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409
  1. #line 2 "gmlscan.c"
  2. #line 4 "gmlscan.c"
  3. #define YY_INT_ALIGNED short int
  4. /* A lexical scanner generated by flex */
  5. #define yy_create_buffer gml_create_buffer
  6. #define yy_delete_buffer gml_delete_buffer
  7. #define yy_scan_buffer gml_scan_buffer
  8. #define yy_scan_string gml_scan_string
  9. #define yy_scan_bytes gml_scan_bytes
  10. #define yy_init_buffer gml_init_buffer
  11. #define yy_flush_buffer gml_flush_buffer
  12. #define yy_load_buffer_state gml_load_buffer_state
  13. #define yy_switch_to_buffer gml_switch_to_buffer
  14. #define yypush_buffer_state gmlpush_buffer_state
  15. #define yypop_buffer_state gmlpop_buffer_state
  16. #define yyensure_buffer_stack gmlensure_buffer_stack
  17. #define yy_flex_debug gml_flex_debug
  18. #define yyin gmlin
  19. #define yyleng gmlleng
  20. #define yylex gmllex
  21. #define yylineno gmllineno
  22. #define yyout gmlout
  23. #define yyrestart gmlrestart
  24. #define yytext gmltext
  25. #define yywrap gmlwrap
  26. #define yyalloc gmlalloc
  27. #define yyrealloc gmlrealloc
  28. #define yyfree gmlfree
  29. #define FLEX_SCANNER
  30. #define YY_FLEX_MAJOR_VERSION 2
  31. #define YY_FLEX_MINOR_VERSION 6
  32. #define YY_FLEX_SUBMINOR_VERSION 4
  33. #if YY_FLEX_SUBMINOR_VERSION > 0
  34. #define FLEX_BETA
  35. #endif
  36. #ifdef yy_create_buffer
  37. #define gml_create_buffer_ALREADY_DEFINED
  38. #else
  39. #define yy_create_buffer gml_create_buffer
  40. #endif
  41. #ifdef yy_delete_buffer
  42. #define gml_delete_buffer_ALREADY_DEFINED
  43. #else
  44. #define yy_delete_buffer gml_delete_buffer
  45. #endif
  46. #ifdef yy_scan_buffer
  47. #define gml_scan_buffer_ALREADY_DEFINED
  48. #else
  49. #define yy_scan_buffer gml_scan_buffer
  50. #endif
  51. #ifdef yy_scan_string
  52. #define gml_scan_string_ALREADY_DEFINED
  53. #else
  54. #define yy_scan_string gml_scan_string
  55. #endif
  56. #ifdef yy_scan_bytes
  57. #define gml_scan_bytes_ALREADY_DEFINED
  58. #else
  59. #define yy_scan_bytes gml_scan_bytes
  60. #endif
  61. #ifdef yy_init_buffer
  62. #define gml_init_buffer_ALREADY_DEFINED
  63. #else
  64. #define yy_init_buffer gml_init_buffer
  65. #endif
  66. #ifdef yy_flush_buffer
  67. #define gml_flush_buffer_ALREADY_DEFINED
  68. #else
  69. #define yy_flush_buffer gml_flush_buffer
  70. #endif
  71. #ifdef yy_load_buffer_state
  72. #define gml_load_buffer_state_ALREADY_DEFINED
  73. #else
  74. #define yy_load_buffer_state gml_load_buffer_state
  75. #endif
  76. #ifdef yy_switch_to_buffer
  77. #define gml_switch_to_buffer_ALREADY_DEFINED
  78. #else
  79. #define yy_switch_to_buffer gml_switch_to_buffer
  80. #endif
  81. #ifdef yypush_buffer_state
  82. #define gmlpush_buffer_state_ALREADY_DEFINED
  83. #else
  84. #define yypush_buffer_state gmlpush_buffer_state
  85. #endif
  86. #ifdef yypop_buffer_state
  87. #define gmlpop_buffer_state_ALREADY_DEFINED
  88. #else
  89. #define yypop_buffer_state gmlpop_buffer_state
  90. #endif
  91. #ifdef yyensure_buffer_stack
  92. #define gmlensure_buffer_stack_ALREADY_DEFINED
  93. #else
  94. #define yyensure_buffer_stack gmlensure_buffer_stack
  95. #endif
  96. #ifdef yylex
  97. #define gmllex_ALREADY_DEFINED
  98. #else
  99. #define yylex gmllex
  100. #endif
  101. #ifdef yyrestart
  102. #define gmlrestart_ALREADY_DEFINED
  103. #else
  104. #define yyrestart gmlrestart
  105. #endif
  106. #ifdef yylex_init
  107. #define gmllex_init_ALREADY_DEFINED
  108. #else
  109. #define yylex_init gmllex_init
  110. #endif
  111. #ifdef yylex_init_extra
  112. #define gmllex_init_extra_ALREADY_DEFINED
  113. #else
  114. #define yylex_init_extra gmllex_init_extra
  115. #endif
  116. #ifdef yylex_destroy
  117. #define gmllex_destroy_ALREADY_DEFINED
  118. #else
  119. #define yylex_destroy gmllex_destroy
  120. #endif
  121. #ifdef yyget_debug
  122. #define gmlget_debug_ALREADY_DEFINED
  123. #else
  124. #define yyget_debug gmlget_debug
  125. #endif
  126. #ifdef yyset_debug
  127. #define gmlset_debug_ALREADY_DEFINED
  128. #else
  129. #define yyset_debug gmlset_debug
  130. #endif
  131. #ifdef yyget_extra
  132. #define gmlget_extra_ALREADY_DEFINED
  133. #else
  134. #define yyget_extra gmlget_extra
  135. #endif
  136. #ifdef yyset_extra
  137. #define gmlset_extra_ALREADY_DEFINED
  138. #else
  139. #define yyset_extra gmlset_extra
  140. #endif
  141. #ifdef yyget_in
  142. #define gmlget_in_ALREADY_DEFINED
  143. #else
  144. #define yyget_in gmlget_in
  145. #endif
  146. #ifdef yyset_in
  147. #define gmlset_in_ALREADY_DEFINED
  148. #else
  149. #define yyset_in gmlset_in
  150. #endif
  151. #ifdef yyget_out
  152. #define gmlget_out_ALREADY_DEFINED
  153. #else
  154. #define yyget_out gmlget_out
  155. #endif
  156. #ifdef yyset_out
  157. #define gmlset_out_ALREADY_DEFINED
  158. #else
  159. #define yyset_out gmlset_out
  160. #endif
  161. #ifdef yyget_leng
  162. #define gmlget_leng_ALREADY_DEFINED
  163. #else
  164. #define yyget_leng gmlget_leng
  165. #endif
  166. #ifdef yyget_text
  167. #define gmlget_text_ALREADY_DEFINED
  168. #else
  169. #define yyget_text gmlget_text
  170. #endif
  171. #ifdef yyget_lineno
  172. #define gmlget_lineno_ALREADY_DEFINED
  173. #else
  174. #define yyget_lineno gmlget_lineno
  175. #endif
  176. #ifdef yyset_lineno
  177. #define gmlset_lineno_ALREADY_DEFINED
  178. #else
  179. #define yyset_lineno gmlset_lineno
  180. #endif
  181. #ifdef yywrap
  182. #define gmlwrap_ALREADY_DEFINED
  183. #else
  184. #define yywrap gmlwrap
  185. #endif
  186. #ifdef yyalloc
  187. #define gmlalloc_ALREADY_DEFINED
  188. #else
  189. #define yyalloc gmlalloc
  190. #endif
  191. #ifdef yyrealloc
  192. #define gmlrealloc_ALREADY_DEFINED
  193. #else
  194. #define yyrealloc gmlrealloc
  195. #endif
  196. #ifdef yyfree
  197. #define gmlfree_ALREADY_DEFINED
  198. #else
  199. #define yyfree gmlfree
  200. #endif
  201. #ifdef yytext
  202. #define gmltext_ALREADY_DEFINED
  203. #else
  204. #define yytext gmltext
  205. #endif
  206. #ifdef yyleng
  207. #define gmlleng_ALREADY_DEFINED
  208. #else
  209. #define yyleng gmlleng
  210. #endif
  211. #ifdef yyin
  212. #define gmlin_ALREADY_DEFINED
  213. #else
  214. #define yyin gmlin
  215. #endif
  216. #ifdef yyout
  217. #define gmlout_ALREADY_DEFINED
  218. #else
  219. #define yyout gmlout
  220. #endif
  221. #ifdef yy_flex_debug
  222. #define gml_flex_debug_ALREADY_DEFINED
  223. #else
  224. #define yy_flex_debug gml_flex_debug
  225. #endif
  226. #ifdef yylineno
  227. #define gmllineno_ALREADY_DEFINED
  228. #else
  229. #define yylineno gmllineno
  230. #endif
  231. /* First, we deal with platform-specific or compiler-specific issues. */
  232. /* begin standard C headers. */
  233. #include <stdio.h>
  234. #include <string.h>
  235. #include <errno.h>
  236. #include <stdlib.h>
  237. /* end standard C headers. */
  238. /* flex integer type definitions */
  239. #ifndef FLEXINT_H
  240. #define FLEXINT_H
  241. /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
  242. #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
  243. /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
  244. * if you want the limit (max/min) macros for int types.
  245. */
  246. #ifndef __STDC_LIMIT_MACROS
  247. #define __STDC_LIMIT_MACROS 1
  248. #endif
  249. #include <inttypes.h>
  250. typedef int8_t flex_int8_t;
  251. typedef uint8_t flex_uint8_t;
  252. typedef int16_t flex_int16_t;
  253. typedef uint16_t flex_uint16_t;
  254. typedef int32_t flex_int32_t;
  255. typedef uint32_t flex_uint32_t;
  256. #else
  257. typedef signed char flex_int8_t;
  258. typedef short int flex_int16_t;
  259. typedef int flex_int32_t;
  260. typedef unsigned char flex_uint8_t;
  261. typedef unsigned short int flex_uint16_t;
  262. typedef unsigned int flex_uint32_t;
  263. /* Limits of integral types. */
  264. #ifndef INT8_MIN
  265. #define INT8_MIN (-128)
  266. #endif
  267. #ifndef INT16_MIN
  268. #define INT16_MIN (-32767-1)
  269. #endif
  270. #ifndef INT32_MIN
  271. #define INT32_MIN (-2147483647-1)
  272. #endif
  273. #ifndef INT8_MAX
  274. #define INT8_MAX (127)
  275. #endif
  276. #ifndef INT16_MAX
  277. #define INT16_MAX (32767)
  278. #endif
  279. #ifndef INT32_MAX
  280. #define INT32_MAX (2147483647)
  281. #endif
  282. #ifndef UINT8_MAX
  283. #define UINT8_MAX (255U)
  284. #endif
  285. #ifndef UINT16_MAX
  286. #define UINT16_MAX (65535U)
  287. #endif
  288. #ifndef UINT32_MAX
  289. #define UINT32_MAX (4294967295U)
  290. #endif
  291. #ifndef SIZE_MAX
  292. #define SIZE_MAX (~(size_t)0)
  293. #endif
  294. #endif /* ! C99 */
  295. #endif /* ! FLEXINT_H */
  296. /* begin standard C++ headers. */
  297. /* TODO: this is always defined, so inline it */
  298. #define yyconst const
  299. #if defined(__GNUC__) && __GNUC__ >= 3
  300. #define yynoreturn __attribute__((__noreturn__))
  301. #else
  302. #define yynoreturn
  303. #endif
  304. /* Returned upon end-of-file. */
  305. #define YY_NULL 0
  306. /* Promotes a possibly negative, possibly signed char to an
  307. * integer in range [0..255] for use as an array index.
  308. */
  309. #define YY_SC_TO_UI(c) ((YY_CHAR) (c))
  310. /* Enter a start condition. This macro really ought to take a parameter,
  311. * but we do it the disgusting crufty way forced on us by the ()-less
  312. * definition of BEGIN.
  313. */
  314. #define BEGIN (yy_start) = 1 + 2 *
  315. /* Translate the current start state into a value that can be later handed
  316. * to BEGIN to return to the state. The YYSTATE alias is for lex
  317. * compatibility.
  318. */
  319. #define YY_START (((yy_start) - 1) / 2)
  320. #define YYSTATE YY_START
  321. /* Action number for EOF rule of a given start state. */
  322. #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
  323. /* Special action meaning "start processing a new file". */
  324. #define YY_NEW_FILE yyrestart( yyin )
  325. #define YY_END_OF_BUFFER_CHAR 0
  326. /* Size of default input buffer. */
  327. #ifndef YY_BUF_SIZE
  328. #ifdef __ia64__
  329. /* On IA-64, the buffer size is 16k, not 8k.
  330. * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
  331. * Ditto for the __ia64__ case accordingly.
  332. */
  333. #define YY_BUF_SIZE 32768
  334. #else
  335. #define YY_BUF_SIZE 16384
  336. #endif /* __ia64__ */
  337. #endif
  338. /* The state buf must be large enough to hold one state per character in the main buffer.
  339. */
  340. #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
  341. #ifndef YY_TYPEDEF_YY_BUFFER_STATE
  342. #define YY_TYPEDEF_YY_BUFFER_STATE
  343. typedef struct yy_buffer_state *YY_BUFFER_STATE;
  344. #endif
  345. #ifndef YY_TYPEDEF_YY_SIZE_T
  346. #define YY_TYPEDEF_YY_SIZE_T
  347. typedef size_t yy_size_t;
  348. #endif
  349. extern int yyleng;
  350. extern FILE *yyin, *yyout;
  351. #define EOB_ACT_CONTINUE_SCAN 0
  352. #define EOB_ACT_END_OF_FILE 1
  353. #define EOB_ACT_LAST_MATCH 2
  354. #define YY_LESS_LINENO(n)
  355. #define YY_LINENO_REWIND_TO(ptr)
  356. /* Return all but the first "n" matched characters back to the input stream. */
  357. #define yyless(n) \
  358. do \
  359. { \
  360. /* Undo effects of setting up yytext. */ \
  361. int yyless_macro_arg = (n); \
  362. YY_LESS_LINENO(yyless_macro_arg);\
  363. *yy_cp = (yy_hold_char); \
  364. YY_RESTORE_YY_MORE_OFFSET \
  365. (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
  366. YY_DO_BEFORE_ACTION; /* set up yytext again */ \
  367. } \
  368. while ( 0 )
  369. #define unput(c) yyunput( c, (yytext_ptr) )
  370. #ifndef YY_STRUCT_YY_BUFFER_STATE
  371. #define YY_STRUCT_YY_BUFFER_STATE
  372. struct yy_buffer_state
  373. {
  374. FILE *yy_input_file;
  375. char *yy_ch_buf; /* input buffer */
  376. char *yy_buf_pos; /* current position in input buffer */
  377. /* Size of input buffer in bytes, not including room for EOB
  378. * characters.
  379. */
  380. int yy_buf_size;
  381. /* Number of characters read into yy_ch_buf, not including EOB
  382. * characters.
  383. */
  384. int yy_n_chars;
  385. /* Whether we "own" the buffer - i.e., we know we created it,
  386. * and can realloc() it to grow it, and should free() it to
  387. * delete it.
  388. */
  389. int yy_is_our_buffer;
  390. /* Whether this is an "interactive" input source; if so, and
  391. * if we're using stdio for input, then we want to use getc()
  392. * instead of fread(), to make sure we stop fetching input after
  393. * each newline.
  394. */
  395. int yy_is_interactive;
  396. /* Whether we're considered to be at the beginning of a line.
  397. * If so, '^' rules will be active on the next match, otherwise
  398. * not.
  399. */
  400. int yy_at_bol;
  401. int yy_bs_lineno; /**< The line count. */
  402. int yy_bs_column; /**< The column count. */
  403. /* Whether to try to fill the input buffer when we reach the
  404. * end of it.
  405. */
  406. int yy_fill_buffer;
  407. int yy_buffer_status;
  408. #define YY_BUFFER_NEW 0
  409. #define YY_BUFFER_NORMAL 1
  410. /* When an EOF's been seen but there's still some text to process
  411. * then we mark the buffer as YY_EOF_PENDING, to indicate that we
  412. * shouldn't try reading from the input source any more. We might
  413. * still have a bunch of tokens to match, though, because of
  414. * possible backing-up.
  415. *
  416. * When we actually see the EOF, we change the status to "new"
  417. * (via yyrestart()), so that the user can continue scanning by
  418. * just pointing yyin at a new input file.
  419. */
  420. #define YY_BUFFER_EOF_PENDING 2
  421. };
  422. #endif /* !YY_STRUCT_YY_BUFFER_STATE */
  423. /* Stack of input buffers. */
  424. static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
  425. static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
  426. static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
  427. /* We provide macros for accessing buffer states in case in the
  428. * future we want to put the buffer states in a more general
  429. * "scanner state".
  430. *
  431. * Returns the top of the stack, or NULL.
  432. */
  433. #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
  434. ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
  435. : NULL)
  436. /* Same as previous macro, but useful when we know that the buffer stack is not
  437. * NULL or when we need an lvalue. For internal use only.
  438. */
  439. #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
  440. /* yy_hold_char holds the character lost when yytext is formed. */
  441. static char yy_hold_char;
  442. static int yy_n_chars; /* number of characters read into yy_ch_buf */
  443. int yyleng;
  444. /* Points to current character in buffer. */
  445. static char *yy_c_buf_p = NULL;
  446. static int yy_init = 0; /* whether we need to initialize */
  447. static int yy_start = 0; /* start state number */
  448. /* Flag which is used to allow yywrap()'s to do buffer switches
  449. * instead of setting up a fresh yyin. A bit of a hack ...
  450. */
  451. static int yy_did_buffer_switch_on_eof;
  452. void yyrestart ( FILE *input_file );
  453. void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer );
  454. YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );
  455. void yy_delete_buffer ( YY_BUFFER_STATE b );
  456. void yy_flush_buffer ( YY_BUFFER_STATE b );
  457. void yypush_buffer_state ( YY_BUFFER_STATE new_buffer );
  458. void yypop_buffer_state ( void );
  459. static void yyensure_buffer_stack ( void );
  460. static void yy_load_buffer_state ( void );
  461. static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
  462. #define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
  463. YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size );
  464. YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
  465. YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
  466. void *yyalloc ( yy_size_t );
  467. void *yyrealloc ( void *, yy_size_t );
  468. void yyfree ( void * );
  469. #define yy_new_buffer yy_create_buffer
  470. #define yy_set_interactive(is_interactive) \
  471. { \
  472. if ( ! YY_CURRENT_BUFFER ){ \
  473. yyensure_buffer_stack (); \
  474. YY_CURRENT_BUFFER_LVALUE = \
  475. yy_create_buffer( yyin, YY_BUF_SIZE ); \
  476. } \
  477. YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
  478. }
  479. #define yy_set_bol(at_bol) \
  480. { \
  481. if ( ! YY_CURRENT_BUFFER ){\
  482. yyensure_buffer_stack (); \
  483. YY_CURRENT_BUFFER_LVALUE = \
  484. yy_create_buffer( yyin, YY_BUF_SIZE ); \
  485. } \
  486. YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
  487. }
  488. #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
  489. /* Begin user sect3 */
  490. typedef flex_uint8_t YY_CHAR;
  491. FILE *yyin = NULL, *yyout = NULL;
  492. typedef int yy_state_type;
  493. extern int yylineno;
  494. int yylineno = 1;
  495. extern char *yytext;
  496. #ifdef yytext_ptr
  497. #undef yytext_ptr
  498. #endif
  499. #define yytext_ptr yytext
  500. static yy_state_type yy_get_previous_state ( void );
  501. static yy_state_type yy_try_NUL_trans ( yy_state_type current_state );
  502. static int yy_get_next_buffer ( void );
  503. static void yynoreturn yy_fatal_error ( const char* msg );
  504. /* Done after the current pattern has been matched and before the
  505. * corresponding action - sets up yytext.
  506. */
  507. #define YY_DO_BEFORE_ACTION \
  508. (yytext_ptr) = yy_bp; \
  509. yyleng = (int) (yy_cp - yy_bp); \
  510. (yy_hold_char) = *yy_cp; \
  511. *yy_cp = '\0'; \
  512. (yy_c_buf_p) = yy_cp;
  513. #define YY_NUM_RULES 39
  514. #define YY_END_OF_BUFFER 40
  515. /* This struct is not used in this scanner,
  516. but its presence is necessary. */
  517. struct yy_trans_info
  518. {
  519. flex_int32_t yy_verify;
  520. flex_int32_t yy_nxt;
  521. };
  522. static const flex_int16_t yy_accept[143] =
  523. { 0,
  524. 0, 0, 0, 0, 40, 38, 4, 2, 35, 38,
  525. 33, 32, 1, 34, 34, 34, 34, 34, 34, 15,
  526. 34, 34, 34, 34, 34, 34, 34, 14, 12, 13,
  527. 3, 37, 2, 36, 33, 32, 33, 0, 34, 34,
  528. 34, 34, 34, 34, 34, 9, 34, 34, 34, 34,
  529. 34, 34, 34, 34, 34, 34, 34, 3, 37, 0,
  530. 33, 34, 34, 34, 34, 34, 34, 34, 34, 34,
  531. 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
  532. 7, 20, 34, 34, 34, 26, 6, 34, 34, 34,
  533. 34, 34, 28, 19, 34, 31, 34, 34, 34, 5,
  534. 16, 34, 27, 34, 25, 34, 24, 34, 34, 34,
  535. 34, 34, 34, 10, 11, 34, 34, 34, 34, 34,
  536. 21, 8, 30, 29, 17, 34, 34, 34, 34, 34,
  537. 34, 34, 34, 34, 34, 34, 34, 34, 22, 23,
  538. 18, 0
  539. } ;
  540. static const YY_CHAR yy_ec[256] =
  541. { 0,
  542. 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
  543. 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
  544. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  545. 1, 2, 1, 4, 5, 1, 1, 1, 1, 1,
  546. 1, 1, 6, 1, 6, 7, 1, 8, 8, 8,
  547. 8, 8, 8, 8, 8, 8, 8, 1, 1, 1,
  548. 1, 1, 1, 9, 10, 11, 12, 13, 14, 15,
  549. 16, 17, 18, 19, 19, 20, 21, 22, 23, 24,
  550. 19, 25, 26, 27, 28, 19, 29, 30, 31, 32,
  551. 1, 1, 1, 1, 19, 1, 33, 34, 35, 36,
  552. 37, 38, 39, 40, 41, 19, 19, 42, 43, 44,
  553. 45, 46, 19, 47, 48, 49, 50, 19, 51, 52,
  554. 53, 54, 1, 1, 1, 1, 1, 1, 1, 1,
  555. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  556. 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1, 1, 1, 1, 1, 1,
  560. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  561. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  562. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  563. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  564. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  565. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  566. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  567. 1, 1, 1, 1, 1
  568. } ;
  569. static const YY_CHAR yy_meta[55] =
  570. { 0,
  571. 1, 1, 2, 3, 1, 1, 1, 4, 1, 4,
  572. 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
  573. 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
  574. 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
  575. 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
  576. 4, 4, 4, 4
  577. } ;
  578. static const flex_int16_t yy_base[147] =
  579. { 0,
  580. 0, 78, 52, 54, 75, 301, 301, 301, 301, 52,
  581. 53, 55, 301, 0, 41, 47, 53, 50, 45, 0,
  582. 58, 64, 53, 49, 55, 57, 93, 63, 0, 0,
  583. 0, 0, 0, 301, 71, 102, 79, 105, 0, 76,
  584. 76, 96, 94, 93, 107, 0, 108, 99, 109, 98,
  585. 109, 101, 100, 107, 103, 110, 125, 0, 0, 64,
  586. 301, 118, 125, 130, 128, 122, 128, 143, 144, 145,
  587. 144, 143, 141, 148, 144, 142, 158, 148, 151, 161,
  588. 0, 0, 163, 160, 159, 0, 0, 174, 157, 181,
  589. 180, 185, 0, 0, 185, 0, 177, 195, 190, 191,
  590. 194, 190, 0, 199, 0, 191, 0, 200, 198, 188,
  591. 209, 198, 210, 0, 0, 214, 215, 216, 209, 228,
  592. 217, 0, 0, 0, 0, 224, 222, 221, 234, 223,
  593. 242, 238, 238, 232, 248, 249, 247, 240, 0, 0,
  594. 0, 301, 288, 65, 292, 296
  595. } ;
  596. static const flex_int16_t yy_def[147] =
  597. { 0,
  598. 142, 1, 143, 143, 142, 142, 142, 142, 142, 142,
  599. 142, 142, 142, 144, 144, 144, 144, 144, 144, 144,
  600. 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
  601. 145, 146, 146, 142, 142, 142, 142, 142, 144, 144,
  602. 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
  603. 144, 144, 144, 144, 144, 144, 144, 145, 146, 142,
  604. 142, 144, 144, 144, 144, 144, 144, 144, 144, 144,
  605. 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
  606. 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
  607. 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
  608. 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
  609. 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
  610. 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
  611. 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
  612. 144, 0, 142, 142, 142, 142
  613. } ;
  614. static const flex_int16_t yy_nxt[356] =
  615. { 0,
  616. 6, 7, 8, 9, 6, 10, 11, 12, 13, 14,
  617. 14, 15, 16, 17, 18, 19, 20, 21, 14, 22,
  618. 14, 23, 24, 25, 14, 26, 27, 14, 28, 29,
  619. 30, 14, 14, 14, 15, 16, 17, 18, 19, 20,
  620. 21, 22, 14, 23, 24, 25, 14, 26, 27, 14,
  621. 28, 29, 30, 14, 33, 34, 33, 34, 35, 36,
  622. 37, 35, 36, 40, 41, 42, 38, 43, 39, 45,
  623. 46, 61, 44, 47, 142, 49, 50, 51, 37, 52,
  624. 57, 48, 31, 53, 38, 40, 37, 41, 42, 38,
  625. 43, 45, 38, 46, 44, 62, 47, 49, 50, 51,
  626. 63, 52, 54, 57, 48, 53, 55, 38, 35, 36,
  627. 60, 64, 61, 65, 66, 38, 67, 62, 68, 142,
  628. 69, 70, 63, 56, 71, 54, 72, 142, 73, 55,
  629. 74, 75, 76, 77, 64, 65, 66, 78, 80, 67,
  630. 79, 68, 69, 81, 70, 56, 71, 82, 83, 72,
  631. 73, 84, 74, 75, 76, 77, 85, 86, 87, 92,
  632. 78, 80, 79, 88, 89, 90, 81, 91, 93, 82,
  633. 83, 94, 97, 84, 95, 96, 100, 142, 101, 85,
  634. 86, 87, 92, 103, 98, 88, 89, 90, 99, 91,
  635. 93, 102, 104, 105, 94, 97, 95, 96, 106, 100,
  636. 101, 107, 142, 108, 109, 103, 98, 110, 111, 112,
  637. 99, 113, 114, 116, 102, 104, 105, 115, 117, 118,
  638. 119, 106, 120, 121, 107, 108, 122, 109, 123, 124,
  639. 110, 111, 112, 113, 125, 114, 116, 126, 131, 115,
  640. 117, 118, 127, 119, 120, 128, 121, 129, 130, 122,
  641. 132, 123, 124, 133, 134, 135, 125, 136, 137, 138,
  642. 126, 131, 139, 140, 127, 141, 142, 128, 142, 129,
  643. 130, 142, 142, 132, 142, 133, 142, 134, 135, 136,
  644. 137, 142, 138, 142, 142, 139, 140, 141, 32, 32,
  645. 32, 32, 58, 142, 58, 58, 59, 59, 142, 59,
  646. 5, 142, 142, 142, 142, 142, 142, 142, 142, 142,
  647. 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
  648. 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
  649. 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
  650. 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
  651. 142, 142, 142, 142, 142
  652. } ;
  653. static const flex_int16_t yy_chk[356] =
  654. { 0,
  655. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  656. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  657. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  658. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  659. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  660. 1, 1, 1, 1, 3, 3, 4, 4, 10, 10,
  661. 11, 12, 12, 15, 16, 17, 11, 18, 144, 19,
  662. 21, 60, 18, 22, 5, 23, 24, 25, 35, 26,
  663. 28, 22, 2, 26, 35, 15, 37, 16, 17, 11,
  664. 18, 19, 37, 21, 18, 40, 22, 23, 24, 25,
  665. 41, 26, 27, 28, 22, 26, 27, 35, 36, 36,
  666. 38, 42, 38, 43, 44, 37, 45, 40, 47, 0,
  667. 48, 49, 41, 27, 50, 27, 51, 0, 52, 27,
  668. 53, 54, 55, 56, 42, 43, 44, 57, 63, 45,
  669. 62, 47, 48, 64, 49, 27, 50, 65, 66, 51,
  670. 52, 67, 53, 54, 55, 56, 68, 69, 70, 75,
  671. 57, 63, 62, 71, 72, 73, 64, 74, 76, 65,
  672. 66, 77, 80, 67, 78, 79, 84, 0, 85, 68,
  673. 69, 70, 75, 89, 83, 71, 72, 73, 83, 74,
  674. 76, 88, 90, 91, 77, 80, 78, 79, 92, 84,
  675. 85, 95, 0, 97, 98, 89, 83, 99, 100, 101,
  676. 83, 102, 104, 108, 88, 90, 91, 106, 109, 110,
  677. 111, 92, 112, 113, 95, 97, 116, 98, 117, 118,
  678. 99, 100, 101, 102, 119, 104, 108, 120, 128, 106,
  679. 109, 110, 121, 111, 112, 121, 113, 126, 127, 116,
  680. 129, 117, 118, 130, 131, 132, 119, 133, 134, 135,
  681. 120, 128, 136, 137, 121, 138, 0, 121, 0, 126,
  682. 127, 0, 0, 129, 0, 130, 0, 131, 132, 133,
  683. 134, 0, 135, 0, 0, 136, 137, 138, 143, 143,
  684. 143, 143, 145, 0, 145, 145, 146, 146, 0, 146,
  685. 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
  686. 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
  687. 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
  688. 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
  689. 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
  690. 142, 142, 142, 142, 142
  691. } ;
  692. static yy_state_type yy_last_accepting_state;
  693. static char *yy_last_accepting_cpos;
  694. extern int yy_flex_debug;
  695. int yy_flex_debug = 0;
  696. /* The intent behind this definition is that it'll catch
  697. * any uses of REJECT which flex missed.
  698. */
  699. #define REJECT reject_used_but_not_detected
  700. #define yymore() yymore_used_but_not_detected
  701. #define YY_MORE_ADJ 0
  702. #define YY_RESTORE_YY_MORE_OFFSET
  703. char *yytext;
  704. #line 1 "../../cmd/tools/gmlscan.l"
  705. #line 2 "../../cmd/tools/gmlscan.l"
  706. /* By default, Flex emits a lexer using symbols prefixed with "yy". Graphviz
  707. * contains multiple Flex-generated lexers, so we alter this prefix to avoid
  708. * symbol clashes.
  709. */
  710. /* Avoid generating an unused input function. See
  711. https://westes.github.io/flex/manual/Scanner-Options.html
  712. */
  713. #define YY_NO_INPUT 1
  714. #include <assert.h>
  715. #include <stdlib.h>
  716. #include <string.h>
  717. #include <gml2gv.h>
  718. #include <gmlparse.h>
  719. #include <util/alloc.h>
  720. #include "config.h"
  721. #define GRAPH_EOF_TOKEN '@' /* lex class must be defined below */
  722. static int line_num = 1;
  723. static int errors;
  724. static FILE* Ifile;
  725. void initgmlscan(FILE *ifile)
  726. {
  727. if (ifile) {
  728. Ifile = ifile;
  729. line_num = 1;
  730. }
  731. errors = 0;
  732. }
  733. #ifndef YY_INPUT
  734. #define YY_INPUT(buf,result,max_size) \
  735. if ((result = fread(buf, 1, max_size, Ifile)) < 0) \
  736. YY_FATAL_ERROR( "input in flex scanner failed" )
  737. #endif
  738. /* buffer for arbitrary length strings (longer than BUFSIZ) */
  739. static char *Sbuf;
  740. static void beginstr(void) {
  741. assert(Sbuf == NULL && "leaking memory");
  742. Sbuf = gv_strdup("");
  743. }
  744. static void addstr(const char *src) {
  745. assert(Sbuf != NULL && "missing beginstr()");
  746. // enlarge the buffer to make room for the suffix
  747. {
  748. size_t old_size = strlen(Sbuf) + 1;
  749. size_t new_size = old_size + strlen(src);
  750. Sbuf = gv_realloc(Sbuf, old_size, new_size);
  751. }
  752. strcat(Sbuf, src);
  753. }
  754. static void endstr(void) {
  755. assert(Sbuf != NULL && "missing beginstr()");
  756. // take ownership of the Sbuf backing memory
  757. gmllval.str = Sbuf;
  758. Sbuf = NULL;
  759. }
  760. #line 894 "gmlscan.c"
  761. #line 896 "gmlscan.c"
  762. #define INITIAL 0
  763. #define qstring 1
  764. #ifndef YY_NO_UNISTD_H
  765. /* Special case for "unistd.h", since it is non-ANSI. We include it way
  766. * down here because we want the user's section 1 to have been scanned first.
  767. * The user has a chance to override it with an option.
  768. */
  769. #include <unistd.h>
  770. #endif
  771. #ifndef YY_EXTRA_TYPE
  772. #define YY_EXTRA_TYPE void *
  773. #endif
  774. static int yy_init_globals ( void );
  775. /* Accessor methods to globals.
  776. These are made visible to non-reentrant scanners for convenience. */
  777. int yylex_destroy ( void );
  778. int yyget_debug ( void );
  779. void yyset_debug ( int debug_flag );
  780. YY_EXTRA_TYPE yyget_extra ( void );
  781. void yyset_extra ( YY_EXTRA_TYPE user_defined );
  782. FILE *yyget_in ( void );
  783. void yyset_in ( FILE * _in_str );
  784. FILE *yyget_out ( void );
  785. void yyset_out ( FILE * _out_str );
  786. int yyget_leng ( void );
  787. char *yyget_text ( void );
  788. int yyget_lineno ( void );
  789. void yyset_lineno ( int _line_number );
  790. /* Macros after this point can all be overridden by user definitions in
  791. * section 1.
  792. */
  793. #ifndef YY_SKIP_YYWRAP
  794. #ifdef __cplusplus
  795. extern "C" int yywrap ( void );
  796. #else
  797. extern int yywrap ( void );
  798. #endif
  799. #endif
  800. #ifndef YY_NO_UNPUT
  801. static void yyunput ( int c, char *buf_ptr );
  802. #endif
  803. #ifndef yytext_ptr
  804. static void yy_flex_strncpy ( char *, const char *, int );
  805. #endif
  806. #ifdef YY_NEED_STRLEN
  807. static int yy_flex_strlen ( const char * );
  808. #endif
  809. #ifndef YY_NO_INPUT
  810. #ifdef __cplusplus
  811. static int yyinput ( void );
  812. #else
  813. static int input ( void );
  814. #endif
  815. #endif
  816. /* Amount of stuff to slurp up with each read. */
  817. #ifndef YY_READ_BUF_SIZE
  818. #ifdef __ia64__
  819. /* On IA-64, the buffer size is 16k, not 8k */
  820. #define YY_READ_BUF_SIZE 16384
  821. #else
  822. #define YY_READ_BUF_SIZE 8192
  823. #endif /* __ia64__ */
  824. #endif
  825. /* Copy whatever the last rule matched to the standard output. */
  826. #ifndef ECHO
  827. /* This used to be an fputs(), but since the string might contain NUL's,
  828. * we now use fwrite().
  829. */
  830. #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
  831. #endif
  832. /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
  833. * is returned in "result".
  834. */
  835. #ifndef YY_INPUT
  836. #define YY_INPUT(buf,result,max_size) \
  837. if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
  838. { \
  839. int c = '*'; \
  840. int n; \
  841. for ( n = 0; n < max_size && \
  842. (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
  843. buf[n] = (char) c; \
  844. if ( c == '\n' ) \
  845. buf[n++] = (char) c; \
  846. if ( c == EOF && ferror( yyin ) ) \
  847. YY_FATAL_ERROR( "input in flex scanner failed" ); \
  848. result = n; \
  849. } \
  850. else \
  851. { \
  852. errno=0; \
  853. while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
  854. { \
  855. if( errno != EINTR) \
  856. { \
  857. YY_FATAL_ERROR( "input in flex scanner failed" ); \
  858. break; \
  859. } \
  860. errno=0; \
  861. clearerr(yyin); \
  862. } \
  863. }\
  864. \
  865. #endif
  866. /* No semi-colon after return; correct usage is to write "yyterminate();" -
  867. * we don't want an extra ';' after the "return" because that will cause
  868. * some compilers to complain about unreachable statements.
  869. */
  870. #ifndef yyterminate
  871. #define yyterminate() return YY_NULL
  872. #endif
  873. /* Number of entries by which start-condition stack grows. */
  874. #ifndef YY_START_STACK_INCR
  875. #define YY_START_STACK_INCR 25
  876. #endif
  877. /* Report a fatal error. */
  878. #ifndef YY_FATAL_ERROR
  879. #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
  880. #endif
  881. /* end tables serialization structures and prototypes */
  882. /* Default declaration of generated scanner - a define so the user can
  883. * easily add parameters.
  884. */
  885. #ifndef YY_DECL
  886. #define YY_DECL_IS_OURS 1
  887. extern int yylex (void);
  888. #define YY_DECL int yylex (void)
  889. #endif /* !YY_DECL */
  890. /* Code executed at the beginning of each rule, after yytext and yyleng
  891. * have been set up.
  892. */
  893. #ifndef YY_USER_ACTION
  894. #define YY_USER_ACTION
  895. #endif
  896. /* Code executed at the end of each rule. */
  897. #ifndef YY_BREAK
  898. #define YY_BREAK /*LINTED*/break;
  899. #endif
  900. #define YY_RULE_SETUP \
  901. if ( yyleng > 0 ) \
  902. YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
  903. (yytext[yyleng - 1] == '\n'); \
  904. YY_USER_ACTION
  905. /** The main scanner function which does all the work.
  906. */
  907. YY_DECL
  908. {
  909. yy_state_type yy_current_state;
  910. char *yy_cp, *yy_bp;
  911. int yy_act;
  912. if ( !(yy_init) )
  913. {
  914. (yy_init) = 1;
  915. #ifdef YY_USER_INIT
  916. YY_USER_INIT;
  917. #endif
  918. if ( ! (yy_start) )
  919. (yy_start) = 1; /* first start state */
  920. if ( ! yyin )
  921. yyin = stdin;
  922. if ( ! yyout )
  923. yyout = stdout;
  924. if ( ! YY_CURRENT_BUFFER ) {
  925. yyensure_buffer_stack ();
  926. YY_CURRENT_BUFFER_LVALUE =
  927. yy_create_buffer( yyin, YY_BUF_SIZE );
  928. }
  929. yy_load_buffer_state( );
  930. }
  931. {
  932. #line 80 "../../cmd/tools/gmlscan.l"
  933. #line 1119 "gmlscan.c"
  934. while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
  935. {
  936. yy_cp = (yy_c_buf_p);
  937. /* Support of yytext. */
  938. *yy_cp = (yy_hold_char);
  939. /* yy_bp points to the position in yy_ch_buf of the start of
  940. * the current run.
  941. */
  942. yy_bp = yy_cp;
  943. yy_current_state = (yy_start);
  944. yy_current_state += YY_AT_BOL();
  945. yy_match:
  946. do
  947. {
  948. YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
  949. if ( yy_accept[yy_current_state] )
  950. {
  951. (yy_last_accepting_state) = yy_current_state;
  952. (yy_last_accepting_cpos) = yy_cp;
  953. }
  954. while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  955. {
  956. yy_current_state = (int) yy_def[yy_current_state];
  957. if ( yy_current_state >= 143 )
  958. yy_c = yy_meta[yy_c];
  959. }
  960. yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
  961. ++yy_cp;
  962. }
  963. while ( yy_base[yy_current_state] != 301 );
  964. yy_find_action:
  965. yy_act = yy_accept[yy_current_state];
  966. if ( yy_act == 0 )
  967. { /* have to back up */
  968. yy_cp = (yy_last_accepting_cpos);
  969. yy_current_state = (yy_last_accepting_state);
  970. yy_act = yy_accept[yy_current_state];
  971. }
  972. YY_DO_BEFORE_ACTION;
  973. do_action: /* This label is used only to access EOF actions. */
  974. switch ( yy_act )
  975. { /* beginning of action switch */
  976. case 0: /* must back up */
  977. /* undo the effects of YY_DO_BEFORE_ACTION */
  978. *yy_cp = (yy_hold_char);
  979. yy_cp = (yy_last_accepting_cpos);
  980. yy_current_state = (yy_last_accepting_state);
  981. goto yy_find_action;
  982. case 1:
  983. YY_RULE_SETUP
  984. #line 81 "../../cmd/tools/gmlscan.l"
  985. return(EOF);
  986. YY_BREAK
  987. case 2:
  988. /* rule 2 can match eol */
  989. YY_RULE_SETUP
  990. #line 82 "../../cmd/tools/gmlscan.l"
  991. line_num++;
  992. YY_BREAK
  993. case 3:
  994. YY_RULE_SETUP
  995. #line 83 "../../cmd/tools/gmlscan.l"
  996. /* ignore # line */
  997. YY_BREAK
  998. case 4:
  999. YY_RULE_SETUP
  1000. #line 84 "../../cmd/tools/gmlscan.l"
  1001. /* ignore whitespace */
  1002. YY_BREAK
  1003. case 5:
  1004. YY_RULE_SETUP
  1005. #line 86 "../../cmd/tools/gmlscan.l"
  1006. return (GRAPH);
  1007. YY_BREAK
  1008. case 6:
  1009. YY_RULE_SETUP
  1010. #line 87 "../../cmd/tools/gmlscan.l"
  1011. return (NODE);
  1012. YY_BREAK
  1013. case 7:
  1014. YY_RULE_SETUP
  1015. #line 88 "../../cmd/tools/gmlscan.l"
  1016. return (EDGE);
  1017. YY_BREAK
  1018. case 8:
  1019. YY_RULE_SETUP
  1020. #line 89 "../../cmd/tools/gmlscan.l"
  1021. return (DIRECTED);
  1022. YY_BREAK
  1023. case 9:
  1024. YY_RULE_SETUP
  1025. #line 90 "../../cmd/tools/gmlscan.l"
  1026. return (ID);
  1027. YY_BREAK
  1028. case 10:
  1029. YY_RULE_SETUP
  1030. #line 91 "../../cmd/tools/gmlscan.l"
  1031. return (SOURCE);
  1032. YY_BREAK
  1033. case 11:
  1034. YY_RULE_SETUP
  1035. #line 92 "../../cmd/tools/gmlscan.l"
  1036. return (TARGET);
  1037. YY_BREAK
  1038. case 12:
  1039. YY_RULE_SETUP
  1040. #line 93 "../../cmd/tools/gmlscan.l"
  1041. return (XVAL);
  1042. YY_BREAK
  1043. case 13:
  1044. YY_RULE_SETUP
  1045. #line 94 "../../cmd/tools/gmlscan.l"
  1046. return (YVAL);
  1047. YY_BREAK
  1048. case 14:
  1049. YY_RULE_SETUP
  1050. #line 95 "../../cmd/tools/gmlscan.l"
  1051. return (WVAL);
  1052. YY_BREAK
  1053. case 15:
  1054. YY_RULE_SETUP
  1055. #line 96 "../../cmd/tools/gmlscan.l"
  1056. return (HVAL);
  1057. YY_BREAK
  1058. case 16:
  1059. YY_RULE_SETUP
  1060. #line 97 "../../cmd/tools/gmlscan.l"
  1061. return (LABEL);
  1062. YY_BREAK
  1063. case 17:
  1064. YY_RULE_SETUP
  1065. #line 98 "../../cmd/tools/gmlscan.l"
  1066. return (GRAPHICS);;
  1067. YY_BREAK
  1068. case 18:
  1069. YY_RULE_SETUP
  1070. #line 99 "../../cmd/tools/gmlscan.l"
  1071. return (LABELGRAPHICS);
  1072. YY_BREAK
  1073. case 19:
  1074. YY_RULE_SETUP
  1075. #line 100 "../../cmd/tools/gmlscan.l"
  1076. return (TYPE);
  1077. YY_BREAK
  1078. case 20:
  1079. YY_RULE_SETUP
  1080. #line 101 "../../cmd/tools/gmlscan.l"
  1081. return (FILL);
  1082. YY_BREAK
  1083. case 21:
  1084. YY_RULE_SETUP
  1085. #line 102 "../../cmd/tools/gmlscan.l"
  1086. return (OUTLINE);
  1087. YY_BREAK
  1088. case 22:
  1089. YY_RULE_SETUP
  1090. #line 103 "../../cmd/tools/gmlscan.l"
  1091. return (OUTLINESTYLE);
  1092. YY_BREAK
  1093. case 23:
  1094. YY_RULE_SETUP
  1095. #line 104 "../../cmd/tools/gmlscan.l"
  1096. return (OUTLINEWIDTH);
  1097. YY_BREAK
  1098. case 24:
  1099. YY_RULE_SETUP
  1100. #line 105 "../../cmd/tools/gmlscan.l"
  1101. return (WIDTH);
  1102. YY_BREAK
  1103. case 25:
  1104. YY_RULE_SETUP
  1105. #line 106 "../../cmd/tools/gmlscan.l"
  1106. return (STYLE);
  1107. YY_BREAK
  1108. case 26:
  1109. YY_RULE_SETUP
  1110. #line 107 "../../cmd/tools/gmlscan.l"
  1111. return (LINE);
  1112. YY_BREAK
  1113. case 27:
  1114. YY_RULE_SETUP
  1115. #line 108 "../../cmd/tools/gmlscan.l"
  1116. return (POINT);
  1117. YY_BREAK
  1118. case 28:
  1119. YY_RULE_SETUP
  1120. #line 109 "../../cmd/tools/gmlscan.l"
  1121. return (TEXT);
  1122. YY_BREAK
  1123. case 29:
  1124. YY_RULE_SETUP
  1125. #line 110 "../../cmd/tools/gmlscan.l"
  1126. return (FONTSIZE);
  1127. YY_BREAK
  1128. case 30:
  1129. YY_RULE_SETUP
  1130. #line 111 "../../cmd/tools/gmlscan.l"
  1131. return (FONTNAME);
  1132. YY_BREAK
  1133. case 31:
  1134. YY_RULE_SETUP
  1135. #line 112 "../../cmd/tools/gmlscan.l"
  1136. return (COLOR);
  1137. YY_BREAK
  1138. case 32:
  1139. YY_RULE_SETUP
  1140. #line 113 "../../cmd/tools/gmlscan.l"
  1141. { gmllval.str = gv_strdup(yytext); return (INTEGER); }
  1142. YY_BREAK
  1143. case 33:
  1144. YY_RULE_SETUP
  1145. #line 114 "../../cmd/tools/gmlscan.l"
  1146. { gmllval.str = gv_strdup(yytext); return (REAL); }
  1147. YY_BREAK
  1148. case 34:
  1149. YY_RULE_SETUP
  1150. #line 115 "../../cmd/tools/gmlscan.l"
  1151. { gmllval.str = gv_strdup(yytext); return (NAME); }
  1152. YY_BREAK
  1153. case 35:
  1154. YY_RULE_SETUP
  1155. #line 116 "../../cmd/tools/gmlscan.l"
  1156. BEGIN(qstring); beginstr();
  1157. YY_BREAK
  1158. case 36:
  1159. YY_RULE_SETUP
  1160. #line 118 "../../cmd/tools/gmlscan.l"
  1161. BEGIN(INITIAL); endstr(); return (STRING);
  1162. YY_BREAK
  1163. case 37:
  1164. /* rule 37 can match eol */
  1165. YY_RULE_SETUP
  1166. #line 119 "../../cmd/tools/gmlscan.l"
  1167. addstr(yytext);
  1168. YY_BREAK
  1169. case 38:
  1170. YY_RULE_SETUP
  1171. #line 121 "../../cmd/tools/gmlscan.l"
  1172. return (yytext[0]);
  1173. YY_BREAK
  1174. case 39:
  1175. YY_RULE_SETUP
  1176. #line 123 "../../cmd/tools/gmlscan.l"
  1177. ECHO;
  1178. YY_BREAK
  1179. #line 1374 "gmlscan.c"
  1180. case YY_STATE_EOF(INITIAL):
  1181. case YY_STATE_EOF(qstring):
  1182. yyterminate();
  1183. case YY_END_OF_BUFFER:
  1184. {
  1185. /* Amount of text matched not including the EOB char. */
  1186. int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
  1187. /* Undo the effects of YY_DO_BEFORE_ACTION. */
  1188. *yy_cp = (yy_hold_char);
  1189. YY_RESTORE_YY_MORE_OFFSET
  1190. if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
  1191. {
  1192. /* We're scanning a new file or input source. It's
  1193. * possible that this happened because the user
  1194. * just pointed yyin at a new source and called
  1195. * yylex(). If so, then we have to assure
  1196. * consistency between YY_CURRENT_BUFFER and our
  1197. * globals. Here is the right place to do so, because
  1198. * this is the first action (other than possibly a
  1199. * back-up) that will match for the new input source.
  1200. */
  1201. (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
  1202. YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
  1203. YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
  1204. }
  1205. /* Note that here we test for yy_c_buf_p "<=" to the position
  1206. * of the first EOB in the buffer, since yy_c_buf_p will
  1207. * already have been incremented past the NUL character
  1208. * (since all states make transitions on EOB to the
  1209. * end-of-buffer state). Contrast this with the test
  1210. * in input().
  1211. */
  1212. if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
  1213. { /* This was really a NUL. */
  1214. yy_state_type yy_next_state;
  1215. (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
  1216. yy_current_state = yy_get_previous_state( );
  1217. /* Okay, we're now positioned to make the NUL
  1218. * transition. We couldn't have
  1219. * yy_get_previous_state() go ahead and do it
  1220. * for us because it doesn't know how to deal
  1221. * with the possibility of jamming (and we don't
  1222. * want to build jamming into it because then it
  1223. * will run more slowly).
  1224. */
  1225. yy_next_state = yy_try_NUL_trans( yy_current_state );
  1226. yy_bp = (yytext_ptr) + YY_MORE_ADJ;
  1227. if ( yy_next_state )
  1228. {
  1229. /* Consume the NUL. */
  1230. yy_cp = ++(yy_c_buf_p);
  1231. yy_current_state = yy_next_state;
  1232. goto yy_match;
  1233. }
  1234. else
  1235. {
  1236. yy_cp = (yy_c_buf_p);
  1237. goto yy_find_action;
  1238. }
  1239. }
  1240. else switch ( yy_get_next_buffer( ) )
  1241. {
  1242. case EOB_ACT_END_OF_FILE:
  1243. {
  1244. (yy_did_buffer_switch_on_eof) = 0;
  1245. if ( yywrap( ) )
  1246. {
  1247. /* Note: because we've taken care in
  1248. * yy_get_next_buffer() to have set up
  1249. * yytext, we can now set up
  1250. * yy_c_buf_p so that if some total
  1251. * hoser (like flex itself) wants to
  1252. * call the scanner after we return the
  1253. * YY_NULL, it'll still work - another
  1254. * YY_NULL will get returned.
  1255. */
  1256. (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
  1257. yy_act = YY_STATE_EOF(YY_START);
  1258. goto do_action;
  1259. }
  1260. else
  1261. {
  1262. if ( ! (yy_did_buffer_switch_on_eof) )
  1263. YY_NEW_FILE;
  1264. }
  1265. break;
  1266. }
  1267. case EOB_ACT_CONTINUE_SCAN:
  1268. (yy_c_buf_p) =
  1269. (yytext_ptr) + yy_amount_of_matched_text;
  1270. yy_current_state = yy_get_previous_state( );
  1271. yy_cp = (yy_c_buf_p);
  1272. yy_bp = (yytext_ptr) + YY_MORE_ADJ;
  1273. goto yy_match;
  1274. case EOB_ACT_LAST_MATCH:
  1275. (yy_c_buf_p) =
  1276. &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
  1277. yy_current_state = yy_get_previous_state( );
  1278. yy_cp = (yy_c_buf_p);
  1279. yy_bp = (yytext_ptr) + YY_MORE_ADJ;
  1280. goto yy_find_action;
  1281. }
  1282. break;
  1283. }
  1284. default:
  1285. YY_FATAL_ERROR(
  1286. "fatal flex scanner internal error--no action found" );
  1287. } /* end of action switch */
  1288. } /* end of scanning one token */
  1289. } /* end of user's declarations */
  1290. } /* end of yylex */
  1291. /* yy_get_next_buffer - try to read in a new buffer
  1292. *
  1293. * Returns a code representing an action:
  1294. * EOB_ACT_LAST_MATCH -
  1295. * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
  1296. * EOB_ACT_END_OF_FILE - end of file
  1297. */
  1298. static int yy_get_next_buffer (void)
  1299. {
  1300. char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
  1301. char *source = (yytext_ptr);
  1302. int number_to_move, i;
  1303. int ret_val;
  1304. if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
  1305. YY_FATAL_ERROR(
  1306. "fatal flex scanner internal error--end of buffer missed" );
  1307. if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
  1308. { /* Don't try to fill the buffer, so this is an EOF. */
  1309. if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
  1310. {
  1311. /* We matched a single character, the EOB, so
  1312. * treat this as a final EOF.
  1313. */
  1314. return EOB_ACT_END_OF_FILE;
  1315. }
  1316. else
  1317. {
  1318. /* We matched some text prior to the EOB, first
  1319. * process it.
  1320. */
  1321. return EOB_ACT_LAST_MATCH;
  1322. }
  1323. }
  1324. /* Try to read more data. */
  1325. /* First move last chars to start of buffer. */
  1326. number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
  1327. for ( i = 0; i < number_to_move; ++i )
  1328. *(dest++) = *(source++);
  1329. if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
  1330. /* don't do the read, it's not guaranteed to return an EOF,
  1331. * just force an EOF
  1332. */
  1333. YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
  1334. else
  1335. {
  1336. int num_to_read =
  1337. YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
  1338. while ( num_to_read <= 0 )
  1339. { /* Not enough room in the buffer - grow it. */
  1340. /* just a shorter name for the current buffer */
  1341. YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
  1342. int yy_c_buf_p_offset =
  1343. (int) ((yy_c_buf_p) - b->yy_ch_buf);
  1344. if ( b->yy_is_our_buffer )
  1345. {
  1346. int new_size = b->yy_buf_size * 2;
  1347. if ( new_size <= 0 )
  1348. b->yy_buf_size += b->yy_buf_size / 8;
  1349. else
  1350. b->yy_buf_size *= 2;
  1351. b->yy_ch_buf = (char *)
  1352. /* Include room in for 2 EOB chars. */
  1353. yyrealloc( (void *) b->yy_ch_buf,
  1354. (yy_size_t) (b->yy_buf_size + 2) );
  1355. }
  1356. else
  1357. /* Can't grow it, we don't own it. */
  1358. b->yy_ch_buf = NULL;
  1359. if ( ! b->yy_ch_buf )
  1360. YY_FATAL_ERROR(
  1361. "fatal error - scanner input buffer overflow" );
  1362. (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
  1363. num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
  1364. number_to_move - 1;
  1365. }
  1366. if ( num_to_read > YY_READ_BUF_SIZE )
  1367. num_to_read = YY_READ_BUF_SIZE;
  1368. /* Read in more data. */
  1369. YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
  1370. (yy_n_chars), num_to_read );
  1371. YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
  1372. }
  1373. if ( (yy_n_chars) == 0 )
  1374. {
  1375. if ( number_to_move == YY_MORE_ADJ )
  1376. {
  1377. ret_val = EOB_ACT_END_OF_FILE;
  1378. yyrestart( yyin );
  1379. }
  1380. else
  1381. {
  1382. ret_val = EOB_ACT_LAST_MATCH;
  1383. YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
  1384. YY_BUFFER_EOF_PENDING;
  1385. }
  1386. }
  1387. else
  1388. ret_val = EOB_ACT_CONTINUE_SCAN;
  1389. if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
  1390. /* Extend the array by 50%, plus the number we really need. */
  1391. int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
  1392. YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
  1393. (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
  1394. if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
  1395. YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
  1396. /* "- 2" to take care of EOB's */
  1397. YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
  1398. }
  1399. (yy_n_chars) += number_to_move;
  1400. YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
  1401. YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
  1402. (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
  1403. return ret_val;
  1404. }
  1405. /* yy_get_previous_state - get the state just before the EOB char was reached */
  1406. static yy_state_type yy_get_previous_state (void)
  1407. {
  1408. yy_state_type yy_current_state;
  1409. char *yy_cp;
  1410. yy_current_state = (yy_start);
  1411. yy_current_state += YY_AT_BOL();
  1412. for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
  1413. {
  1414. YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
  1415. if ( yy_accept[yy_current_state] )
  1416. {
  1417. (yy_last_accepting_state) = yy_current_state;
  1418. (yy_last_accepting_cpos) = yy_cp;
  1419. }
  1420. while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  1421. {
  1422. yy_current_state = (int) yy_def[yy_current_state];
  1423. if ( yy_current_state >= 143 )
  1424. yy_c = yy_meta[yy_c];
  1425. }
  1426. yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
  1427. }
  1428. return yy_current_state;
  1429. }
  1430. /* yy_try_NUL_trans - try to make a transition on the NUL character
  1431. *
  1432. * synopsis
  1433. * next_state = yy_try_NUL_trans( current_state );
  1434. */
  1435. static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
  1436. {
  1437. int yy_is_jam;
  1438. char *yy_cp = (yy_c_buf_p);
  1439. YY_CHAR yy_c = 1;
  1440. if ( yy_accept[yy_current_state] )
  1441. {
  1442. (yy_last_accepting_state) = yy_current_state;
  1443. (yy_last_accepting_cpos) = yy_cp;
  1444. }
  1445. while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  1446. {
  1447. yy_current_state = (int) yy_def[yy_current_state];
  1448. if ( yy_current_state >= 143 )
  1449. yy_c = yy_meta[yy_c];
  1450. }
  1451. yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
  1452. yy_is_jam = (yy_current_state == 142);
  1453. return yy_is_jam ? 0 : yy_current_state;
  1454. }
  1455. #ifndef YY_NO_UNPUT
  1456. static void yyunput (int c, char * yy_bp )
  1457. {
  1458. char *yy_cp;
  1459. yy_cp = (yy_c_buf_p);
  1460. /* undo effects of setting up yytext */
  1461. *yy_cp = (yy_hold_char);
  1462. if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
  1463. { /* need to shift things up to make room */
  1464. /* +2 for EOB chars. */
  1465. int number_to_move = (yy_n_chars) + 2;
  1466. char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
  1467. YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
  1468. char *source =
  1469. &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
  1470. while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
  1471. *--dest = *--source;
  1472. yy_cp += (int) (dest - source);
  1473. yy_bp += (int) (dest - source);
  1474. YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
  1475. (yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
  1476. if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
  1477. YY_FATAL_ERROR( "flex scanner push-back overflow" );
  1478. }
  1479. *--yy_cp = (char) c;
  1480. (yytext_ptr) = yy_bp;
  1481. (yy_hold_char) = *yy_cp;
  1482. (yy_c_buf_p) = yy_cp;
  1483. }
  1484. #endif
  1485. #ifndef YY_NO_INPUT
  1486. #ifdef __cplusplus
  1487. static int yyinput (void)
  1488. #else
  1489. static int input (void)
  1490. #endif
  1491. {
  1492. int c;
  1493. *(yy_c_buf_p) = (yy_hold_char);
  1494. if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
  1495. {
  1496. /* yy_c_buf_p now points to the character we want to return.
  1497. * If this occurs *before* the EOB characters, then it's a
  1498. * valid NUL; if not, then we've hit the end of the buffer.
  1499. */
  1500. if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
  1501. /* This was really a NUL. */
  1502. *(yy_c_buf_p) = '\0';
  1503. else
  1504. { /* need more input */
  1505. int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
  1506. ++(yy_c_buf_p);
  1507. switch ( yy_get_next_buffer( ) )
  1508. {
  1509. case EOB_ACT_LAST_MATCH:
  1510. /* This happens because yy_g_n_b()
  1511. * sees that we've accumulated a
  1512. * token and flags that we need to
  1513. * try matching the token before
  1514. * proceeding. But for input(),
  1515. * there's no matching to consider.
  1516. * So convert the EOB_ACT_LAST_MATCH
  1517. * to EOB_ACT_END_OF_FILE.
  1518. */
  1519. /* Reset buffer status. */
  1520. yyrestart( yyin );
  1521. /*FALLTHROUGH*/
  1522. case EOB_ACT_END_OF_FILE:
  1523. {
  1524. if ( yywrap( ) )
  1525. return 0;
  1526. if ( ! (yy_did_buffer_switch_on_eof) )
  1527. YY_NEW_FILE;
  1528. #ifdef __cplusplus
  1529. return yyinput();
  1530. #else
  1531. return input();
  1532. #endif
  1533. }
  1534. case EOB_ACT_CONTINUE_SCAN:
  1535. (yy_c_buf_p) = (yytext_ptr) + offset;
  1536. break;
  1537. }
  1538. }
  1539. }
  1540. c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
  1541. *(yy_c_buf_p) = '\0'; /* preserve yytext */
  1542. (yy_hold_char) = *++(yy_c_buf_p);
  1543. YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
  1544. return c;
  1545. }
  1546. #endif /* ifndef YY_NO_INPUT */
  1547. /** Immediately switch to a different input stream.
  1548. * @param input_file A readable stream.
  1549. *
  1550. * @note This function does not reset the start condition to @c INITIAL .
  1551. */
  1552. void yyrestart (FILE * input_file )
  1553. {
  1554. if ( ! YY_CURRENT_BUFFER ){
  1555. yyensure_buffer_stack ();
  1556. YY_CURRENT_BUFFER_LVALUE =
  1557. yy_create_buffer( yyin, YY_BUF_SIZE );
  1558. }
  1559. yy_init_buffer( YY_CURRENT_BUFFER, input_file );
  1560. yy_load_buffer_state( );
  1561. }
  1562. /** Switch to a different input buffer.
  1563. * @param new_buffer The new input buffer.
  1564. *
  1565. */
  1566. void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
  1567. {
  1568. /* TODO. We should be able to replace this entire function body
  1569. * with
  1570. * yypop_buffer_state();
  1571. * yypush_buffer_state(new_buffer);
  1572. */
  1573. yyensure_buffer_stack ();
  1574. if ( YY_CURRENT_BUFFER == new_buffer )
  1575. return;
  1576. if ( YY_CURRENT_BUFFER )
  1577. {
  1578. /* Flush out information for old buffer. */
  1579. *(yy_c_buf_p) = (yy_hold_char);
  1580. YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
  1581. YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
  1582. }
  1583. YY_CURRENT_BUFFER_LVALUE = new_buffer;
  1584. yy_load_buffer_state( );
  1585. /* We don't actually know whether we did this switch during
  1586. * EOF (yywrap()) processing, but the only time this flag
  1587. * is looked at is after yywrap() is called, so it's safe
  1588. * to go ahead and always set it.
  1589. */
  1590. (yy_did_buffer_switch_on_eof) = 1;
  1591. }
  1592. static void yy_load_buffer_state (void)
  1593. {
  1594. (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
  1595. (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
  1596. yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
  1597. (yy_hold_char) = *(yy_c_buf_p);
  1598. }
  1599. /** Allocate and initialize an input buffer state.
  1600. * @param file A readable stream.
  1601. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
  1602. *
  1603. * @return the allocated buffer state.
  1604. */
  1605. YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
  1606. {
  1607. YY_BUFFER_STATE b;
  1608. b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
  1609. if ( ! b )
  1610. YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
  1611. b->yy_buf_size = size;
  1612. /* yy_ch_buf has to be 2 characters longer than the size given because
  1613. * we need to put in 2 end-of-buffer characters.
  1614. */
  1615. b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
  1616. if ( ! b->yy_ch_buf )
  1617. YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
  1618. b->yy_is_our_buffer = 1;
  1619. yy_init_buffer( b, file );
  1620. return b;
  1621. }
  1622. /** Destroy the buffer.
  1623. * @param b a buffer created with yy_create_buffer()
  1624. *
  1625. */
  1626. void yy_delete_buffer (YY_BUFFER_STATE b )
  1627. {
  1628. if ( ! b )
  1629. return;
  1630. if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
  1631. YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
  1632. if ( b->yy_is_our_buffer )
  1633. yyfree( (void *) b->yy_ch_buf );
  1634. yyfree( (void *) b );
  1635. }
  1636. /* Initializes or reinitializes a buffer.
  1637. * This function is sometimes called more than once on the same buffer,
  1638. * such as during a yyrestart() or at EOF.
  1639. */
  1640. static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
  1641. {
  1642. int oerrno = errno;
  1643. yy_flush_buffer( b );
  1644. b->yy_input_file = file;
  1645. b->yy_fill_buffer = 1;
  1646. /* If b is the current buffer, then yy_init_buffer was _probably_
  1647. * called from yyrestart() or through yy_get_next_buffer.
  1648. * In that case, we don't want to reset the lineno or column.
  1649. */
  1650. if (b != YY_CURRENT_BUFFER){
  1651. b->yy_bs_lineno = 1;
  1652. b->yy_bs_column = 0;
  1653. }
  1654. b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
  1655. errno = oerrno;
  1656. }
  1657. /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
  1658. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
  1659. *
  1660. */
  1661. void yy_flush_buffer (YY_BUFFER_STATE b )
  1662. {
  1663. if ( ! b )
  1664. return;
  1665. b->yy_n_chars = 0;
  1666. /* We always need two end-of-buffer characters. The first causes
  1667. * a transition to the end-of-buffer state. The second causes
  1668. * a jam in that state.
  1669. */
  1670. b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
  1671. b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
  1672. b->yy_buf_pos = &b->yy_ch_buf[0];
  1673. b->yy_at_bol = 1;
  1674. b->yy_buffer_status = YY_BUFFER_NEW;
  1675. if ( b == YY_CURRENT_BUFFER )
  1676. yy_load_buffer_state( );
  1677. }
  1678. /** Pushes the new state onto the stack. The new state becomes
  1679. * the current state. This function will allocate the stack
  1680. * if necessary.
  1681. * @param new_buffer The new state.
  1682. *
  1683. */
  1684. void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
  1685. {
  1686. if (new_buffer == NULL)
  1687. return;
  1688. yyensure_buffer_stack();
  1689. /* This block is copied from yy_switch_to_buffer. */
  1690. if ( YY_CURRENT_BUFFER )
  1691. {
  1692. /* Flush out information for old buffer. */
  1693. *(yy_c_buf_p) = (yy_hold_char);
  1694. YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
  1695. YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
  1696. }
  1697. /* Only push if top exists. Otherwise, replace top. */
  1698. if (YY_CURRENT_BUFFER)
  1699. (yy_buffer_stack_top)++;
  1700. YY_CURRENT_BUFFER_LVALUE = new_buffer;
  1701. /* copied from yy_switch_to_buffer. */
  1702. yy_load_buffer_state( );
  1703. (yy_did_buffer_switch_on_eof) = 1;
  1704. }
  1705. /** Removes and deletes the top of the stack, if present.
  1706. * The next element becomes the new top.
  1707. *
  1708. */
  1709. void yypop_buffer_state (void)
  1710. {
  1711. if (!YY_CURRENT_BUFFER)
  1712. return;
  1713. yy_delete_buffer(YY_CURRENT_BUFFER );
  1714. YY_CURRENT_BUFFER_LVALUE = NULL;
  1715. if ((yy_buffer_stack_top) > 0)
  1716. --(yy_buffer_stack_top);
  1717. if (YY_CURRENT_BUFFER) {
  1718. yy_load_buffer_state( );
  1719. (yy_did_buffer_switch_on_eof) = 1;
  1720. }
  1721. }
  1722. /* Allocates the stack if it does not exist.
  1723. * Guarantees space for at least one push.
  1724. */
  1725. static void yyensure_buffer_stack (void)
  1726. {
  1727. yy_size_t num_to_alloc;
  1728. if (!(yy_buffer_stack)) {
  1729. /* First allocation is just for 2 elements, since we don't know if this
  1730. * scanner will even need a stack. We use 2 instead of 1 to avoid an
  1731. * immediate realloc on the next call.
  1732. */
  1733. num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
  1734. (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
  1735. (num_to_alloc * sizeof(struct yy_buffer_state*)
  1736. );
  1737. if ( ! (yy_buffer_stack) )
  1738. YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
  1739. memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
  1740. (yy_buffer_stack_max) = num_to_alloc;
  1741. (yy_buffer_stack_top) = 0;
  1742. return;
  1743. }
  1744. if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
  1745. /* Increase the buffer to prepare for a possible push. */
  1746. yy_size_t grow_size = 8 /* arbitrary grow size */;
  1747. num_to_alloc = (yy_buffer_stack_max) + grow_size;
  1748. (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
  1749. ((yy_buffer_stack),
  1750. num_to_alloc * sizeof(struct yy_buffer_state*)
  1751. );
  1752. if ( ! (yy_buffer_stack) )
  1753. YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
  1754. /* zero only the new slots.*/
  1755. memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
  1756. (yy_buffer_stack_max) = num_to_alloc;
  1757. }
  1758. }
  1759. /** Setup the input buffer state to scan directly from a user-specified character buffer.
  1760. * @param base the character buffer
  1761. * @param size the size in bytes of the character buffer
  1762. *
  1763. * @return the newly allocated buffer state object.
  1764. */
  1765. YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
  1766. {
  1767. YY_BUFFER_STATE b;
  1768. if ( size < 2 ||
  1769. base[size-2] != YY_END_OF_BUFFER_CHAR ||
  1770. base[size-1] != YY_END_OF_BUFFER_CHAR )
  1771. /* They forgot to leave room for the EOB's. */
  1772. return NULL;
  1773. b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
  1774. if ( ! b )
  1775. YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
  1776. b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
  1777. b->yy_buf_pos = b->yy_ch_buf = base;
  1778. b->yy_is_our_buffer = 0;
  1779. b->yy_input_file = NULL;
  1780. b->yy_n_chars = b->yy_buf_size;
  1781. b->yy_is_interactive = 0;
  1782. b->yy_at_bol = 1;
  1783. b->yy_fill_buffer = 0;
  1784. b->yy_buffer_status = YY_BUFFER_NEW;
  1785. yy_switch_to_buffer( b );
  1786. return b;
  1787. }
  1788. /** Setup the input buffer state to scan a string. The next call to yylex() will
  1789. * scan from a @e copy of @a str.
  1790. * @param yystr a NUL-terminated string to scan
  1791. *
  1792. * @return the newly allocated buffer state object.
  1793. * @note If you want to scan bytes that may contain NUL values, then use
  1794. * yy_scan_bytes() instead.
  1795. */
  1796. YY_BUFFER_STATE yy_scan_string (const char * yystr )
  1797. {
  1798. return yy_scan_bytes( yystr, (int) strlen(yystr) );
  1799. }
  1800. /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
  1801. * scan from a @e copy of @a bytes.
  1802. * @param yybytes the byte buffer to scan
  1803. * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
  1804. *
  1805. * @return the newly allocated buffer state object.
  1806. */
  1807. YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
  1808. {
  1809. YY_BUFFER_STATE b;
  1810. char *buf;
  1811. yy_size_t n;
  1812. int i;
  1813. /* Get memory for full buffer, including space for trailing EOB's. */
  1814. n = (yy_size_t) (_yybytes_len + 2);
  1815. buf = (char *) yyalloc( n );
  1816. if ( ! buf )
  1817. YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
  1818. for ( i = 0; i < _yybytes_len; ++i )
  1819. buf[i] = yybytes[i];
  1820. buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
  1821. b = yy_scan_buffer( buf, n );
  1822. if ( ! b )
  1823. YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
  1824. /* It's okay to grow etc. this buffer, and we should throw it
  1825. * away when we're done.
  1826. */
  1827. b->yy_is_our_buffer = 1;
  1828. return b;
  1829. }
  1830. #ifndef YY_EXIT_FAILURE
  1831. #define YY_EXIT_FAILURE 2
  1832. #endif
  1833. static void yynoreturn yy_fatal_error (const char* msg )
  1834. {
  1835. fprintf( stderr, "%s\n", msg );
  1836. exit( YY_EXIT_FAILURE );
  1837. }
  1838. /* Redefine yyless() so it works in section 3 code. */
  1839. #undef yyless
  1840. #define yyless(n) \
  1841. do \
  1842. { \
  1843. /* Undo effects of setting up yytext. */ \
  1844. int yyless_macro_arg = (n); \
  1845. YY_LESS_LINENO(yyless_macro_arg);\
  1846. yytext[yyleng] = (yy_hold_char); \
  1847. (yy_c_buf_p) = yytext + yyless_macro_arg; \
  1848. (yy_hold_char) = *(yy_c_buf_p); \
  1849. *(yy_c_buf_p) = '\0'; \
  1850. yyleng = yyless_macro_arg; \
  1851. } \
  1852. while ( 0 )
  1853. /* Accessor methods (get/set functions) to struct members. */
  1854. /** Get the current line number.
  1855. *
  1856. */
  1857. int yyget_lineno (void)
  1858. {
  1859. return yylineno;
  1860. }
  1861. /** Get the input stream.
  1862. *
  1863. */
  1864. FILE *yyget_in (void)
  1865. {
  1866. return yyin;
  1867. }
  1868. /** Get the output stream.
  1869. *
  1870. */
  1871. FILE *yyget_out (void)
  1872. {
  1873. return yyout;
  1874. }
  1875. /** Get the length of the current token.
  1876. *
  1877. */
  1878. int yyget_leng (void)
  1879. {
  1880. return yyleng;
  1881. }
  1882. /** Get the current token.
  1883. *
  1884. */
  1885. char *yyget_text (void)
  1886. {
  1887. return yytext;
  1888. }
  1889. /** Set the current line number.
  1890. * @param _line_number line number
  1891. *
  1892. */
  1893. void yyset_lineno (int _line_number )
  1894. {
  1895. yylineno = _line_number;
  1896. }
  1897. /** Set the input stream. This does not discard the current
  1898. * input buffer.
  1899. * @param _in_str A readable stream.
  1900. *
  1901. * @see yy_switch_to_buffer
  1902. */
  1903. void yyset_in (FILE * _in_str )
  1904. {
  1905. yyin = _in_str ;
  1906. }
  1907. void yyset_out (FILE * _out_str )
  1908. {
  1909. yyout = _out_str ;
  1910. }
  1911. int yyget_debug (void)
  1912. {
  1913. return yy_flex_debug;
  1914. }
  1915. void yyset_debug (int _bdebug )
  1916. {
  1917. yy_flex_debug = _bdebug ;
  1918. }
  1919. static int yy_init_globals (void)
  1920. {
  1921. /* Initialization is the same as for the non-reentrant scanner.
  1922. * This function is called from yylex_destroy(), so don't allocate here.
  1923. */
  1924. (yy_buffer_stack) = NULL;
  1925. (yy_buffer_stack_top) = 0;
  1926. (yy_buffer_stack_max) = 0;
  1927. (yy_c_buf_p) = NULL;
  1928. (yy_init) = 0;
  1929. (yy_start) = 0;
  1930. /* Defined in main.c */
  1931. #ifdef YY_STDINIT
  1932. yyin = stdin;
  1933. yyout = stdout;
  1934. #else
  1935. yyin = NULL;
  1936. yyout = NULL;
  1937. #endif
  1938. /* For future reference: Set errno on error, since we are called by
  1939. * yylex_init()
  1940. */
  1941. return 0;
  1942. }
  1943. /* yylex_destroy is for both reentrant and non-reentrant scanners. */
  1944. int yylex_destroy (void)
  1945. {
  1946. /* Pop the buffer stack, destroying each element. */
  1947. while(YY_CURRENT_BUFFER){
  1948. yy_delete_buffer( YY_CURRENT_BUFFER );
  1949. YY_CURRENT_BUFFER_LVALUE = NULL;
  1950. yypop_buffer_state();
  1951. }
  1952. /* Destroy the stack itself. */
  1953. yyfree((yy_buffer_stack) );
  1954. (yy_buffer_stack) = NULL;
  1955. /* Reset the globals. This is important in a non-reentrant scanner so the next time
  1956. * yylex() is called, initialization will occur. */
  1957. yy_init_globals( );
  1958. return 0;
  1959. }
  1960. /*
  1961. * Internal utility routines.
  1962. */
  1963. #ifndef yytext_ptr
  1964. static void yy_flex_strncpy (char* s1, const char * s2, int n )
  1965. {
  1966. int i;
  1967. for ( i = 0; i < n; ++i )
  1968. s1[i] = s2[i];
  1969. }
  1970. #endif
  1971. #ifdef YY_NEED_STRLEN
  1972. static int yy_flex_strlen (const char * s )
  1973. {
  1974. int n;
  1975. for ( n = 0; s[n]; ++n )
  1976. ;
  1977. return n;
  1978. }
  1979. #endif
  1980. void *yyalloc (yy_size_t size )
  1981. {
  1982. return malloc(size);
  1983. }
  1984. void *yyrealloc (void * ptr, yy_size_t size )
  1985. {
  1986. /* The cast to (char *) in the following accommodates both
  1987. * implementations that use char* generic pointers, and those
  1988. * that use void* generic pointers. It works with the latter
  1989. * because both ANSI C and C++ allow castless assignment from
  1990. * any pointer type to void*, and deal with argument conversions
  1991. * as though doing an assignment.
  1992. */
  1993. return realloc(ptr, size);
  1994. }
  1995. void yyfree (void * ptr )
  1996. {
  1997. free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
  1998. }
  1999. #define YYTABLES_NAME "yytables"
  2000. #line 123 "../../cmd/tools/gmlscan.l"
  2001. void gmlerror(const char *str)
  2002. {
  2003. if (errors)
  2004. return;
  2005. errors = 1;
  2006. agwarningf(" %s in line %d near '%s'\n", str,line_num,yytext);
  2007. }
  2008. int gmlerrors(void)
  2009. {
  2010. return errors;
  2011. }
  2012. void gmllexeof(void) { unput(GRAPH_EOF_TOKEN); }
  2013. #ifndef YY_CALL_ONLY_ARG
  2014. # define YY_CALL_ONLY_ARG void
  2015. #endif
  2016. int yywrap(YY_CALL_ONLY_ARG)
  2017. {
  2018. return 1;
  2019. }