-/* A Bison parser, made by GNU Bison 3.0.4. */
+/* A Bison parser, made by GNU Bison 3.1. */
/* Bison implementation for Yacc-like parsers in C
- Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989-1990, 2000-2015, 2018 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "3.0.4"
+#define YYBISON_VERSION "3.1"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
#include <stdio.h>
+#include <stdlib.h>
#include "src/util/c99_stdint.h"
#include "src/parse/ast.h"
#include "lib/lex.h"
+// disable certain GCC and/or Clang warnings, as we have no control over
+// autogenerated code (Clang also understands '#pragma GCC')
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpragmas"
+#pragma GCC diagnostic ignored "-Wconversion"
+#pragma GCC diagnostic ignored "-Wsign-conversion"
+#pragma GCC diagnostic ignored "-Wunused-macros"
+#pragma GCC diagnostic ignored "-Wmissing-variable-declarations"
+#pragma GCC diagnostic ignored "-Wunreachable-code"
+#pragma GCC diagnostic ignored "-Wunreachable-code-break"
+
using namespace re2c;
extern "C" {
int yylex(const char *&pattern);
-void yyerror(const char *pattern, const char*);
+void yyerror(const char *pattern, const char*) RE2C_GXX_ATTRIBUTE((noreturn));
} // extern "C"
-#line 85 "lib/parse.cc" /* yacc.c:339 */
+#line 97 "lib/parse.cc" /* yacc.c:339 */
# ifndef YY_NULLPTR
# if defined __cplusplus && 201103L <= __cplusplus
union YYSTYPE
{
-#line 25 "../lib/parse.ypp" /* yacc.c:355 */
+#line 37 "../lib/parse.ypp" /* yacc.c:355 */
const re2c::AST *regexp;
re2c::ASTBounds bounds;
-#line 136 "lib/parse.cc" /* yacc.c:355 */
+#line 148 "lib/parse.cc" /* yacc.c:355 */
};
typedef union YYSTYPE YYSTYPE;
/* Copy the second part of user declarations. */
-#line 153 "lib/parse.cc" /* yacc.c:358 */
+#line 165 "lib/parse.cc" /* yacc.c:358 */
#ifdef short
# undef short
#ifdef YYTYPE_UINT16
typedef YYTYPE_UINT16 yytype_uint16;
#else
-typedef unsigned short int yytype_uint16;
+typedef unsigned short yytype_uint16;
#endif
#ifdef YYTYPE_INT16
typedef YYTYPE_INT16 yytype_int16;
#else
-typedef short int yytype_int16;
+typedef short yytype_int16;
#endif
#ifndef YYSIZE_T
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# else
-# define YYSIZE_T unsigned int
+# define YYSIZE_T unsigned
# endif
#endif
# define YYUSE(E) /* empty */
#endif
-#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
+#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
/* Suppress an incorrect diagnostic about yylval being uninitialized. */
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
_Pragma ("GCC diagnostic push") \
#define YYMAXUTOK 260
#define YYTRANSLATE(YYX) \
- ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+ ((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
as returned by yylex, without out-of-bounds checking. */
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_uint8 yyrline[] =
{
- 0, 39, 39, 42, 43, 47, 48, 52, 53, 54,
- 55, 56, 60, 61, 62
+ 0, 51, 51, 54, 55, 59, 60, 64, 65, 66,
+ 67, 68, 72, 73, 74
};
#endif
static void
yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, const char *&pattern)
{
- unsigned long int yylno = yyrline[yyrule];
+ unsigned long yylno = yyrline[yyrule];
int yynrhs = yyr2[yyrule];
int yyi;
YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
case N: \
yyformat = S; \
break
+ default: /* Avoid compiler warnings. */
YYCASE_(0, YY_("syntax error"));
YYCASE_(1, YY_("syntax error, unexpected %s"));
YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
yyvsp = yyvs + yysize - 1;
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
- (unsigned long int) yystacksize));
+ (unsigned long) yystacksize));
if (yyss + yystacksize - 1 <= yyssp)
YYABORT;
switch (yyn)
{
case 2:
-#line 39 "../lib/parse.ypp" /* yacc.c:1646 */
+#line 51 "../lib/parse.ypp" /* yacc.c:1651 */
{ regexp = (yyval.regexp); }
-#line 1231 "lib/parse.cc" /* yacc.c:1646 */
+#line 1244 "lib/parse.cc" /* yacc.c:1651 */
break;
case 4:
-#line 43 "../lib/parse.ypp" /* yacc.c:1646 */
+#line 55 "../lib/parse.ypp" /* yacc.c:1651 */
{ (yyval.regexp) = ast_alt((yyvsp[-2].regexp), (yyvsp[0].regexp)); }
-#line 1237 "lib/parse.cc" /* yacc.c:1646 */
+#line 1250 "lib/parse.cc" /* yacc.c:1651 */
break;
case 6:
-#line 48 "../lib/parse.ypp" /* yacc.c:1646 */
+#line 60 "../lib/parse.ypp" /* yacc.c:1651 */
{ (yyval.regexp) = ast_cat((yyvsp[-1].regexp), (yyvsp[0].regexp)); }
-#line 1243 "lib/parse.cc" /* yacc.c:1646 */
+#line 1256 "lib/parse.cc" /* yacc.c:1651 */
break;
case 8:
-#line 53 "../lib/parse.ypp" /* yacc.c:1646 */
+#line 65 "../lib/parse.ypp" /* yacc.c:1651 */
{ (yyval.regexp) = ast_iter((yyvsp[-1].regexp), 0, AST::MANY); }
-#line 1249 "lib/parse.cc" /* yacc.c:1646 */
+#line 1262 "lib/parse.cc" /* yacc.c:1651 */
break;
case 9:
-#line 54 "../lib/parse.ypp" /* yacc.c:1646 */
+#line 66 "../lib/parse.ypp" /* yacc.c:1651 */
{ (yyval.regexp) = ast_iter((yyvsp[-1].regexp), 1, AST::MANY); }
-#line 1255 "lib/parse.cc" /* yacc.c:1646 */
+#line 1268 "lib/parse.cc" /* yacc.c:1651 */
break;
case 10:
-#line 55 "../lib/parse.ypp" /* yacc.c:1646 */
+#line 67 "../lib/parse.ypp" /* yacc.c:1651 */
{ (yyval.regexp) = ast_iter((yyvsp[-1].regexp), 0, 1); }
-#line 1261 "lib/parse.cc" /* yacc.c:1646 */
+#line 1274 "lib/parse.cc" /* yacc.c:1651 */
break;
case 11:
-#line 56 "../lib/parse.ypp" /* yacc.c:1646 */
+#line 68 "../lib/parse.ypp" /* yacc.c:1651 */
{ (yyval.regexp) = ast_iter((yyvsp[-1].regexp), (yyvsp[0].bounds).min, (yyvsp[0].bounds).max); }
-#line 1267 "lib/parse.cc" /* yacc.c:1646 */
+#line 1280 "lib/parse.cc" /* yacc.c:1651 */
break;
case 13:
-#line 61 "../lib/parse.ypp" /* yacc.c:1646 */
+#line 73 "../lib/parse.ypp" /* yacc.c:1651 */
{ (yyval.regexp) = ast_cap(ast_nil(NOWHERE)); }
-#line 1273 "lib/parse.cc" /* yacc.c:1646 */
+#line 1286 "lib/parse.cc" /* yacc.c:1651 */
break;
case 14:
-#line 62 "../lib/parse.ypp" /* yacc.c:1646 */
+#line 74 "../lib/parse.ypp" /* yacc.c:1651 */
{ (yyval.regexp) = ast_cap((yyvsp[-1].regexp)); }
-#line 1279 "lib/parse.cc" /* yacc.c:1646 */
+#line 1292 "lib/parse.cc" /* yacc.c:1651 */
break;
-#line 1283 "lib/parse.cc" /* yacc.c:1646 */
+#line 1296 "lib/parse.cc" /* yacc.c:1651 */
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
#endif
return yyresult;
}
-#line 65 "../lib/parse.ypp" /* yacc.c:1906 */
+#line 77 "../lib/parse.ypp" /* yacc.c:1910 */
+
+#pragma GCC diagnostic pop
extern "C" {
void yyerror(const char *pattern, const char *msg)
{
fprintf(stderr, "%s (on RE %s)", msg, pattern);
+ exit(1);
}
int yylex(const char *&pattern)
-/* A Bison parser, made by GNU Bison 3.0.4. */
+/* A Bison parser, made by GNU Bison 3.1. */
/* Bison implementation for Yacc-like parsers in C
- Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989-1990, 2000-2015, 2018 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "3.0.4"
+#define YYBISON_VERSION "3.1"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
#line 1 "../src/parse/parser.ypp" /* yacc.c:339 */
+// disable certain GCC and/or Clang warnings, as we have no control over
+// autogenerated code (Clang also understands '#pragma GCC')
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpragmas"
+#pragma GCC diagnostic ignored "-Wconversion"
+#pragma GCC diagnostic ignored "-Wsign-conversion"
+#pragma GCC diagnostic ignored "-Wunused-macros"
+#pragma GCC diagnostic ignored "-Wmissing-variable-declarations"
+#pragma GCC diagnostic ignored "-Wunreachable-code"
+#pragma GCC diagnostic ignored "-Wunreachable-code-break"
+
#include "src/parse/parse.h"
+
using namespace re2c;
extern "C" {
int yylex(context_t &context);
-void yyerror(context_t &context, const char*);
+void yyerror(context_t &context, const char*) RE2C_GXX_ATTRIBUTE((noreturn));
} // extern "C"
}
-#line 90 "src/parse/parser.cc" /* yacc.c:339 */
+#line 102 "src/parse/parser.cc" /* yacc.c:339 */
# ifndef YY_NULLPTR
# if defined __cplusplus && 201103L <= __cplusplus
union YYSTYPE
{
-#line 30 "../src/parse/parser.ypp" /* yacc.c:355 */
+#line 42 "../src/parse/parser.ypp" /* yacc.c:355 */
const re2c::AST * regexp;
re2c::Code * code;
std::string * str;
re2c::CondList * clist;
-#line 155 "src/parse/parser.cc" /* yacc.c:355 */
+#line 167 "src/parse/parser.cc" /* yacc.c:355 */
};
typedef union YYSTYPE YYSTYPE;
/* Copy the second part of user declarations. */
-#line 172 "src/parse/parser.cc" /* yacc.c:358 */
+#line 184 "src/parse/parser.cc" /* yacc.c:358 */
#ifdef short
# undef short
#ifdef YYTYPE_UINT16
typedef YYTYPE_UINT16 yytype_uint16;
#else
-typedef unsigned short int yytype_uint16;
+typedef unsigned short yytype_uint16;
#endif
#ifdef YYTYPE_INT16
typedef YYTYPE_INT16 yytype_int16;
#else
-typedef short int yytype_int16;
+typedef short yytype_int16;
#endif
#ifndef YYSIZE_T
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# else
-# define YYSIZE_T unsigned int
+# define YYSIZE_T unsigned
# endif
#endif
# define YYUSE(E) /* empty */
#endif
-#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
+#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
/* Suppress an incorrect diagnostic about yylval being uninitialized. */
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
_Pragma ("GCC diagnostic push") \
#define YYMAXUTOK 270
#define YYTRANSLATE(YYX) \
- ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+ ((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
as returned by yylex, without out-of-bounds checking. */
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_uint8 yyrline[] =
{
- 0, 62, 62, 64, 65, 66, 67, 71, 79, 85,
- 86, 89, 89, 92, 95, 98, 101, 107, 113, 119,
- 125, 132, 133, 138, 145, 146, 152, 153, 157, 158,
- 162, 164, 168, 169, 176, 182, 183, 187, 188, 189,
- 193, 194, 206
+ 0, 74, 74, 76, 77, 78, 79, 83, 91, 97,
+ 98, 101, 101, 104, 107, 110, 113, 119, 125, 131,
+ 137, 144, 145, 150, 157, 158, 164, 165, 169, 170,
+ 174, 176, 180, 181, 188, 194, 195, 199, 200, 201,
+ 205, 206, 218
};
#endif
static void
yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, re2c::context_t &context)
{
- unsigned long int yylno = yyrline[yyrule];
+ unsigned long yylno = yyrline[yyrule];
int yynrhs = yyr2[yyrule];
int yyi;
YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
case N: \
yyformat = S; \
break
+ default: /* Avoid compiler warnings. */
YYCASE_(0, YY_("syntax error"));
YYCASE_(1, YY_("syntax error, unexpected %s"));
YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
yyvsp = yyvs + yysize - 1;
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
- (unsigned long int) yystacksize));
+ (unsigned long) yystacksize));
if (yyss + yystacksize - 1 <= yyssp)
YYABORT;
switch (yyn)
{
case 3:
-#line 64 "../src/parse/parser.ypp" /* yacc.c:1646 */
+#line 76 "../src/parse/parser.ypp" /* yacc.c:1651 */
{ context.input.lex_conf(context.opts); }
-#line 1290 "src/parse/parser.cc" /* yacc.c:1646 */
+#line 1303 "src/parse/parser.cc" /* yacc.c:1651 */
break;
case 7:
-#line 71 "../src/parse/parser.ypp" /* yacc.c:1646 */
+#line 83 "../src/parse/parser.ypp" /* yacc.c:1651 */
{
if (!context.symtab.insert(std::make_pair(*(yyvsp[-2].str), (yyvsp[-1].regexp))).second) {
context.input.msg.fatal(context.input.tok_loc()
}
delete (yyvsp[-2].str);
}
-#line 1302 "src/parse/parser.cc" /* yacc.c:1646 */
+#line 1315 "src/parse/parser.cc" /* yacc.c:1651 */
break;
case 8:
-#line 79 "../src/parse/parser.ypp" /* yacc.c:1646 */
+#line 91 "../src/parse/parser.ypp" /* yacc.c:1651 */
{
context.input.msg.fatal(context.input.tok_loc()
, "trailing contexts are not allowed in named definitions");
}
-#line 1311 "src/parse/parser.cc" /* yacc.c:1646 */
+#line 1324 "src/parse/parser.cc" /* yacc.c:1651 */
break;
case 9:
-#line 85 "../src/parse/parser.ypp" /* yacc.c:1646 */
+#line 97 "../src/parse/parser.ypp" /* yacc.c:1651 */
{ (yyval.str) = (yyvsp[-1].str); }
-#line 1317 "src/parse/parser.cc" /* yacc.c:1646 */
+#line 1330 "src/parse/parser.cc" /* yacc.c:1651 */
break;
case 13:
-#line 92 "../src/parse/parser.ypp" /* yacc.c:1646 */
+#line 104 "../src/parse/parser.ypp" /* yacc.c:1651 */
{
find(context.specs, "").rules.push_back(ASTRule((yyvsp[-1].regexp), (yyvsp[0].code)));
}
-#line 1325 "src/parse/parser.cc" /* yacc.c:1646 */
+#line 1338 "src/parse/parser.cc" /* yacc.c:1651 */
break;
case 14:
-#line 95 "../src/parse/parser.ypp" /* yacc.c:1646 */
+#line 107 "../src/parse/parser.ypp" /* yacc.c:1651 */
{
find(context.specs, "").defs.push_back((yyvsp[0].code));
}
-#line 1333 "src/parse/parser.cc" /* yacc.c:1646 */
+#line 1346 "src/parse/parser.cc" /* yacc.c:1651 */
break;
case 15:
-#line 98 "../src/parse/parser.ypp" /* yacc.c:1646 */
+#line 110 "../src/parse/parser.ypp" /* yacc.c:1651 */
{
find(context.specs, "").eofs.push_back((yyvsp[0].code));
}
-#line 1341 "src/parse/parser.cc" /* yacc.c:1646 */
+#line 1354 "src/parse/parser.cc" /* yacc.c:1651 */
break;
case 16:
-#line 101 "../src/parse/parser.ypp" /* yacc.c:1646 */
+#line 113 "../src/parse/parser.ypp" /* yacc.c:1651 */
{
for(CondList::const_iterator i = (yyvsp[-2].clist)->begin(); i != (yyvsp[-2].clist)->end(); ++i) {
find(context.specs, *i).rules.push_back(ASTRule((yyvsp[-1].regexp), (yyvsp[0].code)));
}
delete (yyvsp[-2].clist);
}
-#line 1352 "src/parse/parser.cc" /* yacc.c:1646 */
+#line 1365 "src/parse/parser.cc" /* yacc.c:1651 */
break;
case 17:
-#line 107 "../src/parse/parser.ypp" /* yacc.c:1646 */
+#line 119 "../src/parse/parser.ypp" /* yacc.c:1651 */
{
for(CondList::const_iterator i = (yyvsp[-2].clist)->begin(); i != (yyvsp[-2].clist)->end(); ++i) {
find(context.specs, *i).defs.push_back((yyvsp[0].code));
}
delete (yyvsp[-2].clist);
}
-#line 1363 "src/parse/parser.cc" /* yacc.c:1646 */
+#line 1376 "src/parse/parser.cc" /* yacc.c:1651 */
break;
case 18:
-#line 113 "../src/parse/parser.ypp" /* yacc.c:1646 */
+#line 125 "../src/parse/parser.ypp" /* yacc.c:1651 */
{
for(CondList::const_iterator i = (yyvsp[-2].clist)->begin(); i != (yyvsp[-2].clist)->end(); ++i) {
find(context.specs, *i).eofs.push_back((yyvsp[0].code));
}
delete (yyvsp[-2].clist);
}
-#line 1374 "src/parse/parser.cc" /* yacc.c:1646 */
+#line 1387 "src/parse/parser.cc" /* yacc.c:1651 */
break;
case 19:
-#line 119 "../src/parse/parser.ypp" /* yacc.c:1646 */
+#line 131 "../src/parse/parser.ypp" /* yacc.c:1651 */
{
for (CondList::const_iterator i = (yyvsp[-1].clist)->begin(); i != (yyvsp[-1].clist)->end(); ++i) {
find(context.specs, *i).setup.push_back((yyvsp[0].code));
}
delete (yyvsp[-1].clist);
}
-#line 1385 "src/parse/parser.cc" /* yacc.c:1646 */
+#line 1398 "src/parse/parser.cc" /* yacc.c:1651 */
break;
case 20:
-#line 125 "../src/parse/parser.ypp" /* yacc.c:1646 */
+#line 137 "../src/parse/parser.ypp" /* yacc.c:1651 */
{
const AST *r = ast_nil(context.input.tok_loc());
find(context.specs, "0").rules.push_back(ASTRule(r, (yyvsp[0].code)));
delete (yyvsp[-1].clist);
}
-#line 1395 "src/parse/parser.cc" /* yacc.c:1646 */
+#line 1408 "src/parse/parser.cc" /* yacc.c:1651 */
break;
case 22:
-#line 133 "../src/parse/parser.ypp" /* yacc.c:1646 */
+#line 145 "../src/parse/parser.ypp" /* yacc.c:1651 */
{
(yyval.code) = (yyvsp[0].code);
(yyval.code)->cond = *(yyvsp[-1].str);
delete (yyvsp[-1].str);
}
-#line 1405 "src/parse/parser.cc" /* yacc.c:1646 */
+#line 1418 "src/parse/parser.cc" /* yacc.c:1651 */
break;
case 23:
-#line 138 "../src/parse/parser.ypp" /* yacc.c:1646 */
+#line 150 "../src/parse/parser.ypp" /* yacc.c:1651 */
{
(yyval.code) = new Code(context.input.tok_loc());
(yyval.code)->cond = *(yyvsp[0].str);
delete (yyvsp[0].str);
}
-#line 1415 "src/parse/parser.cc" /* yacc.c:1646 */
+#line 1428 "src/parse/parser.cc" /* yacc.c:1651 */
break;
case 24:
-#line 145 "../src/parse/parser.ypp" /* yacc.c:1646 */
+#line 157 "../src/parse/parser.ypp" /* yacc.c:1651 */
{ (yyval.regexp) = ast_cap((yyvsp[0].regexp)); }
-#line 1421 "src/parse/parser.cc" /* yacc.c:1646 */
+#line 1434 "src/parse/parser.cc" /* yacc.c:1651 */
break;
case 25:
-#line 146 "../src/parse/parser.ypp" /* yacc.c:1646 */
+#line 158 "../src/parse/parser.ypp" /* yacc.c:1651 */
{
(yyval.regexp) = ast_cat(ast_cap((yyvsp[-2].regexp)),
ast_cat(ast_tag(context.input.tok_loc(), NULL, false), (yyvsp[0].regexp)));
}
-#line 1430 "src/parse/parser.cc" /* yacc.c:1646 */
+#line 1443 "src/parse/parser.cc" /* yacc.c:1651 */
break;
case 27:
-#line 153 "../src/parse/parser.ypp" /* yacc.c:1646 */
+#line 165 "../src/parse/parser.ypp" /* yacc.c:1651 */
{ (yyval.regexp) = ast_alt((yyvsp[-2].regexp), (yyvsp[0].regexp)); }
-#line 1436 "src/parse/parser.cc" /* yacc.c:1646 */
+#line 1449 "src/parse/parser.cc" /* yacc.c:1651 */
break;
case 29:
-#line 158 "../src/parse/parser.ypp" /* yacc.c:1646 */
+#line 170 "../src/parse/parser.ypp" /* yacc.c:1651 */
{ (yyval.regexp) = ast_diff((yyvsp[-2].regexp), (yyvsp[0].regexp)); }
-#line 1442 "src/parse/parser.cc" /* yacc.c:1646 */
+#line 1455 "src/parse/parser.cc" /* yacc.c:1651 */
break;
case 31:
-#line 164 "../src/parse/parser.ypp" /* yacc.c:1646 */
+#line 176 "../src/parse/parser.ypp" /* yacc.c:1651 */
{ (yyval.regexp) = ast_cat((yyvsp[-1].regexp), (yyvsp[0].regexp)); }
-#line 1448 "src/parse/parser.cc" /* yacc.c:1646 */
+#line 1461 "src/parse/parser.cc" /* yacc.c:1651 */
break;
case 33:
-#line 169 "../src/parse/parser.ypp" /* yacc.c:1646 */
+#line 181 "../src/parse/parser.ypp" /* yacc.c:1651 */
{
switch((yyvsp[0].op)) {
case '*': (yyval.regexp) = ast_iter((yyvsp[-1].regexp), 0, AST::MANY); break;
case '?': (yyval.regexp) = ast_iter((yyvsp[-1].regexp), 0, 1); break;
}
}
-#line 1460 "src/parse/parser.cc" /* yacc.c:1646 */
+#line 1473 "src/parse/parser.cc" /* yacc.c:1651 */
break;
case 34:
-#line 176 "../src/parse/parser.ypp" /* yacc.c:1646 */
+#line 188 "../src/parse/parser.ypp" /* yacc.c:1651 */
{
(yyval.regexp) = ast_iter((yyvsp[-1].regexp), (yyvsp[0].bounds).min, (yyvsp[0].bounds).max);
}
-#line 1468 "src/parse/parser.cc" /* yacc.c:1646 */
+#line 1481 "src/parse/parser.cc" /* yacc.c:1651 */
break;
case 36:
-#line 183 "../src/parse/parser.ypp" /* yacc.c:1646 */
+#line 195 "../src/parse/parser.ypp" /* yacc.c:1651 */
{ (yyval.op) = ((yyvsp[-1].op) == (yyvsp[0].op)) ? (yyvsp[-1].op) : '*'; }
-#line 1474 "src/parse/parser.cc" /* yacc.c:1646 */
+#line 1487 "src/parse/parser.cc" /* yacc.c:1651 */
break;
case 37:
-#line 187 "../src/parse/parser.ypp" /* yacc.c:1646 */
+#line 199 "../src/parse/parser.ypp" /* yacc.c:1651 */
{ (yyval.op) = '*'; }
-#line 1480 "src/parse/parser.cc" /* yacc.c:1646 */
+#line 1493 "src/parse/parser.cc" /* yacc.c:1651 */
break;
case 38:
-#line 188 "../src/parse/parser.ypp" /* yacc.c:1646 */
+#line 200 "../src/parse/parser.ypp" /* yacc.c:1651 */
{ (yyval.op) = '+'; }
-#line 1486 "src/parse/parser.cc" /* yacc.c:1646 */
+#line 1499 "src/parse/parser.cc" /* yacc.c:1651 */
break;
case 39:
-#line 189 "../src/parse/parser.ypp" /* yacc.c:1646 */
+#line 201 "../src/parse/parser.ypp" /* yacc.c:1651 */
{ (yyval.op) = '?'; }
-#line 1492 "src/parse/parser.cc" /* yacc.c:1646 */
+#line 1505 "src/parse/parser.cc" /* yacc.c:1651 */
break;
case 41:
-#line 194 "../src/parse/parser.ypp" /* yacc.c:1646 */
+#line 206 "../src/parse/parser.ypp" /* yacc.c:1651 */
{
symtab_t::iterator i = context.symtab.find(*(yyvsp[0].str));
if (i == context.symtab.end()) {
}
delete (yyvsp[0].str);
}
-#line 1509 "src/parse/parser.cc" /* yacc.c:1646 */
+#line 1522 "src/parse/parser.cc" /* yacc.c:1651 */
break;
case 42:
-#line 206 "../src/parse/parser.ypp" /* yacc.c:1646 */
+#line 218 "../src/parse/parser.ypp" /* yacc.c:1651 */
{ (yyval.regexp) = ast_cap((yyvsp[-1].regexp)); }
-#line 1515 "src/parse/parser.cc" /* yacc.c:1646 */
+#line 1528 "src/parse/parser.cc" /* yacc.c:1651 */
break;
-#line 1519 "src/parse/parser.cc" /* yacc.c:1646 */
+#line 1532 "src/parse/parser.cc" /* yacc.c:1651 */
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
#endif
return yyresult;
}
-#line 209 "../src/parse/parser.ypp" /* yacc.c:1906 */
+#line 221 "../src/parse/parser.ypp" /* yacc.c:1910 */
+#pragma GCC diagnostic pop
+
extern "C" {
void yyerror(context_t &context, const char* s)
} // extern "C"
-namespace re2c
-{
+namespace re2c {
void parse(Scanner &input, specs_t &specs, symtab_t &symtab, Opt &opts)
{