parser.h
This file
The walk stopped after 200 commits: lines older than c3b1496 point at it.
Update NEWS.md with changes since 1.7 (#2948)Mattias Wadmanbefore adoptionc3b1496
lines 1–214why, one step back1/* A Bison parser, made by GNU Bison 3.8.2. */23/* Bison interface for Yacc-like parsers in C45 Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,6 Inc.78 This program is free software: you can redistribute it and/or modify9 it under the terms of the GNU General Public License as published by10 the Free Software Foundation, either version 3 of the License, or11 (at your option) any later version.1213 This program is distributed in the hope that it will be useful,14 but WITHOUT ANY WARRANTY; without even the implied warranty of15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the16 GNU General Public License for more details.1718 You should have received a copy of the GNU General Public License19 along with this program. If not, see <https://www.gnu.org/licenses/>. */2021/* As a special exception, you may create a larger work that contains22 part or all of the Bison parser skeleton and distribute that work23 under terms of your choice, so long as that work isn't itself a24 parser generator using the skeleton or a modified version thereof25 as a parser skeleton. Alternatively, if you modify or redistribute26 the parser skeleton itself, you may (at your option) remove this27 special exception, which will cause the skeleton and the resulting28 Bison output files to be licensed under the GNU General Public29 License without this special exception.3031 This special exception was added by the Free Software Foundation in32 version 2.2 of Bison. */3334/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,35 especially those whose name start with YY_ or yy_. They are36 private implementation details that can be changed or removed. */3738#ifndef YY_YY_SRC_PARSER_H_INCLUDED39# define YY_YY_SRC_PARSER_H_INCLUDED40/* Debug traces. */41#ifndef YYDEBUG42# define YYDEBUG 043#endif44#if YYDEBUG45extern int yydebug;46#endif47/* "%code requires" blocks. */48#line 12 "src/parser.y"4950#include "locfile.h"51struct lexer_param;5253#define YYLTYPE location54#define YYLLOC_DEFAULT(Loc, Rhs, N) \55 do { \56 if (N) { \57 (Loc).start = YYRHSLOC(Rhs, 1).start; \58 (Loc).end = YYRHSLOC(Rhs, N).end; \59 } else { \60 (Loc).start = YYRHSLOC(Rhs, 0).end; \61 (Loc).end = YYRHSLOC(Rhs, 0).end; \62 } \63 } while (0)6465#line 66 "src/parser.h"6667/* Token kinds. */68#ifndef YYTOKENTYPE69# define YYTOKENTYPE70 enum yytokentype71 {72 YYEMPTY = -2,73 YYEOF = 0, /* "end of file" */74 YYerror = 256, /* error */75 YYUNDEF = 257, /* "invalid token" */76 INVALID_CHARACTER = 258, /* INVALID_CHARACTER */77 IDENT = 259, /* IDENT */78 FIELD = 260, /* FIELD */79 BINDING = 261, /* BINDING */80 LITERAL = 262, /* LITERAL */81 FORMAT = 263, /* FORMAT */82 REC = 264, /* ".." */83 SETMOD = 265, /* "%=" */84 EQ = 266, /* "==" */85 NEQ = 267, /* "!=" */86 DEFINEDOR = 268, /* "//" */87 AS = 269, /* "as" */88 DEF = 270, /* "def" */89 MODULE = 271, /* "module" */90 IMPORT = 272, /* "import" */91 INCLUDE = 273, /* "include" */92 IF = 274, /* "if" */93 THEN = 275, /* "then" */94 ELSE = 276, /* "else" */95 ELSE_IF = 277, /* "elif" */96 REDUCE = 278, /* "reduce" */97 FOREACH = 279, /* "foreach" */98 END = 280, /* "end" */99 AND = 281, /* "and" */100 OR = 282, /* "or" */101 TRY = 283, /* "try" */102 CATCH = 284, /* "catch" */103 LABEL = 285, /* "label" */104 BREAK = 286, /* "break" */105 LOC = 287, /* "$__loc__" */106 SETPIPE = 288, /* "|=" */107 SETPLUS = 289, /* "+=" */108 SETMINUS = 290, /* "-=" */109 SETMULT = 291, /* "*=" */110 SETDIV = 292, /* "/=" */111 SETDEFINEDOR = 293, /* "//=" */112 LESSEQ = 294, /* "<=" */113 GREATEREQ = 295, /* ">=" */114 ALTERNATION = 296, /* "?//" */115 QQSTRING_START = 297, /* QQSTRING_START */116 QQSTRING_TEXT = 298, /* QQSTRING_TEXT */117 QQSTRING_INTERP_START = 299, /* QQSTRING_INTERP_START */118 QQSTRING_INTERP_END = 300, /* QQSTRING_INTERP_END */119 QQSTRING_END = 301, /* QQSTRING_END */120 FUNCDEF = 302, /* FUNCDEF */121 NONOPT = 303 /* NONOPT */122 };123 typedef enum yytokentype yytoken_kind_t;124#endif125/* Token kinds. */126#define YYEMPTY -2127#define YYEOF 0128#define YYerror 256129#define YYUNDEF 257130#define INVALID_CHARACTER 258131#define IDENT 259132#define FIELD 260133#define BINDING 261134#define LITERAL 262135#define FORMAT 263136#define REC 264137#define SETMOD 265138#define EQ 266139#define NEQ 267140#define DEFINEDOR 268141#define AS 269142#define DEF 270143#define MODULE 271144#define IMPORT 272145#define INCLUDE 273146#define IF 274147#define THEN 275148#define ELSE 276149#define ELSE_IF 277150#define REDUCE 278151#define FOREACH 279152#define END 280153#define AND 281154#define OR 282155#define TRY 283156#define CATCH 284157#define LABEL 285158#define BREAK 286159#define LOC 287160#define SETPIPE 288161#define SETPLUS 289162#define SETMINUS 290163#define SETMULT 291164#define SETDIV 292165#define SETDEFINEDOR 293166#define LESSEQ 294167#define GREATEREQ 295168#define ALTERNATION 296169#define QQSTRING_START 297170#define QQSTRING_TEXT 298171#define QQSTRING_INTERP_START 299172#define QQSTRING_INTERP_END 300173#define QQSTRING_END 301174#define FUNCDEF 302175#define NONOPT 303176177/* Value type. */178#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED179union YYSTYPE180{181#line 32 "src/parser.y"182183 jv literal;184 block blk;185186#line 187 "src/parser.h"187188};189typedef union YYSTYPE YYSTYPE;190# define YYSTYPE_IS_TRIVIAL 1191# define YYSTYPE_IS_DECLARED 1192#endif193194/* Location type. */195#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED196typedef struct YYLTYPE YYLTYPE;197struct YYLTYPE198{199 int first_line;200 int first_column;201 int last_line;202 int last_column;203};204# define YYLTYPE_IS_DECLARED 1205# define YYLTYPE_IS_TRIVIAL 1206#endif207208209210211int yyparse (block* answer, int* errors, struct locfile* locations, struct lexer_param* lexer_param_ptr);212213214#endif /* !YY_YY_SRC_PARSER_H_INCLUDED */