cmFortranLexer.cxx 73 KB

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