ソースを参照

Add shebang to build.sh

Corey Richardson 5年前
コミット
e8439b7a9b
4個のファイルの変更40行の追加53行の削除
  1. 1
    0
      build.sh
  2. 34
    48
      lex.yy.c
  3. 3
    3
      parser.tab.c
  4. 2
    2
      parser.tab.h

+ 1
- 0
build.sh ファイルの表示

@@ -1,3 +1,4 @@
1
+#!/bin/sh
1 2
 if [ ! -f .submodule_stamp ]; then
2 3
     git submodule init && git submodule sync && git submodule update
3 4
     touch .submodule_stamp

+ 34
- 48
lex.yy.c ファイルの表示

@@ -8,7 +8,7 @@
8 8
 #define FLEX_SCANNER
9 9
 #define YY_FLEX_MAJOR_VERSION 2
10 10
 #define YY_FLEX_MINOR_VERSION 5
11
-#define YY_FLEX_SUBMINOR_VERSION 35
11
+#define YY_FLEX_SUBMINOR_VERSION 39
12 12
 #if YY_FLEX_SUBMINOR_VERSION > 0
13 13
 #define FLEX_BETA
14 14
 #endif
@@ -141,15 +141,7 @@ typedef unsigned int flex_uint32_t;
141 141
 
142 142
 /* Size of default input buffer. */
143 143
 #ifndef YY_BUF_SIZE
144
-#ifdef __ia64__
145
-/* On IA-64, the buffer size is 16k, not 8k.
146
- * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
147
- * Ditto for the __ia64__ case accordingly.
148
- */
149
-#define YY_BUF_SIZE 32768
150
-#else
151 144
 #define YY_BUF_SIZE 16384
152
-#endif /* __ia64__ */
153 145
 #endif
154 146
 
155 147
 /* The state buf must be large enough to hold one state per character in the main buffer.
@@ -161,7 +153,12 @@ typedef unsigned int flex_uint32_t;
161 153
 typedef struct yy_buffer_state *YY_BUFFER_STATE;
162 154
 #endif
163 155
 
164
-extern int yyleng;
156
+#ifndef YY_TYPEDEF_YY_SIZE_T
157
+#define YY_TYPEDEF_YY_SIZE_T
158
+typedef size_t yy_size_t;
159
+#endif
160
+
161
+extern yy_size_t yyleng;
165 162
 
166 163
 extern FILE *yyin, *yyout;
167 164
 
@@ -170,6 +167,7 @@ extern FILE *yyin, *yyout;
170 167
 #define EOB_ACT_LAST_MATCH 2
171 168
 
172 169
     #define YY_LESS_LINENO(n)
170
+    #define YY_LINENO_REWIND_TO(ptr)
173 171
     
174 172
 /* Return all but the first "n" matched characters back to the input stream. */
175 173
 #define yyless(n) \
@@ -187,11 +185,6 @@ extern FILE *yyin, *yyout;
187 185
 
188 186
 #define unput(c) yyunput( c, (yytext_ptr)  )
189 187
 
190
-#ifndef YY_TYPEDEF_YY_SIZE_T
191
-#define YY_TYPEDEF_YY_SIZE_T
192
-typedef size_t yy_size_t;
193
-#endif
194
-
195 188
 #ifndef YY_STRUCT_YY_BUFFER_STATE
196 189
 #define YY_STRUCT_YY_BUFFER_STATE
197 190
 struct yy_buffer_state
@@ -209,7 +202,7 @@ struct yy_buffer_state
209 202
 	/* Number of characters read into yy_ch_buf, not including EOB
210 203
 	 * characters.
211 204
 	 */
212
-	int yy_n_chars;
205
+	yy_size_t yy_n_chars;
213 206
 
214 207
 	/* Whether we "own" the buffer - i.e., we know we created it,
215 208
 	 * and can realloc() it to grow it, and should free() it to
@@ -279,8 +272,8 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
279 272
 
280 273
 /* yy_hold_char holds the character lost when yytext is formed. */
281 274
 static char yy_hold_char;
282
-static int yy_n_chars;		/* number of characters read into yy_ch_buf */
283
-int yyleng;
275
+static yy_size_t yy_n_chars;		/* number of characters read into yy_ch_buf */
276
+yy_size_t yyleng;
284 277
 
285 278
 /* Points to current character in buffer. */
286 279
 static char *yy_c_buf_p = (char *) 0;
@@ -308,7 +301,7 @@ static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file  );
308 301
 
309 302
 YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size  );
310 303
 YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str  );
311
-YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len  );
304
+YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len  );
312 305
 
313 306
 void *yyalloc (yy_size_t  );
314 307
 void *yyrealloc (void *,yy_size_t  );
