Skip to content

Commit 1cdde8b

Browse files
committed
Invoked makeparser from OSX.
1 parent cda06db commit 1cdde8b

File tree

3 files changed

+1439
-1321
lines changed

3 files changed

+1439
-1321
lines changed

ncgen/ncgenl.c

+28-28
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
#line 3 "ncgenl.c"
2+
#line 3 "lex.ncg.c"
33

44
#define YY_INT_ALIGNED short int
55

@@ -65,6 +65,7 @@ typedef int16_t flex_int16_t;
6565
typedef uint16_t flex_uint16_t;
6666
typedef int32_t flex_int32_t;
6767
typedef uint32_t flex_uint32_t;
68+
typedef uint64_t flex_uint64_t;
6869
#else
6970
typedef signed char flex_int8_t;
7071
typedef short int flex_int16_t;
@@ -171,7 +172,12 @@ typedef unsigned int flex_uint32_t;
171172
typedef struct yy_buffer_state *YY_BUFFER_STATE;
172173
#endif
173174

174-
extern int ncgleng;
175+
#ifndef YY_TYPEDEF_YY_SIZE_T
176+
#define YY_TYPEDEF_YY_SIZE_T
177+
typedef size_t yy_size_t;
178+
#endif
179+
180+
extern yy_size_t ncgleng;
175181

176182
extern FILE *ncgin, *ncgout;
177183

@@ -197,11 +203,6 @@ extern FILE *ncgin, *ncgout;
197203

198204
#define unput(c) yyunput( c, (yytext_ptr) )
199205

200-
#ifndef YY_TYPEDEF_YY_SIZE_T
201-
#define YY_TYPEDEF_YY_SIZE_T
202-
typedef size_t yy_size_t;
203-
#endif
204-
205206
#ifndef YY_STRUCT_YY_BUFFER_STATE
206207
#define YY_STRUCT_YY_BUFFER_STATE
207208
struct yy_buffer_state
@@ -219,7 +220,7 @@ struct yy_buffer_state
219220
/* Number of characters read into yy_ch_buf, not including EOB
220221
* characters.
221222
*/
222-
int yy_n_chars;
223+
yy_size_t yy_n_chars;
223224

224225
/* Whether we "own" the buffer - i.e., we know we created it,
225226
* and can realloc() it to grow it, and should free() it to
@@ -289,8 +290,8 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
289290

290291
/* yy_hold_char holds the character lost when ncgtext is formed. */
291292
static char yy_hold_char;
292-
static int yy_n_chars; /* number of characters read into yy_ch_buf */
293-
int ncgleng;
293+
static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
294+
yy_size_t ncgleng;
294295

295296
/* Points to current character in buffer. */
296297
static char *yy_c_buf_p = (char *) 0;
@@ -318,7 +319,7 @@ static void ncg_init_buffer (YY_BUFFER_STATE b,FILE *file );
318319

319320
YY_BUFFER_STATE ncg_scan_buffer (char *base,yy_size_t size );
320321
YY_BUFFER_STATE ncg_scan_string (yyconst char *yy_str );
321-
YY_BUFFER_STATE ncg_scan_bytes (yyconst char *bytes,int len );
322+
YY_BUFFER_STATE ncg_scan_bytes (yyconst char *bytes,yy_size_t len );
322323

