#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 35
+#define YY_FLEX_SUBMINOR_VERSION 39
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
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;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
#define UINT32_MAX (4294967295U)
#endif
+#endif /* ! C99 */
+
#endif /* ! FLEXINT_H */
/* %endif */
*/
#define YY_LESS_LINENO(n) \
do { \
- yy_size_t yyl;\
+ int yyl;\
for ( yyl = n; yyl < yyleng; ++yyl )\
if ( yytext[yyl] == '\n' )\
--yylineno;\
}while(0)
+ #define YY_LINENO_REWIND_TO(dst) \
+ do {\
+ const char *p;\
+ for ( p = yy_cp-1; p >= (dst); --p)\
+ if ( *p == '\n' )\
+ --yylineno;\
+ }while(0)
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
/* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */
/* Begin user sect3 */
-#define yywrap(n) 1
+#define yywrap() 1
#define YY_SKIP_YYWRAP
#define FLEX_DEBUG
extern char *yytext;
#define yytext_ptr yytext
+/* %% [1.5] DFA */
+
/* %if-c-only Standard (non-C++) definition */
static yy_state_type yy_get_previous_state (void );
#define YY_DO_BEFORE_ACTION \
(yytext_ptr) = yy_bp; \
/* %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ */\
- yyleng = (yy_size_t) (yy_cp - yy_bp); \
+ yyleng = (size_t) (yy_cp - yy_bp); \
(yy_hold_char) = *yy_cp; \
*yy_cp = '\0'; \
/* %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ */\
// by moving it ahead by yyleng bytes. yyleng specifies the length of the
// currently matched token.
#define YY_USER_ACTION loc.columns(yyleng);
-#line 695 "lexer.cc"
+#line 704 "lexer.cc"
#define INITIAL 0
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO fwrite( yytext, yyleng, 1, yyout )
+#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
/* %endif */
/* %if-c++-only C++ definition */
/* %endif */
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- yy_size_t n; \
+ size_t n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
register char *yy_cp, *yy_bp;
register int yy_act;
-/* %% [7.0] user's declarations go here */
-#line 79 "lexer.ll"
-
-
-
- // Code run each time yylex is called.
- loc.step();
-
-
-#line 943 "lexer.cc"
-
if ( !(yy_init) )
{
(yy_init) = 1;
yy_load_buffer_state( );
}
+ {
+/* %% [7.0] user's declarations go here */
+#line 79 "lexer.ll"
+
+
+
+ // Code run each time yylex is called.
+ loc.step();
+
+
+#line 993 "lexer.cc"
+
while ( 1 ) /* loops until end-of-file is reached */
{
/* %% [8.0] yymore()-related code goes here */
yy_match:
do
{
- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+ register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
/* %% [10.0] code to find the action number goes here */
yy_current_state = *--(yy_state_ptr);
(yy_lp) = yy_accept[yy_current_state];
-goto find_rule; /* Shut up GCC warning -Wall */
find_rule: /* we branch to this label when backing up */
for ( ; ; ) /* until we find what rule we matched */
{
#line 148 "lexer.ll"
ECHO;
YY_BREAK
-#line 1239 "lexer.cc"
+#line 1248 "lexer.cc"
case YY_END_OF_BUFFER:
{
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
+ } /* end of user's declarations */
} /* end of yylex */
/* %ok-for-header */
if ( ! yy_is_jam )
*(yy_state_ptr)++ = yy_current_state;
- return yy_is_jam ? 0 : yy_current_state;
+ return yy_is_jam ? 0 : yy_current_state;
}
/* %if-c-only */
case EOB_ACT_END_OF_FILE:
{
if ( yywrap( ) )
- return 0;
+ return EOF;
if ( ! (yy_did_buffer_switch_on_eof) )
YY_NEW_FILE;
yyfree((void *) b );
}
-/* %if-c-only */
-
-#ifndef __cplusplus
-extern int isatty (int );
-#endif /* __cplusplus */
-
-/* %endif */
-
-/* %if-c++-only */
-/* %endif */
-
/* Initializes or reinitializes a buffer.
* This function is sometimes called more than once on the same buffer,
* such as during a yyrestart() or at EOF.
/* %if-c-only */
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
* scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
*
* @return the newly allocated buffer state object.
*/
{
YY_BUFFER_STATE b;
char *buf;
- yy_size_t n, i;
+ yy_size_t n;
+ yy_size_t i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
buffer = yy_scan_bytes(string_.c_str(),string_.size());
if (!buffer) {
fatal("cannot scan string");
- // fatal() throws an exception so this can't be reached
+ // fatal() throws an exception so this can't be reached
}
}
{
switch (yyn)
{
- case 3:
-#line 83 "parser.yy" // lalr1.cc:859
+ case 4:
+#line 84 "parser.yy" // lalr1.cc:859
{
TokenPtr eq(new TokenEqual());
ctx.expression.push_back(eq);
#line 623 "parser.cc" // lalr1.cc:859
break;
- case 4:
-#line 90 "parser.yy" // lalr1.cc:859
+ case 5:
+#line 91 "parser.yy" // lalr1.cc:859
{
TokenPtr str(new TokenString(yystack_[0].value.as< std::string > ()));
ctx.expression.push_back(str);
#line 632 "parser.cc" // lalr1.cc:859
break;
- case 5:
-#line 95 "parser.yy" // lalr1.cc:859
+ case 6:
+#line 96 "parser.yy" // lalr1.cc:859
{
TokenPtr hex(new TokenHexString(yystack_[0].value.as< std::string > ()));
ctx.expression.push_back(hex);
#line 641 "parser.cc" // lalr1.cc:859
break;
- case 6:
-#line 100 "parser.yy" // lalr1.cc:859
+ case 7:
+#line 101 "parser.yy" // lalr1.cc:859
{
TokenPtr opt(new TokenOption(yystack_[3].value.as< uint16_t > (), yystack_[0].value.as< TokenOption::RepresentationType > ()));
ctx.expression.push_back(opt);
#line 650 "parser.cc" // lalr1.cc:859
break;
- case 7:
-#line 105 "parser.yy" // lalr1.cc:859
+ case 8:
+#line 106 "parser.yy" // lalr1.cc:859
{
TokenPtr sub(new TokenSubstring());
ctx.expression.push_back(sub);
#line 659 "parser.cc" // lalr1.cc:859
break;
- case 9:
-#line 114 "parser.yy" // lalr1.cc:859
+ case 10:
+#line 115 "parser.yy" // lalr1.cc:859
{
yylhs.value.as< uint16_t > () = ctx.convertOptionCode(yystack_[0].value.as< std::string > (), yystack_[0].location);
}
#line 667 "parser.cc" // lalr1.cc:859
break;
- case 10:
-#line 118 "parser.yy" // lalr1.cc:859
+ case 11:
+#line 119 "parser.yy" // lalr1.cc:859
{
yylhs.value.as< uint16_t > () = ctx.convertOptionName(yystack_[0].value.as< std::string > (), yystack_[0].location);
}
#line 675 "parser.cc" // lalr1.cc:859
break;
- case 11:
-#line 124 "parser.yy" // lalr1.cc:859
+ case 12:
+#line 125 "parser.yy" // lalr1.cc:859
{
yylhs.value.as< TokenOption::RepresentationType > () = TokenOption::TEXTUAL;
}
#line 683 "parser.cc" // lalr1.cc:859
break;
- case 12:
-#line 128 "parser.yy" // lalr1.cc:859
+ case 13:
+#line 129 "parser.yy" // lalr1.cc:859
{
yylhs.value.as< TokenOption::RepresentationType > () = TokenOption::HEXADECIMAL;
}
#line 691 "parser.cc" // lalr1.cc:859
break;
- case 13:
-#line 134 "parser.yy" // lalr1.cc:859
+ case 14:
+#line 135 "parser.yy" // lalr1.cc:859
{
TokenPtr str(new TokenString(yystack_[0].value.as< std::string > ()));
ctx.expression.push_back(str);
#line 700 "parser.cc" // lalr1.cc:859
break;
- case 14:
-#line 141 "parser.yy" // lalr1.cc:859
+ case 15:
+#line 142 "parser.yy" // lalr1.cc:859
{
TokenPtr str(new TokenString(yystack_[0].value.as< std::string > ()));
ctx.expression.push_back(str);
#line 709 "parser.cc" // lalr1.cc:859
break;
- case 15:
-#line 146 "parser.yy" // lalr1.cc:859
+ case 16:
+#line 147 "parser.yy" // lalr1.cc:859
{
TokenPtr str(new TokenString("all"));
ctx.expression.push_back(str);
}
- const signed char EvalParser::yypact_ninf_ = -14;
+ const signed char EvalParser::yypact_ninf_ = -9;
const signed char EvalParser::yytable_ninf_ = -1;
const signed char
EvalParser::yypact_[] =
{
- -4, -9, -5, -14, -14, -14, 8, -14, 9, -13,
- -4, -14, -4, -14, -14, 0, 11, -14, 13, 2,
- 10, -14, 14, -14, -14, -14, -6, -14, -14, 7,
- -14
+ -4, -8, -3, -4, -9, -9, -9, 12, -9, 19,
+ 1, -1, 11, -9, -1, -9, -9, 10, 15, -9,
+ -9, 17, 13, 14, -9, 18, -9, -9, -9, -6,
+ -9, -9, 20, -9
};
const unsigned char
EvalParser::yydefact_[] =
{
- 0, 0, 0, 4, 5, 8, 0, 2, 0, 0,
- 0, 1, 0, 9, 10, 0, 0, 3, 0, 0,
- 0, 13, 0, 11, 12, 6, 0, 15, 14, 0,
- 7
+ 0, 0, 0, 0, 5, 6, 9, 0, 2, 0,
+ 0, 0, 0, 1, 0, 10, 11, 0, 0, 3,
+ 4, 0, 0, 0, 14, 0, 12, 13, 7, 0,
+ 16, 15, 0, 8
};
const signed char
EvalParser::yypgoto_[] =
{
- -14, -14, -14, -3, -14, -14, -14, -14
+ -9, -9, 24, -5, -9, -9, -9, -9
};
const signed char
EvalParser::yydefgoto_[] =
{
- -1, 6, 7, 8, 15, 25, 22, 29
+ -1, 7, 8, 9, 17, 28, 25, 32
};
const unsigned char
EvalParser::yytable_[] =
{
- 1, 2, 27, 13, 9, 14, 10, 16, 11, 17,
- 28, 3, 12, 4, 18, 5, 23, 24, 21, 30,
- 0, 19, 20, 0, 26
+ 1, 2, 30, 1, 2, 10, 18, 3, 11, 20,
+ 31, 4, 13, 5, 4, 6, 5, 15, 6, 16,
+ 26, 27, 14, 19, 21, 22, 23, 12, 29, 24,
+ 0, 0, 33
};
const signed char
EvalParser::yycheck_[] =
{
- 4, 5, 8, 16, 13, 18, 11, 10, 0, 12,
- 16, 15, 3, 17, 14, 19, 6, 7, 16, 12,
- -1, 10, 9, -1, 10
+ 4, 5, 8, 4, 5, 13, 11, 11, 11, 14,
+ 16, 15, 0, 17, 15, 19, 17, 16, 19, 18,
+ 6, 7, 3, 12, 14, 10, 9, 3, 10, 16,
+ -1, -1, 12
};
const unsigned char
EvalParser::yystos_[] =
{
- 0, 4, 5, 15, 17, 19, 21, 22, 23, 13,
- 11, 0, 3, 16, 18, 24, 23, 23, 14, 10,
- 9, 16, 26, 6, 7, 25, 10, 8, 16, 27,
- 12
+ 0, 4, 5, 11, 15, 17, 19, 21, 22, 23,
+ 13, 11, 22, 0, 3, 16, 18, 24, 23, 12,
+ 23, 14, 10, 9, 16, 26, 6, 7, 25, 10,
+ 8, 16, 27, 12
};
const unsigned char
EvalParser::yyr1_[] =
{
- 0, 20, 21, 22, 23, 23, 23, 23, 23, 24,
- 24, 25, 25, 26, 27, 27
+ 0, 20, 21, 22, 22, 23, 23, 23, 23, 23,
+ 24, 24, 25, 25, 26, 27, 27
};
const unsigned char
EvalParser::yyr2_[] =
{
- 0, 2, 1, 3, 1, 1, 6, 8, 1, 1,
- 1, 1, 1, 1, 1, 1
+ 0, 2, 1, 3, 3, 1, 1, 6, 8, 1,
+ 1, 1, 1, 1, 1, 1, 1
};
const unsigned char
EvalParser::yyrline_[] =
{
- 0, 79, 79, 82, 89, 94, 99, 104, 109, 113,
- 117, 123, 127, 133, 140, 145
+ 0, 79, 79, 82, 83, 90, 95, 100, 105, 110,
+ 114, 118, 124, 128, 134, 141, 146
};
// Print the state stack on the debug stream.
#line 21 "parser.yy" // lalr1.cc:1167
} } // isc::eval
-#line 1105 "parser.cc" // lalr1.cc:1167
-#line 152 "parser.yy" // lalr1.cc:1168
+#line 1107 "parser.cc" // lalr1.cc:1167
+#line 153 "parser.yy" // lalr1.cc:1168
void
isc::eval::EvalParser::error(const location_type& loc,