@@ -604,7 +597,7 @@ static void update_loc(YYLTYPE *yylloc, char *yytext){
604 597
 <STRING>. { str_putc(*yytext); }
605 598
 
606 599
 */
607
-#line 608 "lex.yy.c"
600
+#line 601 "lex.yy.c"
608 601
 
609 602
 #define INITIAL 0
610 603
 
@@ -643,7 +636,7 @@ FILE *yyget_out (void );
643 636
 
644 637
 void yyset_out  (FILE * out_str  );
645 638
 
646
-int yyget_leng (void );
639
+yy_size_t yyget_leng (void );
647 640
 
648 641
 char *yyget_text (void );
649 642
 
@@ -693,12 +686,7 @@ static int input (void );
693 686
 
694 687
 /* Amount of stuff to slurp up with each read. */
695 688
 #ifndef YY_READ_BUF_SIZE
696
-#ifdef __ia64__
697
-/* On IA-64, the buffer size is 16k, not 8k */
698
-#define YY_READ_BUF_SIZE 16384
699
-#else
700 689
 #define YY_READ_BUF_SIZE 8192
701
-#endif /* __ia64__ */
702 690
 #endif
703 691
 
704 692
 /* Copy whatever the last rule matched to the standard output. */
@@ -805,11 +793,6 @@ YY_DECL
805 793
     
806 794
         YYLTYPE * yylloc;
807 795
     
808
-#line 85 "tokenizer.lex"
809
-
810
-
811
-#line 812 "lex.yy.c"
812
-
813 796
     yylval = yylval_param;
814 797
 
815 798
     yylloc = yylloc_param;
@@ -840,6 +823,12 @@ YY_DECL
840 823
 		yy_load_buffer_state( );
841 824
 		}
842 825
 
826
+	{
827
+#line 85 "tokenizer.lex"
828
+
829
+
830
+#line 831 "lex.yy.c"
831
+
843 832
 	while ( 1 )		/* loops until end-of-file is reached */
844 833
 		{
845 834
 		yy_cp = (yy_c_buf_p);
@@ -856,7 +845,7 @@ YY_DECL
856 845
 yy_match:
857 846
 		do
858 847
 			{
859
-			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
848
+			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
860 849
 			if ( yy_accept[yy_current_state] )
861 850
 				{
862 851
 				(yy_last_accepting_state) = yy_current_state;
@@ -1209,7 +1198,7 @@ YY_RULE_SETUP
1209 1198
 #line 209 "tokenizer.lex"
1210 1199
 ECHO;
1211 1200
 	YY_BREAK
1212
-#line 1213 "lex.yy.c"
1201
+#line 1202 "lex.yy.c"
1213 1202
 case YY_STATE_EOF(INITIAL):
1214 1203
 	yyterminate();
1215 1204
 
@@ -1340,6 +1329,7 @@ case YY_STATE_EOF(INITIAL):
1340 1329
 			"fatal flex scanner internal error--no action found" );
1341 1330
 	} /* end of action switch */
1342 1331
 		} /* end of scanning one token */
1332
+	} /* end of user's declarations */
1343 1333
 } /* end of yylex */
1344 1334
 
1345 1335
 /* yy_get_next_buffer - try to read in a new buffer
@@ -1395,21 +1385,21 @@ static int yy_get_next_buffer (void)
1395 1385
 
1396 1386
 	else
1397 1387
 		{
1398
-			int num_to_read =
1388
+			yy_size_t num_to_read =
1399 1389
 			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1400 1390
 
1401 1391
 		while ( num_to_read <= 0 )
1402 1392
 			{ /* Not enough room in the buffer - grow it. */
1403 1393
 
1404 1394
 			/* just a shorter name for the current buffer */
1405
-			YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
1395
+			YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
1406 1396
 
1407 1397
 			int yy_c_buf_p_offset =
1408 1398
 				(int) ((yy_c_buf_p) - b->yy_ch_buf);
1409 1399
 
1410 1400
 			if ( b->yy_is_our_buffer )
1411 1401
 				{
1412
-				int new_size = b->yy_buf_size * 2;
1402
+				yy_size_t new_size = b->yy_buf_size * 2;
1413 1403
 
1414 1404
 				if ( new_size <= 0 )
1415 1405
 					b->yy_buf_size += b->yy_buf_size / 8;
@@ -1440,7 +1430,7 @@ static int yy_get_next_buffer (void)
1440 1430
 
1441 1431
 		/* Read in more data. */
1442 1432
 		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1443
-			(yy_n_chars), (size_t) num_to_read );
1433
+			(yy_n_chars), num_to_read );
1444 1434
 
1445 1435
 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1446 1436
 		}
