Commit 9930f904 by maxvujovic@gmail.com

Upstream various build fixes from WebKit to ANGLE to make updating ANGLE in WebKit easier.

a) http://trac.webkit.org/changeset/127747 b) http://trac.webkit.org/changeset/128539 c) http://trac.webkit.org/changeset/122870 - Specifically, items #3 and #4 in this changeset's commit message. Review URL: https://codereview.appspot.com/7040045 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1640 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent c3dc55ba
......@@ -20,10 +20,10 @@
'include_dirs': [
],
'sources': [
'compiler/preprocessor/Diagnostics.cpp',
'compiler/preprocessor/Diagnostics.h',
'compiler/preprocessor/DirectiveHandler.cpp',
'compiler/preprocessor/DirectiveHandler.h',
'compiler/preprocessor/DiagnosticsBase.cpp',
'compiler/preprocessor/DiagnosticsBase.h',
'compiler/preprocessor/DirectiveHandlerBase.cpp',
'compiler/preprocessor/DirectiveHandlerBase.h',
'compiler/preprocessor/DirectiveParser.cpp',
'compiler/preprocessor/DirectiveParser.h',
'compiler/preprocessor/ExpressionParser.cpp',
......
......@@ -16,7 +16,7 @@ enum TPrecision
EbpUndefined,
EbpLow,
EbpMedium,
EbpHigh,
EbpHigh
};
inline const char* getPrecisionString(TPrecision p)
......@@ -47,7 +47,7 @@ enum TBasicType
EbtGuardSamplerEnd, // non type: see implementation of IsSampler()
EbtStruct,
EbtAddress, // should be deprecated??
EbtInvariant, // used as a type when qualifying a previously declared variable as being invariant
EbtInvariant // used as a type when qualifying a previously declared variable as being invariant
};
inline const char* getBasicString(TBasicType t)
......@@ -114,7 +114,7 @@ enum TQualifier
EvqFragData,
// end of list
EvqLast,
EvqLast
};
//
......
......@@ -7,7 +7,7 @@
#ifndef COMPILER_DIAGNOSTICS_H_
#define COMPILER_DIAGNOSTICS_H_
#include "compiler/preprocessor/Diagnostics.h"
#include "compiler/preprocessor/DiagnosticsBase.h"
class TInfoSink;
......
......@@ -9,7 +9,7 @@
#include "compiler/ExtensionBehavior.h"
#include "compiler/Pragma.h"
#include "compiler/preprocessor/DirectiveHandler.h"
#include "compiler/preprocessor/DirectiveHandlerBase.h"
class TDiagnostics;
......
......@@ -16,7 +16,7 @@ typedef enum
EBhEnable,
EBhWarn,
EBhDisable,
EBhUndefined,
EBhUndefined
} TBehavior;
inline const char* getBehaviorString(TBehavior b)
......
......@@ -33,7 +33,7 @@ bool TParseContext::parseVectorFields(const TString& compString, int vecSize, TV
enum {
exyzw,
ergba,
estpq,
estpq
} fieldSet[4];
for (int i = 0; i < fields.num; ++i) {
......
......@@ -38,6 +38,9 @@ WHICH GENERATES THE GLSL ES PARSER (glslang_tab.cpp AND glslang_tab.h).
#include "compiler/ParseHelper.h"
#include "GLSLANG/ShaderLang.h"
#define YYENABLE_NLS 0
#define YYLTYPE_IS_TRIVIAL 1
#define YYLEX_PARAM context->scanner
%}
......
......@@ -68,6 +68,7 @@ typedef int16_t flex_int16_t;
typedef uint16_t flex_uint16_t;
typedef int32_t flex_int32_t;
typedef uint32_t flex_uint32_t;
typedef uint64_t flex_uint64_t;
#else
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
......@@ -191,6 +192,11 @@ typedef void* yyscan_t;
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif
#ifndef YY_TYPEDEF_YY_SIZE_T
#define YY_TYPEDEF_YY_SIZE_T
typedef size_t yy_size_t;
#endif
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
......@@ -204,7 +210,7 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
*/
#define YY_LESS_LINENO(n) \
do { \
int yyl;\
yy_size_t yyl;\
for ( yyl = n; yyl < yyleng; ++yyl )\
if ( yytext[yyl] == '\n' )\
--yylineno;\
......@@ -226,11 +232,6 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
#ifndef YY_TYPEDEF_YY_SIZE_T
#define YY_TYPEDEF_YY_SIZE_T
typedef size_t yy_size_t;
#endif
#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
......@@ -248,7 +249,7 @@ struct yy_buffer_state
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
int yy_n_chars;
yy_size_t yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
......@@ -327,7 +328,7 @@ static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
void *yyalloc (yy_size_t ,yyscan_t yyscanner );
void *yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );
......@@ -378,7 +379,7 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
*/
#define YY_DO_BEFORE_ACTION \
yyg->yytext_ptr = yy_bp; \
yyleng = (size_t) (yy_cp - yy_bp); \
yyleng = (yy_size_t) (yy_cp - yy_bp); \
yyg->yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \
yyg->yy_c_buf_p = yy_cp;
......@@ -843,8 +844,8 @@ struct yyguts_t
size_t yy_buffer_stack_max; /**< capacity of stack. */
YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
char yy_hold_char;
int yy_n_chars;
int yyleng_r;
yy_size_t yy_n_chars;
yy_size_t yyleng_r;
char *yy_c_buf_p;
int yy_init;
int yy_start;
......@@ -897,7 +898,7 @@ FILE *yyget_out (yyscan_t yyscanner );
void yyset_out (FILE * out_str ,yyscan_t yyscanner );
int yyget_leng (yyscan_t yyscanner );
yy_size_t yyget_leng (yyscan_t yyscanner );
char *yyget_text (yyscan_t yyscanner );
......@@ -966,7 +967,7 @@ static int input (yyscan_t yyscanner );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
int n; \
yy_size_t n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
......@@ -1125,7 +1126,7 @@ yy_find_action:
if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
{
int yyl;
yy_size_t yyl;
for ( yyl = 0; yyl < yyleng; ++yyl )
if ( yytext[yyl] == '\n' )
......@@ -1963,7 +1964,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
{
int num_to_read =
yy_size_t num_to_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
......@@ -1977,7 +1978,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
if ( b->yy_is_our_buffer )
{
int new_size = b->yy_buf_size * 2;
yy_size_t new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
......@@ -2008,7 +2009,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
yyg->yy_n_chars, (size_t) num_to_read );
yyg->yy_n_chars, num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
}
......@@ -2133,7 +2134,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
{ /* need more input */
int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
++yyg->yy_c_buf_p;
switch ( yy_get_next_buffer( yyscanner ) )
......@@ -2157,7 +2158,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
case EOB_ACT_END_OF_FILE:
{
if ( yywrap(yyscanner ) )
return EOF;
return 0;
if ( ! yyg->yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
......@@ -2420,7 +2421,7 @@ void yypop_buffer_state (yyscan_t yyscanner)
*/
static void yyensure_buffer_stack (yyscan_t yyscanner)
{
int num_to_alloc;
yy_size_t num_to_alloc;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (!yyg->yy_buffer_stack) {
......@@ -2518,12 +2519,11 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr , yyscan_t yyscanner)
* @param yyscanner The scanner object.
* @return the newly allocated buffer state object.
*/
YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner)
YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner)
{
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
int i;
yy_size_t n, i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
......@@ -2673,7 +2673,7 @@ FILE *yyget_out (yyscan_t yyscanner)
/** Get the length of the current token.
* @param yyscanner The scanner object.
*/
int yyget_leng (yyscan_t yyscanner)
yy_size_t yyget_leng (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yyleng;
......
......@@ -91,6 +91,9 @@
#include "compiler/ParseHelper.h"
#include "GLSLANG/ShaderLang.h"
#define YYENABLE_NLS 0
#define YYLTYPE_IS_TRIVIAL 1
#define YYLEX_PARAM context->scanner
......@@ -657,27 +660,27 @@ static const yytype_int16 yyrhs[] =
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
0, 165, 165, 200, 203, 216, 221, 226, 232, 235,
314, 317, 418, 428, 441, 449, 549, 552, 560, 564,
571, 575, 582, 588, 597, 605, 660, 667, 677, 680,
690, 700, 721, 722, 723, 728, 729, 738, 750, 751,
759, 770, 774, 775, 785, 795, 805, 818, 819, 829,
842, 846, 850, 854, 855, 868, 869, 882, 883, 896,
897, 914, 915, 928, 929, 930, 931, 932, 936, 939,
950, 958, 985, 990, 997, 1035, 1038, 1045, 1053, 1074,
1095, 1106, 1135, 1140, 1150, 1155, 1165, 1168, 1171, 1174,
1180, 1187, 1190, 1212, 1230, 1254, 1277, 1281, 1299, 1307,
1339, 1359, 1448, 1457, 1480, 1483, 1489, 1497, 1505, 1513,
1523, 1530, 1533, 1536, 1542, 1545, 1560, 1564, 1568, 1572,
1581, 1586, 1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626,
1632, 1638, 1644, 1649, 1654, 1663, 1672, 1677, 1690, 1690,
1704, 1704, 1713, 1716, 1731, 1767, 1771, 1777, 1785, 1801,
1805, 1809, 1810, 1816, 1817, 1818, 1819, 1820, 1824, 1825,
1825, 1825, 1835, 1836, 1840, 1840, 1841, 1841, 1846, 1849,
1859, 1862, 1868, 1869, 1873, 1881, 1885, 1895, 1900, 1917,
1917, 1922, 1922, 1929, 1929, 1937, 1940, 1946, 1949, 1955,
1959, 1966, 1973, 1980, 1987, 1998, 2007, 2011, 2018, 2021,
2027, 2027
0, 168, 168, 203, 206, 219, 224, 229, 235, 238,
317, 320, 421, 431, 444, 452, 552, 555, 563, 567,
574, 578, 585, 591, 600, 608, 663, 670, 680, 683,
693, 703, 724, 725, 726, 731, 732, 741, 753, 754,
762, 773, 777, 778, 788, 798, 808, 821, 822, 832,
845, 849, 853, 857, 858, 871, 872, 885, 886, 899,
900, 917, 918, 931, 932, 933, 934, 935, 939, 942,
953, 961, 988, 993, 1000, 1038, 1041, 1048, 1056, 1077,
1098, 1109, 1138, 1143, 1153, 1158, 1168, 1171, 1174, 1177,
1183, 1190, 1193, 1215, 1233, 1257, 1280, 1284, 1302, 1310,
1342, 1362, 1451, 1460, 1483, 1486, 1492, 1500, 1508, 1516,
1526, 1533, 1536, 1539, 1545, 1548, 1563, 1567, 1571, 1575,
1584, 1589, 1594, 1599, 1604, 1609, 1614, 1619, 1624, 1629,
1635, 1641, 1647, 1652, 1657, 1666, 1675, 1680, 1693, 1693,
1707, 1707, 1716, 1719, 1734, 1770, 1774, 1780, 1788, 1804,
1808, 1812, 1813, 1819, 1820, 1821, 1822, 1823, 1827, 1828,
1828, 1828, 1838, 1839, 1843, 1843, 1844, 1844, 1849, 1852,
1862, 1865, 1871, 1872, 1876, 1884, 1888, 1898, 1903, 1920,
1920, 1925, 1925, 1932, 1932, 1940, 1943, 1949, 1952, 1958,
1962, 1969, 1976, 1983, 1990, 2001, 2010, 2014, 2021, 2024,
2030, 2030
};
#endif
......
......@@ -183,7 +183,7 @@ enum TOperator {
EOpVectorTimesScalarAssign,
EOpMatrixTimesScalarAssign,
EOpMatrixTimesMatrixAssign,
EOpDivAssign,
EOpDivAssign
};
extern const char* getOperatorString(TOperator op);
......@@ -269,7 +269,7 @@ protected:
enum TLoopType {
ELoopFor,
ELoopWhile,
ELoopDoWhile,
ELoopDoWhile
};
class TIntermLoop : public TIntermNode {
......
......@@ -4,7 +4,7 @@
// found in the LICENSE file.
//
#include "Diagnostics.h"
#include "DiagnosticsBase.h"
#include <cassert>
......
......@@ -4,7 +4,7 @@
// found in the LICENSE file.
//
#include "DirectiveHandler.h"
#include "DirectiveHandlerBase.h"
namespace pp
{
......
......@@ -10,8 +10,8 @@
#include <cstdlib>
#include <sstream>
#include "Diagnostics.h"
#include "DirectiveHandler.h"
#include "DiagnosticsBase.h"
#include "DirectiveHandlerBase.h"
#include "ExpressionParser.h"
#include "MacroExpander.h"
#include "Token.h"
......
......@@ -84,8 +84,11 @@
// This file is auto-generated by generate_parser.sh. DO NOT EDIT!
#if defined(__GNUC__)
#pragma GCC diagnostic ignored "-Wunknown-pragmas"
// Triggered by the auto-generated pplval variable.
#pragma GCC diagnostic ignored "-Wuninitialized"
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#pragma GCC diagnostic warning "-Wunknown-pragmas"
#elif defined(_MSC_VER)
#pragma warning(disable: 4065 4701)
#endif
......@@ -95,7 +98,7 @@
#include <cassert>
#include <sstream>
#include "Diagnostics.h"
#include "DiagnosticsBase.h"
#include "Lexer.h"
#include "Token.h"
......@@ -105,6 +108,8 @@ typedef __int64 YYSTYPE;
#include <stdint.h>
typedef intmax_t YYSTYPE;
#endif // _MSC_VER
#define YYENABLE_NLS 0
#define YYLTYPE_IS_TRIVIAL 1
#define YYSTYPE_IS_TRIVIAL 1
#define YYSTYPE_IS_DECLARED 1
......@@ -467,9 +472,9 @@ static const yytype_int8 yyrhs[] =
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint8 yyrline[] =
{
0, 85, 85, 92, 93, 96, 99, 102, 105, 108,
111, 114, 117, 120, 123, 126, 129, 132, 135, 138,
151, 164, 167, 170, 173, 176, 179
0, 90, 90, 97, 98, 101, 104, 107, 110, 113,
116, 119, 122, 125, 128, 131, 134, 137, 140, 143,
156, 169, 172, 175, 178, 181, 184
};
#endif
......
......@@ -21,8 +21,11 @@ WHICH GENERATES THE GLSL ES preprocessor expression parser.
// This file is auto-generated by generate_parser.sh. DO NOT EDIT!
#if defined(__GNUC__)
#pragma GCC diagnostic ignored "-Wunknown-pragmas"
// Triggered by the auto-generated pplval variable.
#pragma GCC diagnostic ignored "-Wuninitialized"
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#pragma GCC diagnostic warning "-Wunknown-pragmas"
#elif defined(_MSC_VER)
#pragma warning(disable: 4065 4701)
#endif
......@@ -32,7 +35,7 @@ WHICH GENERATES THE GLSL ES preprocessor expression parser.
#include <cassert>
#include <sstream>
#include "Diagnostics.h"
#include "DiagnosticsBase.h"
#include "Lexer.h"
#include "Token.h"
......@@ -42,6 +45,8 @@ typedef __int64 YYSTYPE;
#include <stdint.h>
typedef intmax_t YYSTYPE;
#endif // _MSC_VER
#define YYENABLE_NLS 0
#define YYLTYPE_IS_TRIVIAL 1
#define YYSTYPE_IS_TRIVIAL 1
#define YYSTYPE_IS_DECLARED 1
......
......@@ -9,7 +9,7 @@
#include <algorithm>
#include <sstream>
#include "Diagnostics.h"
#include "DiagnosticsBase.h"
#include "Token.h"
namespace pp
......
......@@ -9,7 +9,7 @@
#include <cassert>
#include <sstream>
#include "Diagnostics.h"
#include "DiagnosticsBase.h"
#include "DirectiveParser.h"
#include "Macro.h"
#include "MacroExpander.h"
......
......@@ -56,6 +56,7 @@ typedef int16_t flex_int16_t;
typedef uint16_t flex_uint16_t;
typedef int32_t flex_int32_t;
typedef uint32_t flex_uint32_t;
typedef uint64_t flex_uint64_t;
#else
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
......@@ -179,6 +180,11 @@ typedef void* yyscan_t;
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif
#ifndef YY_TYPEDEF_YY_SIZE_T
#define YY_TYPEDEF_YY_SIZE_T
typedef size_t yy_size_t;
#endif
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
......@@ -201,11 +207,6 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
#ifndef YY_TYPEDEF_YY_SIZE_T
#define YY_TYPEDEF_YY_SIZE_T
typedef size_t yy_size_t;
#endif
#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
......@@ -223,7 +224,7 @@ struct yy_buffer_state
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
int yy_n_chars;
yy_size_t yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
......@@ -302,7 +303,7 @@ static void pp_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
YY_BUFFER_STATE pp_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
YY_BUFFER_STATE pp_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
YY_BUFFER_STATE pp_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
YY_BUFFER_STATE pp_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
void *ppalloc (yy_size_t ,yyscan_t yyscanner );
void *pprealloc (void *,yy_size_t ,yyscan_t yyscanner );
......@@ -353,7 +354,7 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
*/
#define YY_DO_BEFORE_ACTION \
yyg->yytext_ptr = yy_bp; \
yyleng = (size_t) (yy_cp - yy_bp); \
yyleng = (yy_size_t) (yy_cp - yy_bp); \
yyg->yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \
yyg->yy_c_buf_p = yy_cp;
......@@ -516,7 +517,7 @@ IF YOU MODIFY THIS FILE YOU ALSO NEED TO RUN generate_parser.sh.
#include "Tokenizer.h"
#include "Diagnostics.h"
#include "DiagnosticsBase.h"
#include "Token.h"
#if defined(__GNUC__)
......@@ -575,8 +576,8 @@ struct yyguts_t
size_t yy_buffer_stack_max; /**< capacity of stack. */
YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
char yy_hold_char;
int yy_n_chars;
int yyleng_r;
yy_size_t yy_n_chars;
yy_size_t yyleng_r;
char *yy_c_buf_p;
int yy_init;
int yy_start;
......@@ -633,7 +634,7 @@ FILE *ppget_out (yyscan_t yyscanner );
void ppset_out (FILE * out_str ,yyscan_t yyscanner );
int ppget_leng (yyscan_t yyscanner );
yy_size_t ppget_leng (yyscan_t yyscanner );
char *ppget_text (yyscan_t yyscanner );
......@@ -700,7 +701,7 @@ static int input (yyscan_t yyscanner );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
int n; \
yy_size_t n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
......@@ -1328,7 +1329,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
{
int num_to_read =
yy_size_t num_to_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
......@@ -1342,7 +1343,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
if ( b->yy_is_our_buffer )
{
int new_size = b->yy_buf_size * 2;
yy_size_t new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
......@@ -1373,7 +1374,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
yyg->yy_n_chars, (size_t) num_to_read );
yyg->yy_n_chars, num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
}
......@@ -1498,7 +1499,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
{ /* need more input */
int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
++yyg->yy_c_buf_p;
switch ( yy_get_next_buffer( yyscanner ) )
......@@ -1522,7 +1523,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
case EOB_ACT_END_OF_FILE:
{
if ( ppwrap(yyscanner ) )
return EOF;
return 0;
if ( ! yyg->yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
......@@ -1778,7 +1779,7 @@ void pppop_buffer_state (yyscan_t yyscanner)
*/
static void ppensure_buffer_stack (yyscan_t yyscanner)
{
int num_to_alloc;
yy_size_t num_to_alloc;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (!yyg->yy_buffer_stack) {
......@@ -1876,12 +1877,11 @@ YY_BUFFER_STATE pp_scan_string (yyconst char * yystr , yyscan_t yyscanner)
* @param yyscanner The scanner object.
* @return the newly allocated buffer state object.
*/
YY_BUFFER_STATE pp_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner)
YY_BUFFER_STATE pp_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner)
{
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
int i;
yy_size_t n, i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
......@@ -1991,7 +1991,7 @@ FILE *ppget_out (yyscan_t yyscanner)
/** Get the length of the current token.
* @param yyscanner The scanner object.
*/
int ppget_leng (yyscan_t yyscanner)
yy_size_t ppget_leng (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yyleng;
......
......@@ -25,7 +25,7 @@ IF YOU MODIFY THIS FILE YOU ALSO NEED TO RUN generate_parser.sh.
%{
#include "Tokenizer.h"
#include "Diagnostics.h"
#include "DiagnosticsBase.h"
#include "Token.h"
#if defined(__GNUC__)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment