1 /* A Bison parser, made by GNU Bison 3.5. */ 2 3 /* Bison interface for Yacc-like parsers in C 4 5 Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation, 6 Inc. 7 8 This program is free software: you can redistribute it and/or modify 9 it under the terms of the GNU General Public License as published by 10 the Free Software Foundation, either version 3 of the License, or 11 (at your option) any later version. 12 13 This program is distributed in the hope that it will be useful, 14 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 GNU General Public License for more details. 17 18 You should have received a copy of the GNU General Public License 19 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 20 21 /* As a special exception, you may create a larger work that contains 22 part or all of the Bison parser skeleton and distribute that work 23 under terms of your choice, so long as that work isn't itself a 24 parser generator using the skeleton or a modified version thereof 25 as a parser skeleton. Alternatively, if you modify or redistribute 26 the parser skeleton itself, you may (at your option) remove this 27 special exception, which will cause the skeleton and the resulting 28 Bison output files to be licensed under the GNU General Public 29 License without this special exception. 30 31 This special exception was added by the Free Software Foundation in 32 version 2.2 of Bison. */ 33 34 /* Undocumented macros, especially those whose name start with YY_, 35 are private implementation details. Do not rely on them. */ 36 37 #ifndef YY_YY_PARSER_YANG_BIS_H_INCLUDED 38 # define YY_YY_PARSER_YANG_BIS_H_INCLUDED 39 /* Debug traces. */ 40 #ifndef YYDEBUG 41 # define YYDEBUG 0 42 #endif 43 #if YYDEBUG 44 extern int yydebug; 45 #endif 46 47 /* Token type. */ 48 #ifndef YYTOKENTYPE 49 # define YYTOKENTYPE 50 enum yytokentype 51 { 52 UNION_KEYWORD = 258, 53 ANYXML_KEYWORD = 259, 54 WHITESPACE = 260, 55 ERROR = 261, 56 EOL = 262, 57 STRING = 263, 58 STRINGS = 264, 59 IDENTIFIER = 265, 60 IDENTIFIERPREFIX = 266, 61 REVISION_DATE = 267, 62 TAB = 268, 63 DOUBLEDOT = 269, 64 URI = 270, 65 INTEGER = 271, 66 NON_NEGATIVE_INTEGER = 272, 67 ZERO = 273, 68 DECIMAL = 274, 69 ARGUMENT_KEYWORD = 275, 70 AUGMENT_KEYWORD = 276, 71 BASE_KEYWORD = 277, 72 BELONGS_TO_KEYWORD = 278, 73 BIT_KEYWORD = 279, 74 CASE_KEYWORD = 280, 75 CHOICE_KEYWORD = 281, 76 CONFIG_KEYWORD = 282, 77 CONTACT_KEYWORD = 283, 78 CONTAINER_KEYWORD = 284, 79 DEFAULT_KEYWORD = 285, 80 DESCRIPTION_KEYWORD = 286, 81 ENUM_KEYWORD = 287, 82 ERROR_APP_TAG_KEYWORD = 288, 83 ERROR_MESSAGE_KEYWORD = 289, 84 EXTENSION_KEYWORD = 290, 85 DEVIATION_KEYWORD = 291, 86 DEVIATE_KEYWORD = 292, 87 FEATURE_KEYWORD = 293, 88 FRACTION_DIGITS_KEYWORD = 294, 89 GROUPING_KEYWORD = 295, 90 IDENTITY_KEYWORD = 296, 91 IF_FEATURE_KEYWORD = 297, 92 IMPORT_KEYWORD = 298, 93 INCLUDE_KEYWORD = 299, 94 INPUT_KEYWORD = 300, 95 KEY_KEYWORD = 301, 96 LEAF_KEYWORD = 302, 97 LEAF_LIST_KEYWORD = 303, 98 LENGTH_KEYWORD = 304, 99 LIST_KEYWORD = 305, 100 MANDATORY_KEYWORD = 306, 101 MAX_ELEMENTS_KEYWORD = 307, 102 MIN_ELEMENTS_KEYWORD = 308, 103 MODULE_KEYWORD = 309, 104 MUST_KEYWORD = 310, 105 NAMESPACE_KEYWORD = 311, 106 NOTIFICATION_KEYWORD = 312, 107 ORDERED_BY_KEYWORD = 313, 108 ORGANIZATION_KEYWORD = 314, 109 OUTPUT_KEYWORD = 315, 110 PATH_KEYWORD = 316, 111 PATTERN_KEYWORD = 317, 112 POSITION_KEYWORD = 318, 113 PREFIX_KEYWORD = 319, 114 PRESENCE_KEYWORD = 320, 115 RANGE_KEYWORD = 321, 116 REFERENCE_KEYWORD = 322, 117 REFINE_KEYWORD = 323, 118 REQUIRE_INSTANCE_KEYWORD = 324, 119 REVISION_KEYWORD = 325, 120 REVISION_DATE_KEYWORD = 326, 121 RPC_KEYWORD = 327, 122 STATUS_KEYWORD = 328, 123 SUBMODULE_KEYWORD = 329, 124 TYPE_KEYWORD = 330, 125 TYPEDEF_KEYWORD = 331, 126 UNIQUE_KEYWORD = 332, 127 UNITS_KEYWORD = 333, 128 USES_KEYWORD = 334, 129 VALUE_KEYWORD = 335, 130 WHEN_KEYWORD = 336, 131 YANG_VERSION_KEYWORD = 337, 132 YIN_ELEMENT_KEYWORD = 338, 133 ADD_KEYWORD = 339, 134 CURRENT_KEYWORD = 340, 135 DELETE_KEYWORD = 341, 136 DEPRECATED_KEYWORD = 342, 137 FALSE_KEYWORD = 343, 138 NOT_SUPPORTED_KEYWORD = 344, 139 OBSOLETE_KEYWORD = 345, 140 REPLACE_KEYWORD = 346, 141 SYSTEM_KEYWORD = 347, 142 TRUE_KEYWORD = 348, 143 UNBOUNDED_KEYWORD = 349, 144 USER_KEYWORD = 350, 145 ACTION_KEYWORD = 351, 146 MODIFIER_KEYWORD = 352, 147 ANYDATA_KEYWORD = 353, 148 NODE = 354, 149 NODE_PRINT = 355, 150 EXTENSION_INSTANCE = 356, 151 SUBMODULE_EXT_KEYWORD = 357 152 }; 153 #endif 154 155 /* Value type. */ 156 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 157 union YYSTYPE 158 { 159 160 int64_t i; 161 uint32_t uint; 162 char *str; 163 char **p_str; 164 void *v; 165 char ch; 166 struct yang_type *type; 167 struct lys_deviation *dev; 168 struct lys_deviate *deviate; 169 union { 170 uint32_t index; 171 struct lys_node_container *container; 172 struct lys_node_anydata *anydata; 173 struct type_node node; 174 struct lys_node_case *cs; 175 struct lys_node_grp *grouping; 176 struct lys_refine *refine; 177 struct lys_node_notif *notif; 178 struct lys_node_uses *uses; 179 struct lys_node_inout *inout; 180 struct lys_node_augment *augment; 181 } nodes; 182 enum yytokentype token; 183 struct { 184 void *actual; 185 enum yytokentype token; 186 } backup_token; 187 struct { 188 struct lys_revision **revision; 189 int index; 190 } revisions; 191 192 193 }; 194 typedef union YYSTYPE YYSTYPE; 195 # define YYSTYPE_IS_TRIVIAL 1 196 # define YYSTYPE_IS_DECLARED 1 197 #endif 198 199 /* Location type. */ 200 #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED 201 typedef struct YYLTYPE YYLTYPE; 202 struct YYLTYPE 203 { 204 int first_line; 205 int first_column; 206 int last_line; 207 int last_column; 208 }; 209 # define YYLTYPE_IS_DECLARED 1 210 # define YYLTYPE_IS_TRIVIAL 1 211 #endif 212 213 214 215 int yyparse (void *scanner, struct yang_parameter *param); 216 217 #endif /* !YY_YY_PARSER_YANG_BIS_H_INCLUDED */ 218