@@ -1535,7 +1525,7 @@ static int yy_get_next_buffer (void)
1535 1525
 	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1536 1526
 	yy_is_jam = (yy_current_state == 112);
1537 1527
 
1538
-	return yy_is_jam ? 0 : yy_current_state;
1528
+		return yy_is_jam ? 0 : yy_current_state;
1539 1529
 }
1540 1530
 
1541 1531
     static void yyunput (int c, register char * yy_bp )
@@ -1550,7 +1540,7 @@ static int yy_get_next_buffer (void)
1550 1540
 	if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1551 1541
 		{ /* need to shift things up to make room */
1552 1542
 		/* +2 for EOB chars. */
1553
-		register int number_to_move = (yy_n_chars) + 2;
1543
+		register yy_size_t number_to_move = (yy_n_chars) + 2;
1554 1544
 		register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1555 1545
 					YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1556 1546
 		register char *source =
@@ -1599,7 +1589,7 @@ static int yy_get_next_buffer (void)
1599 1589
 
1600 1590
 		else
1601 1591
 			{ /* need more input */
1602
-			int offset = (yy_c_buf_p) - (yytext_ptr);
1592
+			yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
1603 1593
 			++(yy_c_buf_p);
1604 1594
 
1605 1595
 			switch ( yy_get_next_buffer(  ) )
@@ -1759,10 +1749,6 @@ static void yy_load_buffer_state  (void)
1759 1749
 	yyfree((void *) b  );
1760 1750
 }
1761 1751
 
1762
-#ifndef __cplusplus
1763
-extern int isatty (int );
1764
-#endif /* __cplusplus */
1765
-    
1766 1752
 /* Initializes or reinitializes a buffer.
1767 1753
  * This function is sometimes called more than once on the same buffer,
1768 1754
  * such as during a yyrestart() or at EOF.
@@ -1875,7 +1861,7 @@ void yypop_buffer_state (void)
1875 1861
  */
1876 1862
 static void yyensure_buffer_stack (void)
1877 1863
 {
1878
-	int num_to_alloc;
1864
+	yy_size_t num_to_alloc;
1879 1865
     
1880 1866
 	if (!(yy_buffer_stack)) {
1881 1867
 
@@ -1972,12 +1958,12 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
1972 1958
  * 
1973 1959
  * @return the newly allocated buffer state object.
1974 1960
  */
1975
-YY_BUFFER_STATE yy_scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
1961
+YY_BUFFER_STATE yy_scan_bytes  (yyconst char * yybytes, yy_size_t  _yybytes_len )
1976 1962
 {
1977 1963
 	YY_BUFFER_STATE b;
1978 1964
 	char *buf;
1979 1965
 	yy_size_t n;
1980
-	int i;
1966
+	yy_size_t i;
1981 1967
     
1982 1968
 	/* Get memory for full buffer, including space for trailing EOB's. */
1983 1969
 	n = _yybytes_len + 2;
@@ -2059,7 +2045,7 @@ FILE *yyget_out  (void)
2059 2045
 /** Get the length of the current token.
2060 2046
  * 
2061 2047
  */
2062
-int yyget_leng  (void)
2048
+yy_size_t yyget_leng  (void)
2063 2049
 {
2064 2050
         return yyleng;
2065 2051
 }

+ 3
- 3
parser.tab.c ファイルの表示

@@ -1,8 +1,8 @@
1
-/* A Bison parser, made by GNU Bison 3.0.2.  */
1
+/* A Bison parser, made by GNU Bison 3.0.4.  */
2 2
 
3 3
 /* Bison implementation for Yacc-like parsers in C
4 4
 
5
-   Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
5
+   Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
6 6
 
7 7
    This program is free software: you can redistribute it and/or modify
8 8
    it under the terms of the GNU General Public License as published by
@@ -44,7 +44,7 @@
44 44
 #define YYBISON 1
45 45
 
46 46
 /* Bison version.  */
47
-#define YYBISON_VERSION "3.0.2"
47
+#define YYBISON_VERSION "3.0.4"
48 48
 
49 49
 /* Skeleton name.  */
50 50
 #define YYSKELETON_NAME "yacc.c"

+ 2
- 2
parser.tab.h ファイルの表示

@@ -1,8 +1,8 @@
1
-/* A Bison parser, made by GNU Bison 3.0.2.  */
1
+/* A Bison parser, made by GNU Bison 3.0.4.  */
2 2
 
3 3
 /* Bison interface for Yacc-like parsers in C
4 4
 
5
-   Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
5
+   Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
6 6
 
7 7
    This program is free software: you can redistribute it and/or modify
8 8
    it under the terms of the GNU General Public License as published by

読み込み中…
キャンセル
保存