11
2- #line 3 "lex.yy.c"
2+ #line 2 "lex.yy.c"
33
44#define YY_INT_ALIGNED short int
55
@@ -46,6 +46,7 @@ typedef int16_t flex_int16_t;
4646typedef uint16_t flex_uint16_t ;
4747typedef int32_t flex_int32_t ;
4848typedef uint32_t flex_uint32_t ;
49+ typedef uint64_t flex_uint64_t ;
4950#else
5051typedef signed char flex_int8_t ;
5152typedef short int flex_int16_t ;
@@ -154,7 +155,7 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
154155typedef size_t yy_size_t ;
155156#endif
156157
157- extern int yyleng ;
158+ extern yy_size_t yyleng ;
158159
159160extern FILE * yyin , * yyout ;
160161
@@ -197,7 +198,7 @@ struct yy_buffer_state
197198 /* Number of characters read into yy_ch_buf, not including EOB
198199 * characters.
199200 */
200- int yy_n_chars ;
201+ yy_size_t yy_n_chars ;
201202
202203 /* Whether we "own" the buffer - i.e., we know we created it,
203204 * and can realloc() it to grow it, and should free() it to
@@ -266,8 +267,8 @@ static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
266267
267268/* yy_hold_char holds the character lost when yytext is formed. */
268269static char yy_hold_char ;
269- static int yy_n_chars ; /* number of characters read into yy_ch_buf */
270- int yyleng ;
270+ static yy_size_t yy_n_chars ; /* number of characters read into yy_ch_buf */
271+ yy_size_t yyleng ;
271272
272273/* Points to current character in buffer. */
273274static char * yy_c_buf_p = NULL ;
@@ -294,7 +295,7 @@ static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
294295
295296YY_BUFFER_STATE yy_scan_buffer ( char * base , yy_size_t size );
296297YY_BUFFER_STATE yy_scan_string ( const char * yy_str );
297- YY_BUFFER_STATE yy_scan_bytes ( const char * bytes , int len );
298+ YY_BUFFER_STATE yy_scan_bytes ( const char * bytes , yy_size_t len );
298299
299300void * yyalloc ( yy_size_t );
300301void * yyrealloc ( void * , yy_size_t );
@@ -350,7 +351,7 @@ static void yynoreturn yy_fatal_error ( const char* msg );
350351 */
351352#define YY_DO_BEFORE_ACTION \
352353 (yytext_ptr) = yy_bp; \
353- yyleng = (int ) (yy_cp - yy_bp); \
354+ yyleng = (yy_size_t ) (yy_cp - yy_bp); \
354355 (yy_hold_char) = *yy_cp; \
355356 *yy_cp = '\0'; \
356357 (yy_c_buf_p) = yy_cp;
@@ -459,6 +460,13 @@ char *yytext;
459460#include <stdlib.h>
460461#include <string.h>
461462
463+ #if defined(_WIN32 ) || defined(_MSC_VER )
464+ #include <io.h>
465+ #define isatty _isatty
466+ #else
467+ #include <unistd.h>
468+ #endif
469+
462470#include "y.tab.h"
463471
464472int yylinenor = 1 ;
@@ -469,8 +477,8 @@ int simple_citation = 0;
469477
470478int commenting = 0 ;
471479
472- #line 473 "lex.yy.c"
473- #line 474 "lex.yy.c"
480+ #line 480 "lex.yy.c"
481+ #line 481 "lex.yy.c"
474482
475483#define INITIAL 0
476484
@@ -509,7 +517,7 @@ FILE *yyget_out ( void );
509517
510518void yyset_out ( FILE * _out_str );
511519
512- int yyget_leng ( void );
520+ yy_size_t yyget_leng ( void );
513521
514522char * yyget_text ( void );
515523
@@ -578,7 +586,7 @@ static int input ( void );
578586 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
579587 { \
580588 int c = '*'; \
581- int n; \
589+ yy_size_t n; \
582590 for ( n = 0; n < max_size && \
583591 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
584592 buf[n] = (char) c; \
@@ -687,10 +695,10 @@ YY_DECL
687695 }
688696
689697 {
690- #line 27 "lex.l"
698+ #line 34 "lex.l"
691699
692700
693- #line 694 "lex.yy.c"
701+ #line 701 "lex.yy.c"
694702
695703 while ( /*CONSTCOND*/ 1 ) /* loops until end-of-file is reached */
696704 {
@@ -749,15 +757,15 @@ YY_DECL
749757
750758case 1 :
751759YY_RULE_SETUP
752- #line 29 "lex.l"
760+ #line 36 "lex.l"
753761{
754762 // Comment
755763 commenting = 1 ;
756764}
757765 YY_BREAK
758766case 2 :
759767YY_RULE_SETUP
760- #line 34 "lex.l"
768+ #line 41 "lex.l"
761769{
762770 memset (yylval .id ,0 ,sizeof (yylval .id ));
763771 memcpy (
@@ -770,7 +778,7 @@ YY_RULE_SETUP
770778 YY_BREAK
771779case 3 :
772780YY_RULE_SETUP
773- #line 43 "lex.l"
781+ #line 50 "lex.l"
774782{
775783 if ( double_citation || simple_citation ) {
776784 memset (yylval .id ,0 ,sizeof (yylval .id ));
@@ -788,7 +796,7 @@ YY_RULE_SETUP
788796 YY_BREAK
789797case 4 :
790798YY_RULE_SETUP
791- #line 58 "lex.l"
799+ #line 65 "lex.l"
792800{
793801 yylval .id [0 ] = yytext [0 ];
794802 yylval .id [1 ] = 0 ;
@@ -803,21 +811,21 @@ YY_RULE_SETUP
803811 YY_BREAK
804812case 5 :
805813YY_RULE_SETUP
806- #line 70 "lex.l"
814+ #line 77 "lex.l"
807815{
808816 return RETURN ;
809817}
810818 YY_BREAK
811819case 6 :
812820YY_RULE_SETUP
813- #line 74 "lex.l"
821+ #line 81 "lex.l"
814822{
815823 return FOREACH ;
816824}
817825 YY_BREAK
818826case 7 :
819827YY_RULE_SETUP
820- #line 78 "lex.l"
828+ #line 85 "lex.l"
821829{
822830 // return spaces only if within a citation
823831 if ( double_citation || simple_citation ) {
@@ -827,7 +835,7 @@ YY_RULE_SETUP
827835 YY_BREAK
828836case 8 :
829837YY_RULE_SETUP
830- #line 85 "lex.l"
838+ #line 92 "lex.l"
831839{
832840 memset (yylval .id ,0 ,sizeof (yylval .id ));
833841 memcpy (
@@ -841,7 +849,7 @@ YY_RULE_SETUP
841849case 9 :
842850/* rule 9 can match eol */
843851YY_RULE_SETUP
844- #line 95 "lex.l"
852+ #line 102 "lex.l"
845853{
846854 yylinenor ++ ;
847855 if ( commenting ) {
@@ -855,15 +863,15 @@ YY_RULE_SETUP
855863 YY_BREAK
856864case 10 :
857865YY_RULE_SETUP
858- #line 106 "lex.l"
866+ #line 113 "lex.l"
859867;
860868 YY_BREAK
861869case 11 :
862870YY_RULE_SETUP
863- #line 108 "lex.l"
871+ #line 115 "lex.l"
864872ECHO ;
865873 YY_BREAK
866- #line 867 "lex.yy.c"
874+ #line 874 "lex.yy.c"
867875case YY_STATE_EOF (INITIAL ):
868876 yyterminate ();
869877
@@ -1050,7 +1058,7 @@ static int yy_get_next_buffer (void)
10501058
10511059 else
10521060 {
1053- int num_to_read =
1061+ yy_size_t num_to_read =
10541062 YY_CURRENT_BUFFER_LVALUE -> yy_buf_size - number_to_move - 1 ;
10551063
10561064 while ( num_to_read <= 0 )
@@ -1064,7 +1072,7 @@ static int yy_get_next_buffer (void)
10641072
10651073 if ( b -> yy_is_our_buffer )
10661074 {
1067- int new_size = b -> yy_buf_size * 2 ;
1075+ yy_size_t new_size = b -> yy_buf_size * 2 ;
10681076
10691077 if ( new_size <= 0 )
10701078 b -> yy_buf_size += b -> yy_buf_size / 8 ;
@@ -1122,7 +1130,7 @@ static int yy_get_next_buffer (void)
11221130
11231131 if (((yy_n_chars ) + number_to_move ) > YY_CURRENT_BUFFER_LVALUE -> yy_buf_size ) {
11241132 /* Extend the array by 50%, plus the number we really need. */
1125- int new_size = (yy_n_chars ) + number_to_move + ((yy_n_chars ) >> 1 );
1133+ yy_size_t new_size = (yy_n_chars ) + number_to_move + ((yy_n_chars ) >> 1 );
11261134 YY_CURRENT_BUFFER_LVALUE -> yy_ch_buf = (char * ) yyrealloc (
11271135 (void * ) YY_CURRENT_BUFFER_LVALUE -> yy_ch_buf , (yy_size_t ) new_size );
11281136 if ( ! YY_CURRENT_BUFFER_LVALUE -> yy_ch_buf )
@@ -1211,7 +1219,7 @@ static int yy_get_next_buffer (void)
12111219 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE -> yy_ch_buf + 2 )
12121220 { /* need to shift things up to make room */
12131221 /* +2 for EOB chars. */
1214- int number_to_move = (yy_n_chars ) + 2 ;
1222+ yy_size_t number_to_move = (yy_n_chars ) + 2 ;
12151223 char * dest = & YY_CURRENT_BUFFER_LVALUE -> yy_ch_buf [
12161224 YY_CURRENT_BUFFER_LVALUE -> yy_buf_size + 2 ];
12171225 char * source =
@@ -1262,7 +1270,7 @@ static int yy_get_next_buffer (void)
12621270
12631271 else
12641272 { /* need more input */
1265- int offset = (int ) (( yy_c_buf_p ) - (yytext_ptr ) );
1273+ yy_size_t offset = (yy_c_buf_p ) - (yytext_ptr );
12661274 ++ (yy_c_buf_p );
12671275
12681276 switch ( yy_get_next_buffer ( ) )
@@ -1631,12 +1639,12 @@ YY_BUFFER_STATE yy_scan_string (const char * yystr )
16311639 *
16321640 * @return the newly allocated buffer state object.
16331641 */
1634- YY_BUFFER_STATE yy_scan_bytes (const char * yybytes , int _yybytes_len )
1642+ YY_BUFFER_STATE yy_scan_bytes (const char * yybytes , yy_size_t _yybytes_len )
16351643{
16361644 YY_BUFFER_STATE b ;
16371645 char * buf ;
16381646 yy_size_t n ;
1639- int i ;
1647+ yy_size_t i ;
16401648
16411649 /* Get memory for full buffer, including space for trailing EOB's. */
16421650 n = (yy_size_t ) (_yybytes_len + 2 );
@@ -1678,7 +1686,7 @@ static void yynoreturn yy_fatal_error (const char* msg )
16781686 do \
16791687 { \
16801688 /* Undo effects of setting up yytext. */ \
1681- int yyless_macro_arg = (n); \
1689+ yy_size_t yyless_macro_arg = (n); \
16821690 YY_LESS_LINENO(yyless_macro_arg);\
16831691 yytext[yyleng] = (yy_hold_char); \
16841692 (yy_c_buf_p) = yytext + yyless_macro_arg; \
@@ -1718,7 +1726,7 @@ FILE *yyget_out (void)
17181726/** Get the length of the current token.
17191727 *
17201728 */
1721- int yyget_leng (void )
1729+ yy_size_t yyget_leng (void )
17221730{
17231731 return yyleng ;
17241732}
@@ -1868,6 +1876,6 @@ void yyfree (void * ptr )
18681876
18691877#define YYTABLES_NAME "yytables"
18701878
1871- #line 108 "lex.l"
1879+ #line 115 "lex.l"
18721880
18731881
0 commit comments