323324
void *ncgalloc (yy_size_t );
324325
void *ncgrealloc (void *,yy_size_t );
@@ -373,7 +374,7 @@ static void yy_fatal_error (yyconst char msg[] );
373374
*/
374375
#define YY_DO_BEFORE_ACTION \
375376
(yytext_ptr) = yy_bp; \
376-
ncgleng = (size_t) (yy_cp - yy_bp); \
377+
ncgleng = (yy_size_t) (yy_cp - yy_bp); \
377378
(yy_hold_char) = *yy_cp; \
378379
*yy_cp = '\0'; \
379380
(yy_c_buf_p) = yy_cp;
@@ -1319,7 +1320,7 @@ ID ([A-Za-z_]|{UTF8})([A-Z.@#\[\]a-z_0-9+-]|{UTF8})*
13191320
/* Note: this definition of string will work for utf8 as well,
13201321
although it is a very relaxed definition
13211322
*/
1322-
#line 1323 "ncgenl.c"
1323+
#line 1324 "lex.ncg.c"
13231324

13241325
#define INITIAL 0
13251326
#define ST_C_COMMENT 1
@@ -1360,7 +1361,7 @@ FILE *ncgget_out (void );
13601361

13611362
void ncgset_out (FILE * out_str );
13621363

1363-
int ncgget_leng (void );
1364+
yy_size_t ncgget_leng (void );
13641365

13651366
char *ncgget_text (void );
13661367

@@ -1421,7 +1422,7 @@ static int input (void );
14211422
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
14221423
{ \
14231424
int c = '*'; \
1424-
int n; \
1425+
yy_size_t n; \
14251426
for ( n = 0; n < max_size && \
14261427
(c = getc( ncgin )) != EOF && c != '\n'; ++n ) \
14271428
buf[n] = (char) c; \
@@ -1505,7 +1506,7 @@ YY_DECL
15051506

15061507
#line 217 "ncgen.l"
15071508

1508-
#line 1509 "ncgenl.c"
1509+
#line 1510 "lex.ncg.c"
15091510

15101511
if ( !(yy_init) )
15111512
{
@@ -2118,7 +2119,7 @@ YY_RULE_SETUP
21182119
#line 570 "ncgen.l"
21192120
ECHO;
21202121
YY_BREAK
2121-
#line 2122 "ncgenl.c"
2122+
#line 2123 "lex.ncg.c"
21222123
case YY_STATE_EOF(INITIAL):
21232124
case YY_STATE_EOF(TEXT):
21242125
yyterminate();
@@ -2305,7 +2306,7 @@ static int yy_get_next_buffer (void)
23052306

23062307
else
23072308
{
2308-
int num_to_read =
2309+
yy_size_t num_to_read =
23092310
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
23102311

23112312
while ( num_to_read <= 0 )
@@ -2319,7 +2320,7 @@ static int yy_get_next_buffer (void)
23192320

23202321
if ( b->yy_is_our_buffer )
23212322
{
2322-
int new_size = b->yy_buf_size * 2;
2323+
yy_size_t new_size = b->yy_buf_size * 2;
23232324

23242325
if ( new_size <= 0 )
23252326
b->yy_buf_size += b->yy_buf_size / 8;
@@ -2350,7 +2351,7 @@ static int yy_get_next_buffer (void)
23502351

23512352
/* Read in more data. */
23522353
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2353-
(yy_n_chars), (size_t) num_to_read );
2354+
(yy_n_chars), num_to_read );
23542355

23552356
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
23562357
}
@@ -2460,7 +2461,7 @@ static int yy_get_next_buffer (void)
24602461
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
24612462
{ /* need to shift things up to make room */
24622463
/* +2 for EOB chars. */
2463-
register int number_to_move = (yy_n_chars) + 2;
2464+
register yy_size_t number_to_move = (yy_n_chars) + 2;
24642465
register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
24652466
YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
24662467
register char *source =
@@ -2509,7 +2510,7 @@ static int yy_get_next_buffer (void)
25092510

25102511
else
25112512
{ /* need more input */
2512-
int offset = (yy_c_buf_p) - (yytext_ptr);
2513+
yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
25132514
++(yy_c_buf_p);
25142515

25152516
switch ( yy_get_next_buffer( ) )
@@ -2533,7 +2534,7 @@ static int yy_get_next_buffer (void)
25332534
case EOB_ACT_END_OF_FILE:
25342535
{
25352536
if ( ncgwrap( ) )
2536-
return EOF;
2537+
return 0;
25372538

25382539
if ( ! (yy_did_buffer_switch_on_eof) )
25392540
YY_NEW_FILE;
@@ -2785,7 +2786,7 @@ void ncgpop_buffer_state (void)
27852786
*/
27862787
static void ncgensure_buffer_stack (void)
27872788
{
2788-
int num_to_alloc;
2789+
yy_size_t num_to_alloc;
27892790

27902791
if (!(yy_buffer_stack)) {
27912792

@@ -2882,12 +2883,11 @@ YY_BUFFER_STATE ncg_scan_string (yyconst char * yystr )
28822883
*
28832884
* @return the newly allocated buffer state object.
28842885
*/
2885-
YY_BUFFER_STATE ncg_scan_bytes (yyconst char * yybytes, int _yybytes_len )
2886+
YY_BUFFER_STATE ncg_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
28862887
{
28872888
YY_BUFFER_STATE b;
28882889
char *buf;
2889-
yy_size_t n;
2890-
int i;
2890+
yy_size_t n, i;
28912891

28922892
/* Get memory for full buffer, including space for trailing EOB's. */
28932893
n = _yybytes_len + 2;
@@ -2969,7 +2969,7 @@ FILE *ncgget_out (void)
29692969
/** Get the length of the current token.
29702970
*
29712971
*/
2972-
int ncgget_leng (void)
2972+
yy_size_t ncgget_leng (void)
29732973
{
29742974
return ncgleng;
29752975
}

0 commit comments

Comments
 (0)