1 //
2 // Copyright 2016 Pixar
3 //
4 // Licensed under the Apache License, Version 2.0 (the "Apache License")
5 // with the following modification; you may not use this file except in
6 // compliance with the Apache License and the following modification to it:
7 // Section 6. Trademarks. is deleted and replaced with:
8 //
9 // 6. Trademarks. This License does not grant permission to use the trade
10 // names, trademarks, service marks, or product names of the Licensor
11 // and its affiliates, except as required to comply with Section 4(c) of
12 // the License and to reproduce the content of the NOTICE file.
13 //
14 // You may obtain a copy of the Apache License at
15 //
16 // http://www.apache.org/licenses/LICENSE-2.0
17 //
18 // Unless required by applicable law or agreed to in writing, software
19 // distributed under the Apache License with the above modification is
20 // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21 // KIND, either express or implied. See the Apache License for the specific
22 // language governing permissions and limitations under the Apache License.
23 //
24
25 /* A Bison parser, made by GNU Bison 2.4.1. */
26
27 /* Skeleton implementation for Bison's Yacc-like parsers in C
28
29 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
30 Free Software Foundation, Inc.
31
32 This program is free software: you can redistribute it and/or modify
33 it under the terms of the GNU General Public License as published by
34 the Free Software Foundation, either version 3 of the License, or
35 (at your option) any later version.
36
37 This program is distributed in the hope that it will be useful,
38 but WITHOUT ANY WARRANTY; without even the implied warranty of
39 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
40 GNU General Public License for more details.
41
42 You should have received a copy of the GNU General Public License
43 along with this program. If not, see <http://www.gnu.org/licenses/>. */
44
45 /* As a special exception, you may create a larger work that contains
46 part or all of the Bison parser skeleton and distribute that work
47 under terms of your choice, so long as that work isn't itself a
48 parser generator using the skeleton or a modified version thereof
49 as a parser skeleton. Alternatively, if you modify or redistribute
50 the parser skeleton itself, you may (at your option) remove this
51 special exception, which will cause the skeleton and the resulting
52 Bison output files to be licensed under the GNU General Public
53 License without this special exception.
54
55 This special exception was added by the Free Software Foundation in
56 version 2.2 of Bison. */
57
58 /* C LALR(1) parser skeleton written by Richard Stallman, by
59 simplifying the original so-called "semantic" parser. */
60
61 /* All symbols defined below should begin with yy or YY, to avoid
62 infringing on user name space. This should be done even for local
63 variables, as they might otherwise be expanded by user macros.
64 There are some unavoidable exceptions within include files to
65 define necessary library symbols; they are noted "INFRINGES ON
66 USER NAME SPACE" below. */
67
68 /* Identify Bison output. */
69 #define YYBISON 1
70
71 /* Bison version. */
72 #define YYBISON_VERSION "2.4.1"
73
74 /* Skeleton name. */
75 #define YYSKELETON_NAME "yacc.c"
76
77 /* Pure parsers. */
78 #define YYPURE 1
79
80 /* Push parsers. */
81 #define YYPUSH 0
82
83 /* Pull parsers. */
84 #define YYPULL 1
85
86 /* Using locations. */
87 #define YYLSP_NEEDED 0
88
89 /* Substitute the variable and function names. */
90 #define yyparse pathYyparse
91 #define yylex pathYylex
92 #define yyerror pathYyerror
93 #define yylval pathYylval
94 #define yychar pathYychar
95 #define yydebug pathYydebug
96 #define yynerrs pathYynerrs
97
98
99 /* Copy the first part of user declarations. */
100
101 /* Line 189 of yacc.c */
102 #line 25 "pxr/usd/sdf/path.yy"
103
104 // sdf/path.yy
105
106 #include "pxr/pxr.h"
107 #include "pxr/usd/sdf/pathParser.h"
108 #include "pxr/base/tf/diagnostic.h"
109 #include "pxr/base/tf/staticData.h"
110
111 #include <string>
112 #include <utility>
113 #include <vector>
114
115 using std::pair;
116 using std::string;
117 using std::vector;
118
119 PXR_NAMESPACE_USING_DIRECTIVE
120
121 //--------------------------------------------------------------------
122 // Extern declarations to scanner data and functions
123 //--------------------------------------------------------------------
124 extern int pathYylex(YYSTYPE *yylval_param, yyscan_t yyscanner);
125 static void pathYyerror(Sdf_PathParserContext *context, const char *msg);
126
127 #define yyscanner context->scanner
128
129
130
131 /* Line 189 of yacc.c */
132 #line 110 "pxr/usd/sdf/path.tab.cpp"
133
134 /* Enabling traces. */
135 #ifndef YYDEBUG
136 # define YYDEBUG 0
137 #endif
138
139 /* Enabling verbose error messages. */
140 #ifdef YYERROR_VERBOSE
141 # undef YYERROR_VERBOSE
142 # define YYERROR_VERBOSE 1
143 #else
144 # define YYERROR_VERBOSE 0
145 #endif
146
147 /* Enabling the token table. */
148 #ifndef YYTOKEN_TABLE
149 # define YYTOKEN_TABLE 0
150 #endif
151
152
153 /* Tokens. */
154 #ifndef YYTOKENTYPE
155 # define YYTOKENTYPE
156 /* Put the tokens into the symbol table, so that GDB and other debuggers
157 know about them. */
158 enum yytokentype {
159 TOK_MAPPER = 258,
160 TOK_EXPRESSION = 259,
161 TOK_IDENTIFIER = 260,
162 TOK_NAMESPACED_IDENTIFIER = 261,
163 TOK_PRIM_NAME = 262,
164 TOK_VARIANT_NAME = 263,
165 TOK_DOTDOT = 264,
166 TOK_WHITESPACE = 265
167 };
168 #endif
169
170
171
172 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
173 typedef int YYSTYPE;
174 # define YYSTYPE_IS_TRIVIAL 1
175 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
176 # define YYSTYPE_IS_DECLARED 1
177 #endif
178
179
180 /* Copy the second part of user declarations. */
181
182
183 /* Line 264 of yacc.c */
184 #line 162 "pxr/usd/sdf/path.tab.cpp"
185
186 #ifdef short
187 # undef short
188 #endif
189
190 #ifdef YYTYPE_UINT8
191 typedef YYTYPE_UINT8 yytype_uint8;
192 #else
193 typedef unsigned char yytype_uint8;
194 #endif
195
196 #ifdef YYTYPE_INT8
197 typedef YYTYPE_INT8 yytype_int8;
198 #elif (defined __STDC__ || defined __C99__FUNC__ \
199 || defined __cplusplus || defined _MSC_VER)
200 typedef signed char yytype_int8;
201 #else
202 typedef short int yytype_int8;
203 #endif
204
205 #ifdef YYTYPE_UINT16
206 typedef YYTYPE_UINT16 yytype_uint16;
207 #else
208 typedef unsigned short int yytype_uint16;
209 #endif
210
211 #ifdef YYTYPE_INT16
212 typedef YYTYPE_INT16 yytype_int16;
213 #else
214 typedef short int yytype_int16;
215 #endif
216
217 #ifndef YYSIZE_T
218 # ifdef __SIZE_TYPE__
219 # define YYSIZE_T __SIZE_TYPE__
220 # elif defined size_t
221 # define YYSIZE_T size_t
222 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
223 || defined __cplusplus || defined _MSC_VER)
224 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
225 # define YYSIZE_T size_t
226 # else
227 # define YYSIZE_T unsigned int
228 # endif
229 #endif
230
231 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
232
233 #ifndef YY_
234 # if YYENABLE_NLS
235 # if ENABLE_NLS
236 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
237 # define YY_(msgid) dgettext ("bison-runtime", msgid)
238 # endif
239 # endif
240 # ifndef YY_
241 # define YY_(msgid) msgid
242 # endif
243 #endif
244
245 /* Suppress unused-variable warnings by "using" E. */
246 #if ! defined lint || defined __GNUC__
247 # define YYUSE(e) ((void) (e))
248 #else
249 # define YYUSE(e) /* empty */
250 #endif
251
252 /* Identity function, used to suppress warnings about constant conditions. */
253 #ifndef lint
254 # define YYID(n) (n)
255 #else
256 #if (defined __STDC__ || defined __C99__FUNC__ \
257 || defined __cplusplus || defined _MSC_VER)
258 static int
YYID(int yyi)259 YYID (int yyi)
260 #else
261 static int
262 YYID (yyi)
263 int yyi;
264 #endif
265 {
266 return yyi;
267 }
268 #endif
269
270 #if ! defined yyoverflow || YYERROR_VERBOSE
271
272 /* The parser invokes alloca or malloc; define the necessary symbols. */
273
274 # ifdef YYSTACK_USE_ALLOCA
275 # if YYSTACK_USE_ALLOCA
276 # ifdef __GNUC__
277 # define YYSTACK_ALLOC __builtin_alloca
278 # elif defined __BUILTIN_VA_ARG_INCR
279 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
280 # elif defined _AIX
281 # define YYSTACK_ALLOC __alloca
282 # elif defined _MSC_VER
283 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
284 # define alloca _alloca
285 # else
286 # define YYSTACK_ALLOC alloca
287 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
288 || defined __cplusplus || defined _MSC_VER)
289 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
290 # ifndef _STDLIB_H
291 # define _STDLIB_H 1
292 # endif
293 # endif
294 # endif
295 # endif
296 # endif
297
298 # ifdef YYSTACK_ALLOC
299 /* Pacify GCC's `empty if-body' warning. */
300 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
301 # ifndef YYSTACK_ALLOC_MAXIMUM
302 /* The OS might guarantee only one guard page at the bottom of the stack,
303 and a page size can be as small as 4096 bytes. So we cannot safely
304 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
305 to allow for a few compiler-allocated temporary stack slots. */
306 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
307 # endif
308 # else
309 # define YYSTACK_ALLOC YYMALLOC
310 # define YYSTACK_FREE YYFREE
311 # ifndef YYSTACK_ALLOC_MAXIMUM
312 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
313 # endif
314 # if (defined __cplusplus && ! defined _STDLIB_H \
315 && ! ((defined YYMALLOC || defined malloc) \
316 && (defined YYFREE || defined free)))
317 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
318 # ifndef _STDLIB_H
319 # define _STDLIB_H 1
320 # endif
321 # endif
322 # ifndef YYMALLOC
323 # define YYMALLOC malloc
324 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
325 || defined __cplusplus || defined _MSC_VER)
326 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
327 # endif
328 # endif
329 # ifndef YYFREE
330 # define YYFREE free
331 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
332 || defined __cplusplus || defined _MSC_VER)
333 void free (void *); /* INFRINGES ON USER NAME SPACE */
334 # endif
335 # endif
336 # endif
337 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
338
339
340 #if (! defined yyoverflow \
341 && (! defined __cplusplus \
342 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
343
344 /* A type that is properly aligned for any stack member. */
345 union yyalloc
346 {
347 yytype_int16 yyss_alloc;
348 YYSTYPE yyvs_alloc;
349 };
350
351 /* The size of the maximum gap between one aligned stack and the next. */
352 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
353
354 /* The size of an array large to enough to hold all stacks, each with
355 N elements. */
356 # define YYSTACK_BYTES(N) \
357 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
358 + YYSTACK_GAP_MAXIMUM)
359
360 /* Copy COUNT objects from FROM to TO. The source and destination do
361 not overlap. */
362 # ifndef YYCOPY
363 # if defined __GNUC__ && 1 < __GNUC__
364 # define YYCOPY(To, From, Count) \
365 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
366 # else
367 # define YYCOPY(To, From, Count) \
368 do \
369 { \
370 YYSIZE_T yyi; \
371 for (yyi = 0; yyi < (Count); yyi++) \
372 (To)[yyi] = (From)[yyi]; \
373 } \
374 while (YYID (0))
375 # endif
376 # endif
377
378 /* Relocate STACK from its old location to the new one. The
379 local variables YYSIZE and YYSTACKSIZE give the old and new number of
380 elements in the stack, and YYPTR gives the new location of the
381 stack. Advance YYPTR to a properly aligned location for the next
382 stack. */
383 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
384 do \
385 { \
386 YYSIZE_T yynewbytes; \
387 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
388 Stack = &yyptr->Stack_alloc; \
389 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
390 yyptr += yynewbytes / sizeof (*yyptr); \
391 } \
392 while (YYID (0))
393
394 #endif
395
396 /* YYFINAL -- State number of the termination state. */
397 #define YYFINAL 30
398 /* YYLAST -- Last index in YYTABLE. */
399 #define YYLAST 117
400
401 /* YYNTOKENS -- Number of terminals. */
402 #define YYNTOKENS 18
403 /* YYNNTS -- Number of nonterminals. */
404 #define YYNNTS 25
405 /* YYNRULES -- Number of rules. */
406 #define YYNRULES 59
407 /* YYNRULES -- Number of states. */
408 #define YYNSTATES 90
409
410 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
411 #define YYUNDEFTOK 2
412 #define YYMAXUTOK 265
413
414 #define YYTRANSLATE(YYX) \
415 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
416
417 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
418 static const yytype_uint8 yytranslate[] =
419 {
420 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
421 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
422 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
423 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
424 2, 2, 2, 2, 2, 2, 11, 12, 2, 2,
425 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
426 2, 14, 2, 2, 2, 2, 2, 2, 2, 2,
427 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
428 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
429 2, 16, 2, 17, 2, 2, 2, 2, 2, 2,
430 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
431 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
432 2, 2, 2, 13, 2, 15, 2, 2, 2, 2,
433 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
434 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
435 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
436 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
437 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
438 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
439 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
440 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
441 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
442 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
443 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
444 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
445 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
446 5, 6, 7, 8, 9, 10
447 };
448
449 #if YYDEBUG
450 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
451 YYRHS. */
452 static const yytype_uint8 yyprhs[] =
453 {
454 0, 0, 3, 5, 7, 9, 11, 13, 15, 17,
455 19, 21, 23, 25, 27, 29, 33, 35, 37, 39,
456 42, 46, 50, 53, 54, 60, 62, 66, 75, 77,
457 79, 80, 83, 85, 87, 90, 93, 95, 97, 99,
458 101, 103, 105, 107, 110, 114, 119, 122, 127, 132,
459 136, 139, 144, 149, 156, 163, 167, 171, 175, 176
460 };
461
462 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
463 static const yytype_int8 yyrhs[] =
464 {
465 19, 0, -1, 23, -1, 3, -1, 4, -1, 5,
466 -1, 20, -1, 6, -1, 21, -1, 11, -1, 12,
467 -1, 25, -1, 24, -1, 34, -1, 9, -1, 24,
468 12, 9, -1, 27, -1, 26, -1, 31, -1, 12,
469 31, -1, 24, 12, 31, -1, 26, 12, 31, -1,
470 27, 31, -1, -1, 26, 28, 42, 29, 42, -1,
471 30, -1, 29, 42, 30, -1, 13, 42, 31, 42,
472 14, 42, 32, 15, -1, 7, -1, 21, -1, -1,
473 33, 42, -1, 8, -1, 31, -1, 11, 8, -1,
474 11, 31, -1, 35, -1, 36, -1, 37, -1, 38,
475 -1, 39, -1, 40, -1, 41, -1, 11, 22, -1,
476 25, 11, 22, -1, 24, 12, 11, 22, -1, 11,
477 1, -1, 35, 16, 23, 17, -1, 35, 16, 1,
478 17, -1, 36, 11, 22, -1, 36, 1, -1, 37,
479 16, 23, 17, -1, 37, 16, 1, 17, -1, 35,
480 11, 3, 16, 23, 17, -1, 37, 11, 3, 16,
481 23, 17, -1, 39, 11, 21, -1, 35, 11, 4,
482 -1, 37, 11, 4, -1, -1, 10, -1
483 };
484
485 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
486 static const yytype_uint16 yyrline[] =
487 {
488 0, 69, 69, 74, 75, 82, 83, 87, 88, 92,
489 95, 98, 99, 100, 104, 107, 113, 114, 118, 121,
490 124, 127, 130, 136, 136, 153, 154, 158, 166, 167,
491 171, 174, 180, 181, 182, 185, 191, 192, 193, 194,
492 195, 196, 197, 201, 204, 207, 210, 217, 220, 227,
493 235, 242, 245, 252, 255, 261, 267, 270, 275, 277
494 };
495 #endif
496
497 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
498 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
499 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
500 static const char *const yytname[] =
501 {
502 "$end", "error", "$undefined", "TOK_MAPPER", "TOK_EXPRESSION",
503 "TOK_IDENTIFIER", "TOK_NAMESPACED_IDENTIFIER", "TOK_PRIM_NAME",
504 "TOK_VARIANT_NAME", "TOK_DOTDOT", "TOK_WHITESPACE", "'.'", "'/'", "'{'",
505 "'='", "'}'", "'['", "']'", "$accept", "start", "keyword", "identifier",
506 "namespaced_identifier", "path", "dotdot_path", "prim_path",
507 "prim_path_sans_variant_selection", "prim_path_with_variant_selection",
508 "$@1", "variant_selection_list", "variant_selection", "prim_name",
509 "variant_name_opt", "variant_name", "property_path",
510 "prim_property_path", "target_path", "relational_attribute_path",
511 "relational_attribute_target_path", "mapper_path", "mapper_arg_path",
512 "expression_path", "whitespace_opt", 0
513 };
514 #endif
515
516 # ifdef YYPRINT
517 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
518 token YYLEX-NUM. */
519 static const yytype_uint16 yytoknum[] =
520 {
521 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
522 265, 46, 47, 123, 61, 125, 91, 93
523 };
524 # endif
525
526 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
527 static const yytype_uint8 yyr1[] =
528 {
529 0, 18, 19, 20, 20, 21, 21, 22, 22, 23,
530 23, 23, 23, 23, 24, 24, 25, 25, 26, 26,
531 26, 26, 26, 28, 27, 29, 29, 30, 31, 31,
532 32, 32, 33, 33, 33, 33, 34, 34, 34, 34,
533 34, 34, 34, 35, 35, 35, 35, 36, 36, 37,
534 37, 38, 38, 39, 39, 40, 41, 41, 42, 42
535 };
536
537 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
538 static const yytype_uint8 yyr2[] =
539 {
540 0, 2, 1, 1, 1, 1, 1, 1, 1, 1,
541 1, 1, 1, 1, 1, 3, 1, 1, 1, 2,
542 3, 3, 2, 0, 5, 1, 3, 8, 1, 1,
543 0, 2, 1, 1, 2, 2, 1, 1, 1, 1,
544 1, 1, 1, 2, 3, 4, 2, 4, 4, 3,
545 2, 4, 4, 6, 6, 3, 3, 3, 0, 1
546 };
547
548 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
549 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
550 means the default is an error. */
551 static const yytype_uint8 yydefact[] =
552 {
553 0, 3, 4, 5, 28, 14, 0, 10, 0, 6,
554 29, 2, 12, 11, 17, 16, 18, 13, 36, 0,
555 38, 39, 40, 41, 42, 46, 7, 8, 43, 19,
556 1, 0, 0, 0, 58, 22, 0, 0, 50, 0,
557 0, 0, 0, 15, 0, 20, 44, 21, 59, 0,
558 0, 56, 0, 0, 49, 0, 57, 0, 0, 55,
559 45, 58, 58, 25, 0, 48, 47, 0, 52, 51,
560 0, 24, 0, 0, 58, 26, 53, 54, 0, 58,
561 30, 32, 0, 33, 0, 58, 34, 35, 27, 31
562 };
563
564 /* YYDEFGOTO[NTERM-NUM]. */
565 static const yytype_int8 yydefgoto[] =
566 {
567 -1, 8, 9, 10, 28, 11, 12, 13, 14, 15,
568 34, 62, 63, 16, 84, 85, 17, 18, 19, 20,
569 21, 22, 23, 24, 49
570 };
571
572 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
573 STATE-NUM. */
574 #define YYPACT_NINF -58
575 static const yytype_int8 yypact[] =
576 {
577 75, -58, -58, -58, -58, -58, 40, 103, 3, -58,
578 -58, -58, 11, 19, 23, 103, -58, -58, -4, 14,
579 2, -58, 27, -58, -58, -58, -58, -58, -58, -58,
580 -58, 85, 108, 103, 32, -58, 7, 47, -58, 108,
581 16, 65, 112, -58, 108, -58, -58, -58, -58, 34,
582 33, -58, 36, 38, -58, 51, -58, 54, 64, -58,
583 -58, 32, 32, -58, 75, -58, -58, 75, -58, -58,
584 103, 34, 66, 68, 32, -58, -58, -58, 77, 32,
585 94, -58, 57, -58, 78, 32, -58, -58, -58, -58
586 };
587
588 /* YYPGOTO[NTERM-NUM]. */
589 static const yytype_int8 yypgoto[] =
590 {
591 -58, -58, -58, -5, -23, -35, -58, -58, -58, -58,
592 -58, -58, 24, -7, -58, -58, -58, -58, -58, -58,
593 -58, -58, -58, -58, -57
594 };
595
596 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
597 positive, shift that token. If negative, reduce the rule which
598 number is the opposite. If zero, do what YYDEFACT says.
599 If YYTABLE_NINF, syntax error. */
600 #define YYTABLE_NINF -38
601 static const yytype_int8 yytable[] =
602 {
603 29, 27, 53, 30, 70, 71, 58, 36, 35, 46,
604 50, 51, 37, 40, -37, 38, 54, 78, 41, 55,
605 56, 60, 80, 31, 45, 39, 47, 27, 89, 72,
606 32, -37, 73, -23, 27, 33, -23, 59, 42, 27,
607 -9, 25, 48, 1, 2, 3, 26, 61, 52, 64,
608 1, 2, 3, 65, 4, 66, 5, -9, 6, 7,
609 1, 2, 3, 74, 4, 86, 57, 67, 1, 2,
610 3, 68, 4, 83, 5, 87, 6, 7, 1, 2,
611 3, 69, 4, 76, 5, 77, 6, 7, 1, 2,
612 3, 79, 4, 88, 43, 75, 44, 1, 2, 3,
613 0, 4, 81, 0, 0, 82, 1, 2, 3, 0,
614 4, 1, 2, 3, 26, 1, 2, 3
615 };
616
617 static const yytype_int8 yycheck[] =
618 {
619 7, 6, 37, 0, 61, 62, 41, 11, 15, 32,
620 3, 4, 16, 11, 0, 1, 39, 74, 16, 3,
621 4, 44, 79, 12, 31, 11, 33, 32, 85, 64,
622 11, 17, 67, 10, 39, 12, 13, 42, 11, 44,
623 0, 1, 10, 3, 4, 5, 6, 13, 1, 16,
624 3, 4, 5, 17, 7, 17, 9, 17, 11, 12,
625 3, 4, 5, 70, 7, 8, 1, 16, 3, 4,
626 5, 17, 7, 80, 9, 82, 11, 12, 3, 4,
627 5, 17, 7, 17, 9, 17, 11, 12, 3, 4,
628 5, 14, 7, 15, 9, 71, 11, 3, 4, 5,
629 -1, 7, 8, -1, -1, 11, 3, 4, 5, -1,
630 7, 3, 4, 5, 6, 3, 4, 5
631 };
632
633 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
634 symbol of state STATE-NUM. */
635 static const yytype_uint8 yystos[] =
636 {
637 0, 3, 4, 5, 7, 9, 11, 12, 19, 20,
638 21, 23, 24, 25, 26, 27, 31, 34, 35, 36,
639 37, 38, 39, 40, 41, 1, 6, 21, 22, 31,
640 0, 12, 11, 12, 28, 31, 11, 16, 1, 11,
641 11, 16, 11, 9, 11, 31, 22, 31, 10, 42,
642 3, 4, 1, 23, 22, 3, 4, 1, 23, 21,
643 22, 13, 29, 30, 16, 17, 17, 16, 17, 17,
644 42, 42, 23, 23, 31, 30, 17, 17, 42, 14,
645 42, 8, 11, 31, 32, 33, 8, 31, 15, 42
646 };
647
648 #define yyerrok (yyerrstatus = 0)
649 #define yyclearin (yychar = YYEMPTY)
650 #define YYEMPTY (-2)
651 #define YYEOF 0
652
653 #define YYACCEPT goto yyacceptlab
654 #define YYABORT goto yyabortlab
655 #define YYERROR goto yyerrorlab
656
657
658 /* Like YYERROR except do call yyerror. This remains here temporarily
659 to ease the transition to the new meaning of YYERROR, for GCC.
660 Once GCC version 2 has supplanted version 1, this can go. */
661
662 #define YYFAIL goto yyerrlab
663
664 #define YYRECOVERING() (!!yyerrstatus)
665
666 #define YYBACKUP(Token, Value) \
667 do \
668 if (yychar == YYEMPTY && yylen == 1) \
669 { \
670 yychar = (Token); \
671 yylval = (Value); \
672 yytoken = YYTRANSLATE (yychar); \
673 YYPOPSTACK (1); \
674 goto yybackup; \
675 } \
676 else \
677 { \
678 yyerror (context, YY_("syntax error: cannot back up")); \
679 YYERROR; \
680 } \
681 while (YYID (0))
682
683
684 #define YYTERROR 1
685 #define YYERRCODE 256
686
687
688 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
689 If N is 0, then set CURRENT to the empty location which ends
690 the previous symbol: RHS[0] (always defined). */
691
692 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
693 #ifndef YYLLOC_DEFAULT
694 # define YYLLOC_DEFAULT(Current, Rhs, N) \
695 do \
696 if (YYID (N)) \
697 { \
698 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
699 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
700 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
701 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
702 } \
703 else \
704 { \
705 (Current).first_line = (Current).last_line = \
706 YYRHSLOC (Rhs, 0).last_line; \
707 (Current).first_column = (Current).last_column = \
708 YYRHSLOC (Rhs, 0).last_column; \
709 } \
710 while (YYID (0))
711 #endif
712
713
714 /* YY_LOCATION_PRINT -- Print the location on the stream.
715 This macro was not mandated originally: define only if we know
716 we won't break user code: when these are the locations we know. */
717
718 #ifndef YY_LOCATION_PRINT
719 # if YYLTYPE_IS_TRIVIAL
720 # define YY_LOCATION_PRINT(File, Loc) \
721 fprintf (File, "%d.%d-%d.%d", \
722 (Loc).first_line, (Loc).first_column, \
723 (Loc).last_line, (Loc).last_column)
724 # else
725 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
726 # endif
727 #endif
728
729
730 /* YYLEX -- calling `yylex' with the right arguments. */
731
732 #ifdef YYLEX_PARAM
733 # define YYLEX yylex (&yylval, YYLEX_PARAM)
734 #else
735 # define YYLEX yylex (&yylval, yyscanner)
736 #endif
737
738 /* Enable debugging if requested. */
739 #if YYDEBUG
740
741 # ifndef YYFPRINTF
742 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
743 # define YYFPRINTF fprintf
744 # endif
745
746 # define YYDPRINTF(Args) \
747 do { \
748 if (yydebug) \
749 YYFPRINTF Args; \
750 } while (YYID (0))
751
752 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
753 do { \
754 if (yydebug) \
755 { \
756 YYFPRINTF (stderr, "%s ", Title); \
757 yy_symbol_print (stderr, \
758 Type, Value, context); \
759 YYFPRINTF (stderr, "\n"); \
760 } \
761 } while (YYID (0))
762
763
764 /*--------------------------------.
765 | Print this symbol on YYOUTPUT. |
766 `--------------------------------*/
767
768 /*ARGSUSED*/
769 #if (defined __STDC__ || defined __C99__FUNC__ \
770 || defined __cplusplus || defined _MSC_VER)
771 static void
yy_symbol_value_print(FILE * yyoutput,int yytype,YYSTYPE const * const yyvaluep,Sdf_PathParserContext * context)772 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, Sdf_PathParserContext *context)
773 #else
774 static void
775 yy_symbol_value_print (yyoutput, yytype, yyvaluep, context)
776 FILE *yyoutput;
777 int yytype;
778 YYSTYPE const * const yyvaluep;
779 Sdf_PathParserContext *context;
780 #endif
781 {
782 if (!yyvaluep)
783 return;
784 YYUSE (context);
785 # ifdef YYPRINT
786 if (yytype < YYNTOKENS)
787 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
788 # else
789 YYUSE (yyoutput);
790 # endif
791 switch (yytype)
792 {
793 default:
794 break;
795 }
796 }
797
798
799 /*--------------------------------.
800 | Print this symbol on YYOUTPUT. |
801 `--------------------------------*/
802
803 #if (defined __STDC__ || defined __C99__FUNC__ \
804 || defined __cplusplus || defined _MSC_VER)
805 static void
yy_symbol_print(FILE * yyoutput,int yytype,YYSTYPE const * const yyvaluep,Sdf_PathParserContext * context)806 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, Sdf_PathParserContext *context)
807 #else
808 static void
809 yy_symbol_print (yyoutput, yytype, yyvaluep, context)
810 FILE *yyoutput;
811 int yytype;
812 YYSTYPE const * const yyvaluep;
813 Sdf_PathParserContext *context;
814 #endif
815 {
816 if (yytype < YYNTOKENS)
817 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
818 else
819 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
820
821 yy_symbol_value_print (yyoutput, yytype, yyvaluep, context);
822 YYFPRINTF (yyoutput, ")");
823 }
824
825 /*------------------------------------------------------------------.
826 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
827 | TOP (included). |
828 `------------------------------------------------------------------*/
829
830 #if (defined __STDC__ || defined __C99__FUNC__ \
831 || defined __cplusplus || defined _MSC_VER)
832 static void
yy_stack_print(yytype_int16 * yybottom,yytype_int16 * yytop)833 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
834 #else
835 static void
836 yy_stack_print (yybottom, yytop)
837 yytype_int16 *yybottom;
838 yytype_int16 *yytop;
839 #endif
840 {
841 YYFPRINTF (stderr, "Stack now");
842 for (; yybottom <= yytop; yybottom++)
843 {
844 int yybot = *yybottom;
845 YYFPRINTF (stderr, " %d", yybot);
846 }
847 YYFPRINTF (stderr, "\n");
848 }
849
850 # define YY_STACK_PRINT(Bottom, Top) \
851 do { \
852 if (yydebug) \
853 yy_stack_print ((Bottom), (Top)); \
854 } while (YYID (0))
855
856
857 /*------------------------------------------------.
858 | Report that the YYRULE is going to be reduced. |
859 `------------------------------------------------*/
860
861 #if (defined __STDC__ || defined __C99__FUNC__ \
862 || defined __cplusplus || defined _MSC_VER)
863 static void
yy_reduce_print(YYSTYPE * yyvsp,int yyrule,Sdf_PathParserContext * context)864 yy_reduce_print (YYSTYPE *yyvsp, int yyrule, Sdf_PathParserContext *context)
865 #else
866 static void
867 yy_reduce_print (yyvsp, yyrule, context)
868 YYSTYPE *yyvsp;
869 int yyrule;
870 Sdf_PathParserContext *context;
871 #endif
872 {
873 int yynrhs = yyr2[yyrule];
874 int yyi;
875 unsigned long int yylno = yyrline[yyrule];
876 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
877 yyrule - 1, yylno);
878 /* The symbols being reduced. */
879 for (yyi = 0; yyi < yynrhs; yyi++)
880 {
881 YYFPRINTF (stderr, " $%d = ", yyi + 1);
882 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
883 &(yyvsp[(yyi + 1) - (yynrhs)])
884 , context);
885 YYFPRINTF (stderr, "\n");
886 }
887 }
888
889 # define YY_REDUCE_PRINT(Rule) \
890 do { \
891 if (yydebug) \
892 yy_reduce_print (yyvsp, Rule, context); \
893 } while (YYID (0))
894
895 /* Nonzero means print parse trace. It is left uninitialized so that
896 multiple parsers can coexist. */
897 int yydebug;
898 #else /* !YYDEBUG */
899 # define YYDPRINTF(Args)
900 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
901 # define YY_STACK_PRINT(Bottom, Top)
902 # define YY_REDUCE_PRINT(Rule)
903 #endif /* !YYDEBUG */
904
905
906 /* YYINITDEPTH -- initial size of the parser's stacks. */
907 #ifndef YYINITDEPTH
908 # define YYINITDEPTH 200
909 #endif
910
911 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
912 if the built-in stack extension method is used).
913
914 Do not make this value too large; the results are undefined if
915 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
916 evaluated with infinite-precision integer arithmetic. */
917
918 #ifndef YYMAXDEPTH
919 # define YYMAXDEPTH 10000
920 #endif
921
922
923
924 #if YYERROR_VERBOSE
925
926 # ifndef yystrlen
927 # if defined __GLIBC__ && defined _STRING_H
928 # define yystrlen strlen
929 # else
930 /* Return the length of YYSTR. */
931 #if (defined __STDC__ || defined __C99__FUNC__ \
932 || defined __cplusplus || defined _MSC_VER)
933 static YYSIZE_T
yystrlen(const char * yystr)934 yystrlen (const char *yystr)
935 #else
936 static YYSIZE_T
937 yystrlen (yystr)
938 const char *yystr;
939 #endif
940 {
941 YYSIZE_T yylen;
942 for (yylen = 0; yystr[yylen]; yylen++)
943 continue;
944 return yylen;
945 }
946 # endif
947 # endif
948
949 # ifndef yystpcpy
950 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
951 # define yystpcpy stpcpy
952 # else
953 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
954 YYDEST. */
955 #if (defined __STDC__ || defined __C99__FUNC__ \
956 || defined __cplusplus || defined _MSC_VER)
957 static char *
yystpcpy(char * yydest,const char * yysrc)958 yystpcpy (char *yydest, const char *yysrc)
959 #else
960 static char *
961 yystpcpy (yydest, yysrc)
962 char *yydest;
963 const char *yysrc;
964 #endif
965 {
966 char *yyd = yydest;
967 const char *yys = yysrc;
968
969 while ((*yyd++ = *yys++) != '\0')
970 continue;
971
972 return yyd - 1;
973 }
974 # endif
975 # endif
976
977 # ifndef yytnamerr
978 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
979 quotes and backslashes, so that it's suitable for yyerror. The
980 heuristic is that double-quoting is unnecessary unless the string
981 contains an apostrophe, a comma, or backslash (other than
982 backslash-backslash). YYSTR is taken from yytname. If YYRES is
983 null, do not copy; instead, return the length of what the result
984 would have been. */
985 static YYSIZE_T
yytnamerr(char * yyres,const char * yystr)986 yytnamerr (char *yyres, const char *yystr)
987 {
988 if (*yystr == '"')
989 {
990 YYSIZE_T yyn = 0;
991 char const *yyp = yystr;
992
993 for (;;)
994 switch (*++yyp)
995 {
996 case '\'':
997 case ',':
998 goto do_not_strip_quotes;
999
1000 case '\\':
1001 if (*++yyp != '\\')
1002 goto do_not_strip_quotes;
1003 /* Fall through. */
1004 default:
1005 if (yyres)
1006 yyres[yyn] = *yyp;
1007 yyn++;
1008 break;
1009
1010 case '"':
1011 if (yyres)
1012 yyres[yyn] = '\0';
1013 return yyn;
1014 }
1015 do_not_strip_quotes: ;
1016 }
1017
1018 if (! yyres)
1019 return yystrlen (yystr);
1020
1021 return yystpcpy (yyres, yystr) - yyres;
1022 }
1023 # endif
1024
1025 /* Copy into YYRESULT an error message about the unexpected token
1026 YYCHAR while in state YYSTATE. Return the number of bytes copied,
1027 including the terminating null byte. If YYRESULT is null, do not
1028 copy anything; just return the number of bytes that would be
1029 copied. As a special case, return 0 if an ordinary "syntax error"
1030 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
1031 size calculation. */
1032 static YYSIZE_T
yysyntax_error(char * yyresult,int yystate,int yychar)1033 yysyntax_error (char *yyresult, int yystate, int yychar)
1034 {
1035 int yyn = yypact[yystate];
1036
1037 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
1038 return 0;
1039 else
1040 {
1041 int yytype = YYTRANSLATE (yychar);
1042 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1043 YYSIZE_T yysize = yysize0;
1044 YYSIZE_T yysize1;
1045 int yysize_overflow = 0;
1046 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1047 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1048 int yyx;
1049
1050 # if 0
1051 /* This is so xgettext sees the translatable formats that are
1052 constructed on the fly. */
1053 YY_("syntax error, unexpected %s");
1054 YY_("syntax error, unexpected %s, expecting %s");
1055 YY_("syntax error, unexpected %s, expecting %s or %s");
1056 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1057 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1058 # endif
1059 char *yyfmt;
1060 char const *yyf;
1061 static char const yyunexpected[] = "syntax error, unexpected %s";
1062 static char const yyexpecting[] = ", expecting %s";
1063 static char const yyor[] = " or %s";
1064 char yyformat[sizeof yyunexpected
1065 + sizeof yyexpecting - 1
1066 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1067 * (sizeof yyor - 1))];
1068 char const *yyprefix = yyexpecting;
1069
1070 /* Start YYX at -YYN if negative to avoid negative indexes in
1071 YYCHECK. */
1072 int yyxbegin = yyn < 0 ? -yyn : 0;
1073
1074 /* Stay within bounds of both yycheck and yytname. */
1075 int yychecklim = YYLAST - yyn + 1;
1076 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1077 int yycount = 1;
1078
1079 yyarg[0] = yytname[yytype];
1080 yyfmt = yystpcpy (yyformat, yyunexpected);
1081
1082 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1083 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1084 {
1085 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1086 {
1087 yycount = 1;
1088 yysize = yysize0;
1089 yyformat[sizeof yyunexpected - 1] = '\0';
1090 break;
1091 }
1092 yyarg[yycount++] = yytname[yyx];
1093 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1094 yysize_overflow |= (yysize1 < yysize);
1095 yysize = yysize1;
1096 yyfmt = yystpcpy (yyfmt, yyprefix);
1097 yyprefix = yyor;
1098 }
1099
1100 yyf = YY_(yyformat);
1101 yysize1 = yysize + yystrlen (yyf);
1102 yysize_overflow |= (yysize1 < yysize);
1103 yysize = yysize1;
1104
1105 if (yysize_overflow)
1106 return YYSIZE_MAXIMUM;
1107
1108 if (yyresult)
1109 {
1110 /* Avoid sprintf, as that infringes on the user's name space.
1111 Don't have undefined behavior even if the translation
1112 produced a string with the wrong number of "%s"s. */
1113 char *yyp = yyresult;
1114 int yyi = 0;
1115 while ((*yyp = *yyf) != '\0')
1116 {
1117 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1118 {
1119 yyp += yytnamerr (yyp, yyarg[yyi++]);
1120 yyf += 2;
1121 }
1122 else
1123 {
1124 yyp++;
1125 yyf++;
1126 }
1127 }
1128 }
1129 return yysize;
1130 }
1131 }
1132 #endif /* YYERROR_VERBOSE */
1133
1134
1135 /*-----------------------------------------------.
1136 | Release the memory associated to this symbol. |
1137 `-----------------------------------------------*/
1138
1139 /*ARGSUSED*/
1140 #if (defined __STDC__ || defined __C99__FUNC__ \
1141 || defined __cplusplus || defined _MSC_VER)
1142 static void
yydestruct(const char * yymsg,int yytype,YYSTYPE * yyvaluep,Sdf_PathParserContext * context)1143 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, Sdf_PathParserContext *context)
1144 #else
1145 static void
1146 yydestruct (yymsg, yytype, yyvaluep, context)
1147 const char *yymsg;
1148 int yytype;
1149 YYSTYPE *yyvaluep;
1150 Sdf_PathParserContext *context;
1151 #endif
1152 {
1153 YYUSE (yyvaluep);
1154 YYUSE (context);
1155
1156 if (!yymsg)
1157 yymsg = "Deleting";
1158 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1159
1160 switch (yytype)
1161 {
1162
1163 default:
1164 break;
1165 }
1166 }
1167
1168 /* Prevent warnings from -Wmissing-prototypes. */
1169 #ifdef YYPARSE_PARAM
1170 #if defined __STDC__ || defined __cplusplus
1171 int yyparse (void *YYPARSE_PARAM);
1172 #else
1173 int yyparse ();
1174 #endif
1175 #else /* ! YYPARSE_PARAM */
1176 #if defined __STDC__ || defined __cplusplus
1177 int yyparse (Sdf_PathParserContext *context);
1178 #else
1179 int yyparse ();
1180 #endif
1181 #endif /* ! YYPARSE_PARAM */
1182
1183
1184
1185
1186
1187 /*-------------------------.
1188 | yyparse or yypush_parse. |
1189 `-------------------------*/
1190
1191 #ifdef YYPARSE_PARAM
1192 #if (defined __STDC__ || defined __C99__FUNC__ \
1193 || defined __cplusplus || defined _MSC_VER)
1194 int
yyparse(void * YYPARSE_PARAM)1195 yyparse (void *YYPARSE_PARAM)
1196 #else
1197 int
1198 yyparse (YYPARSE_PARAM)
1199 void *YYPARSE_PARAM;
1200 #endif
1201 #else /* ! YYPARSE_PARAM */
1202 #if (defined __STDC__ || defined __C99__FUNC__ \
1203 || defined __cplusplus || defined _MSC_VER)
1204 int
1205 yyparse (Sdf_PathParserContext *context)
1206 #else
1207 int
1208 yyparse (context)
1209 Sdf_PathParserContext *context;
1210 #endif
1211 #endif
1212 {
1213 /* The lookahead symbol. */
1214 int yychar;
1215
1216 /* The semantic value of the lookahead symbol. */
1217 YYSTYPE yylval;
1218
1219 /* Number of syntax errors so far. */
1220 int yynerrs;
1221
1222 int yystate;
1223 /* Number of tokens to shift before error messages enabled. */
1224 int yyerrstatus;
1225
1226 /* The stacks and their tools:
1227 `yyss': related to states.
1228 `yyvs': related to semantic values.
1229
1230 Refer to the stacks thru separate pointers, to allow yyoverflow
1231 to reallocate them elsewhere. */
1232
1233 /* The state stack. */
1234 yytype_int16 yyssa[YYINITDEPTH];
1235 yytype_int16 *yyss;
1236 yytype_int16 *yyssp;
1237
1238 /* The semantic value stack. */
1239 YYSTYPE yyvsa[YYINITDEPTH];
1240 YYSTYPE *yyvs;
1241 YYSTYPE *yyvsp;
1242
1243 YYSIZE_T yystacksize;
1244
1245 int yyn;
1246 int yyresult;
1247 /* Lookahead token as an internal (translated) token number. */
1248 int yytoken;
1249 /* The variables used to return semantic value and location from the
1250 action routines. */
1251 YYSTYPE yyval;
1252
1253 #if YYERROR_VERBOSE
1254 /* Buffer for error messages, and its allocated size. */
1255 char yymsgbuf[128];
1256 char *yymsg = yymsgbuf;
1257 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1258 #endif
1259
1260 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1261
1262 /* The number of symbols on the RHS of the reduced rule.
1263 Keep to zero when no symbol should be popped. */
1264 int yylen = 0;
1265
1266 yytoken = 0;
1267 yyss = yyssa;
1268 yyvs = yyvsa;
1269 yystacksize = YYINITDEPTH;
1270
1271 YYDPRINTF ((stderr, "Starting parse\n"));
1272
1273 yystate = 0;
1274 yyerrstatus = 0;
1275 yynerrs = 0;
1276 yychar = YYEMPTY; /* Cause a token to be read. */
1277
1278 /* Initialize stack pointers.
1279 Waste one element of value and location stack
1280 so that they stay on the same level as the state stack.
1281 The wasted elements are never initialized. */
1282 yyssp = yyss;
1283 yyvsp = yyvs;
1284
1285 goto yysetstate;
1286
1287 /*------------------------------------------------------------.
1288 | yynewstate -- Push a new state, which is found in yystate. |
1289 `------------------------------------------------------------*/
1290 yynewstate:
1291 /* In all cases, when you get here, the value and location stacks
1292 have just been pushed. So pushing a state here evens the stacks. */
1293 yyssp++;
1294
1295 yysetstate:
1296 *yyssp = yystate;
1297
1298 if (yyss + yystacksize - 1 <= yyssp)
1299 {
1300 /* Get the current used size of the three stacks, in elements. */
1301 YYSIZE_T yysize = yyssp - yyss + 1;
1302
1303 #ifdef yyoverflow
1304 {
1305 /* Give user a chance to reallocate the stack. Use copies of
1306 these so that the &'s don't force the real ones into
1307 memory. */
1308 YYSTYPE *yyvs1 = yyvs;
1309 yytype_int16 *yyss1 = yyss;
1310
1311 /* Each stack pointer address is followed by the size of the
1312 data in use in that stack, in bytes. This used to be a
1313 conditional around just the two extra args, but that might
1314 be undefined if yyoverflow is a macro. */
1315 yyoverflow (YY_("memory exhausted"),
1316 &yyss1, yysize * sizeof (*yyssp),
1317 &yyvs1, yysize * sizeof (*yyvsp),
1318 &yystacksize);
1319
1320 yyss = yyss1;
1321 yyvs = yyvs1;
1322 }
1323 #else /* no yyoverflow */
1324 # ifndef YYSTACK_RELOCATE
1325 goto yyexhaustedlab;
1326 # else
1327 /* Extend the stack our own way. */
1328 if (YYMAXDEPTH <= yystacksize)
1329 goto yyexhaustedlab;
1330 yystacksize *= 2;
1331 if (YYMAXDEPTH < yystacksize)
1332 yystacksize = YYMAXDEPTH;
1333
1334 {
1335 yytype_int16 *yyss1 = yyss;
1336 union yyalloc *yyptr =
1337 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1338 if (! yyptr)
1339 goto yyexhaustedlab;
1340 YYSTACK_RELOCATE (yyss_alloc, yyss);
1341 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1342 # undef YYSTACK_RELOCATE
1343 if (yyss1 != yyssa)
1344 YYSTACK_FREE (yyss1);
1345 }
1346 # endif
1347 #endif /* no yyoverflow */
1348
1349 yyssp = yyss + yysize - 1;
1350 yyvsp = yyvs + yysize - 1;
1351
1352 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1353 (unsigned long int) yystacksize));
1354
1355 if (yyss + yystacksize - 1 <= yyssp)
1356 YYABORT;
1357 }
1358
1359 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1360
1361 if (yystate == YYFINAL)
1362 YYACCEPT;
1363
1364 goto yybackup;
1365
1366 /*-----------.
1367 | yybackup. |
1368 `-----------*/
1369 yybackup:
1370
1371 /* Do appropriate processing given the current state. Read a
1372 lookahead token if we need one and don't already have one. */
1373
1374 /* First try to decide what to do without reference to lookahead token. */
1375 yyn = yypact[yystate];
1376 if (yyn == YYPACT_NINF)
1377 goto yydefault;
1378
1379 /* Not known => get a lookahead token if don't already have one. */
1380
1381 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1382 if (yychar == YYEMPTY)
1383 {
1384 YYDPRINTF ((stderr, "Reading a token: "));
1385 yychar = YYLEX;
1386 }
1387
1388 if (yychar <= YYEOF)
1389 {
1390 yychar = yytoken = YYEOF;
1391 YYDPRINTF ((stderr, "Now at end of input.\n"));
1392 }
1393 else
1394 {
1395 yytoken = YYTRANSLATE (yychar);
1396 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1397 }
1398
1399 /* If the proper action on seeing token YYTOKEN is to reduce or to
1400 detect an error, take that action. */
1401 yyn += yytoken;
1402 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1403 goto yydefault;
1404 yyn = yytable[yyn];
1405 if (yyn <= 0)
1406 {
1407 if (yyn == 0 || yyn == YYTABLE_NINF)
1408 goto yyerrlab;
1409 yyn = -yyn;
1410 goto yyreduce;
1411 }
1412
1413 /* Count tokens shifted since error; after three, turn off error
1414 status. */
1415 if (yyerrstatus)
1416 yyerrstatus--;
1417
1418 /* Shift the lookahead token. */
1419 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1420
1421 /* Discard the shifted token. */
1422 yychar = YYEMPTY;
1423
1424 yystate = yyn;
1425 *++yyvsp = yylval;
1426
1427 goto yynewstate;
1428
1429
1430 /*-----------------------------------------------------------.
1431 | yydefault -- do the default action for the current state. |
1432 `-----------------------------------------------------------*/
1433 yydefault:
1434 yyn = yydefact[yystate];
1435 if (yyn == 0)
1436 goto yyerrlab;
1437 goto yyreduce;
1438
1439
1440 /*-----------------------------.
1441 | yyreduce -- Do a reduction. |
1442 `-----------------------------*/
1443 yyreduce:
1444 /* yyn is the number of a rule to reduce with. */
1445 yylen = yyr2[yyn];
1446
1447 /* If YYLEN is nonzero, implement the default value of the action:
1448 `$$ = $1'.
1449
1450 Otherwise, the following line sets YYVAL to garbage.
1451 This behavior is undocumented and Bison
1452 users should not rely upon it. Assigning to YYVAL
1453 unconditionally makes the parser a bit smaller, and it avoids a
1454 GCC warning that YYVAL may be used uninitialized. */
1455 yyval = yyvsp[1-yylen];
1456
1457
1458 YY_REDUCE_PRINT (yyn);
1459 switch (yyn)
1460 {
1461 case 2:
1462
1463 /* Line 1455 of yacc.c */
1464 #line 69 "pxr/usd/sdf/path.yy"
1465 {
1466 swap(context->path, (yyvsp[(1) - (1)]).path);
1467 ;}
1468 break;
1469
1470 case 9:
1471
1472 /* Line 1455 of yacc.c */
1473 #line 92 "pxr/usd/sdf/path.yy"
1474 {
1475 (yyval).path = SdfPath::ReflexiveRelativePath();
1476 ;}
1477 break;
1478
1479 case 10:
1480
1481 /* Line 1455 of yacc.c */
1482 #line 95 "pxr/usd/sdf/path.yy"
1483 {
1484 (yyval).path = SdfPath::AbsoluteRootPath();
1485 ;}
1486 break;
1487
1488 case 14:
1489
1490 /* Line 1455 of yacc.c */
1491 #line 104 "pxr/usd/sdf/path.yy"
1492 {
1493 (yyval).path = SdfPath::ReflexiveRelativePath().GetParentPath();
1494 ;}
1495 break;
1496
1497 case 15:
1498
1499 /* Line 1455 of yacc.c */
1500 #line 107 "pxr/usd/sdf/path.yy"
1501 {
1502 (yyval).path = ((yyvsp[(1) - (3)])).path.GetParentPath();
1503 ;}
1504 break;
1505
1506 case 18:
1507
1508 /* Line 1455 of yacc.c */
1509 #line 118 "pxr/usd/sdf/path.yy"
1510 {
1511 (yyval).path = SdfPath::ReflexiveRelativePath().AppendChild(((yyvsp[(1) - (1)])).token);
1512 ;}
1513 break;
1514
1515 case 19:
1516
1517 /* Line 1455 of yacc.c */
1518 #line 121 "pxr/usd/sdf/path.yy"
1519 {
1520 (yyval).path = SdfPath::AbsoluteRootPath().AppendChild(((yyvsp[(2) - (2)])).token);
1521 ;}
1522 break;
1523
1524 case 20:
1525
1526 /* Line 1455 of yacc.c */
1527 #line 124 "pxr/usd/sdf/path.yy"
1528 {
1529 (yyval).path = ((yyvsp[(1) - (3)])).path.AppendChild(((yyvsp[(3) - (3)])).token);
1530 ;}
1531 break;
1532
1533 case 21:
1534
1535 /* Line 1455 of yacc.c */
1536 #line 127 "pxr/usd/sdf/path.yy"
1537 {
1538 (yyval).path = ((yyvsp[(1) - (3)])).path.AppendChild(((yyvsp[(3) - (3)])).token);
1539 ;}
1540 break;
1541
1542 case 22:
1543
1544 /* Line 1455 of yacc.c */
1545 #line 130 "pxr/usd/sdf/path.yy"
1546 {
1547 (yyval).path = ((yyvsp[(1) - (2)])).path.AppendChild(((yyvsp[(2) - (2)])).token);
1548 ;}
1549 break;
1550
1551 case 23:
1552
1553 /* Line 1455 of yacc.c */
1554 #line 136 "pxr/usd/sdf/path.yy"
1555 {
1556 context->variantSelectionStack.push_back(Sdf_PathVariantSelections());
1557 ;}
1558 break;
1559
1560 case 24:
1561
1562 /* Line 1455 of yacc.c */
1563 #line 139 "pxr/usd/sdf/path.yy"
1564 {
1565 SdfPath newPath = (yyvsp[(1) - (5)]).path;
1566 const Sdf_PathVariantSelections& selections =
1567 context->variantSelectionStack.back();
1568 for (size_t i = 0, n = selections.size(); i != n; ++i) {
1569 newPath = newPath.AppendVariantSelection(selections[i].first,
1570 selections[i].second);
1571 }
1572 context->variantSelectionStack.pop_back();
1573 (yyval).path = std::move(newPath);
1574 ;}
1575 break;
1576
1577 case 27:
1578
1579 /* Line 1455 of yacc.c */
1580 #line 159 "pxr/usd/sdf/path.yy"
1581 {
1582 context->variantSelectionStack.back().push_back(
1583 std::make_pair( (yyvsp[(3) - (8)]).token, (yyvsp[(7) - (8)]).token ) );
1584 ;}
1585 break;
1586
1587 case 30:
1588
1589 /* Line 1455 of yacc.c */
1590 #line 171 "pxr/usd/sdf/path.yy"
1591 {
1592 (yyval).token = TfToken();
1593 ;}
1594 break;
1595
1596 case 31:
1597
1598 /* Line 1455 of yacc.c */
1599 #line 174 "pxr/usd/sdf/path.yy"
1600 {
1601 (yyval).token = (yyvsp[(1) - (2)]).token;
1602 ;}
1603 break;
1604
1605 case 34:
1606
1607 /* Line 1455 of yacc.c */
1608 #line 182 "pxr/usd/sdf/path.yy"
1609 {
1610 (yyval).token = TfToken('.' + (yyvsp[(2) - (2)]).token.GetString());
1611 ;}
1612 break;
1613
1614 case 35:
1615
1616 /* Line 1455 of yacc.c */
1617 #line 185 "pxr/usd/sdf/path.yy"
1618 {
1619 (yyval).token = TfToken('.' + (yyvsp[(2) - (2)]).token.GetString());
1620 ;}
1621 break;
1622
1623 case 43:
1624
1625 /* Line 1455 of yacc.c */
1626 #line 201 "pxr/usd/sdf/path.yy"
1627 {
1628 (yyval).path = SdfPath::ReflexiveRelativePath().AppendProperty((yyvsp[(2) - (2)]).token);
1629 ;}
1630 break;
1631
1632 case 44:
1633
1634 /* Line 1455 of yacc.c */
1635 #line 204 "pxr/usd/sdf/path.yy"
1636 {
1637 (yyval).path = (yyvsp[(1) - (3)]).path.AppendProperty((yyvsp[(3) - (3)]).token);
1638 ;}
1639 break;
1640
1641 case 45:
1642
1643 /* Line 1455 of yacc.c */
1644 #line 207 "pxr/usd/sdf/path.yy"
1645 {
1646 (yyval).path = (yyvsp[(1) - (4)]).path.AppendProperty((yyvsp[(4) - (4)]).token);
1647 ;}
1648 break;
1649
1650 case 46:
1651
1652 /* Line 1455 of yacc.c */
1653 #line 210 "pxr/usd/sdf/path.yy"
1654 {
1655 yyerror(context, "expected property name after '.'");
1656 YYABORT;
1657 ;}
1658 break;
1659
1660 case 47:
1661
1662 /* Line 1455 of yacc.c */
1663 #line 217 "pxr/usd/sdf/path.yy"
1664 {
1665 (yyval).path = (yyvsp[(1) - (4)]).path.AppendTarget((yyvsp[(3) - (4)]).path);
1666 ;}
1667 break;
1668
1669 case 48:
1670
1671 /* Line 1455 of yacc.c */
1672 #line 220 "pxr/usd/sdf/path.yy"
1673 {
1674 yyerror(context, "expected a path within [ ]");
1675 YYABORT;
1676 ;}
1677 break;
1678
1679 case 49:
1680
1681 /* Line 1455 of yacc.c */
1682 #line 227 "pxr/usd/sdf/path.yy"
1683 {
1684 // The grammar does not know if the target path is already on
1685 // a relational attribute (ie is the connection target of a rel attr)
1686 // but SdfPath will detect this and return invalid path.
1687 // So we check for that here and make an error explicitly in that
1688 // case.
1689 (yyval).path = (yyvsp[(1) - (3)]).path.AppendRelationalAttribute((yyvsp[(3) - (3)]).token);
1690 ;}
1691 break;
1692
1693 case 50:
1694
1695 /* Line 1455 of yacc.c */
1696 #line 235 "pxr/usd/sdf/path.yy"
1697 {
1698 yyerror(context, "expected a property for relationship target");
1699 YYABORT;
1700 ;}
1701 break;
1702
1703 case 51:
1704
1705 /* Line 1455 of yacc.c */
1706 #line 242 "pxr/usd/sdf/path.yy"
1707 {
1708 (yyval).path = (yyvsp[(1) - (4)]).path.AppendTarget((yyvsp[(3) - (4)]).path);
1709 ;}
1710 break;
1711
1712 case 52:
1713
1714 /* Line 1455 of yacc.c */
1715 #line 245 "pxr/usd/sdf/path.yy"
1716 {
1717 yyerror(context, "expected a path within [ ]");
1718 YYABORT;
1719 ;}
1720 break;
1721
1722 case 53:
1723
1724 /* Line 1455 of yacc.c */
1725 #line 252 "pxr/usd/sdf/path.yy"
1726 {
1727 (yyval).path = (yyvsp[(1) - (6)]).path.AppendMapper((yyvsp[(5) - (6)]).path);
1728 ;}
1729 break;
1730
1731 case 54:
1732
1733 /* Line 1455 of yacc.c */
1734 #line 255 "pxr/usd/sdf/path.yy"
1735 {
1736 (yyval).path = (yyvsp[(1) - (6)]).path.AppendMapper((yyvsp[(5) - (6)]).path);
1737 ;}
1738 break;
1739
1740 case 55:
1741
1742 /* Line 1455 of yacc.c */
1743 #line 261 "pxr/usd/sdf/path.yy"
1744 {
1745 (yyval).path = (yyvsp[(1) - (3)]).path.AppendMapperArg((yyvsp[(3) - (3)]).token);
1746 ;}
1747 break;
1748
1749 case 56:
1750
1751 /* Line 1455 of yacc.c */
1752 #line 267 "pxr/usd/sdf/path.yy"
1753 {
1754 (yyval).path = (yyvsp[(1) - (3)]).path.AppendExpression();
1755 ;}
1756 break;
1757
1758 case 57:
1759
1760 /* Line 1455 of yacc.c */
1761 #line 270 "pxr/usd/sdf/path.yy"
1762 {
1763 (yyval).path = (yyvsp[(1) - (3)]).path.AppendExpression();
1764 ;}
1765 break;
1766
1767
1768
1769 /* Line 1455 of yacc.c */
1770 #line 1748 "pxr/usd/sdf/path.tab.cpp"
1771 default: break;
1772 }
1773 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1774
1775 YYPOPSTACK (yylen);
1776 yylen = 0;
1777 YY_STACK_PRINT (yyss, yyssp);
1778
1779 *++yyvsp = yyval;
1780
1781 /* Now `shift' the result of the reduction. Determine what state
1782 that goes to, based on the state we popped back to and the rule
1783 number reduced by. */
1784
1785 yyn = yyr1[yyn];
1786
1787 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1788 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1789 yystate = yytable[yystate];
1790 else
1791 yystate = yydefgoto[yyn - YYNTOKENS];
1792
1793 goto yynewstate;
1794
1795
1796 /*------------------------------------.
1797 | yyerrlab -- here on detecting error |
1798 `------------------------------------*/
1799 yyerrlab:
1800 /* If not already recovering from an error, report this error. */
1801 if (!yyerrstatus)
1802 {
1803 ++yynerrs;
1804 #if ! YYERROR_VERBOSE
1805 yyerror (context, YY_("syntax error"));
1806 #else
1807 {
1808 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
1809 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
1810 {
1811 YYSIZE_T yyalloc = 2 * yysize;
1812 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
1813 yyalloc = YYSTACK_ALLOC_MAXIMUM;
1814 if (yymsg != yymsgbuf)
1815 YYSTACK_FREE (yymsg);
1816 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
1817 if (yymsg)
1818 yymsg_alloc = yyalloc;
1819 else
1820 {
1821 yymsg = yymsgbuf;
1822 yymsg_alloc = sizeof yymsgbuf;
1823 }
1824 }
1825
1826 if (0 < yysize && yysize <= yymsg_alloc)
1827 {
1828 (void) yysyntax_error (yymsg, yystate, yychar);
1829 yyerror (context, yymsg);
1830 }
1831 else
1832 {
1833 yyerror (context, YY_("syntax error"));
1834 if (yysize != 0)
1835 goto yyexhaustedlab;
1836 }
1837 }
1838 #endif
1839 }
1840
1841
1842
1843 if (yyerrstatus == 3)
1844 {
1845 /* If just tried and failed to reuse lookahead token after an
1846 error, discard it. */
1847
1848 if (yychar <= YYEOF)
1849 {
1850 /* Return failure if at end of input. */
1851 if (yychar == YYEOF)
1852 YYABORT;
1853 }
1854 else
1855 {
1856 yydestruct ("Error: discarding",
1857 yytoken, &yylval, context);
1858 yychar = YYEMPTY;
1859 }
1860 }
1861
1862 /* Else will try to reuse lookahead token after shifting the error
1863 token. */
1864 goto yyerrlab1;
1865
1866
1867 /*---------------------------------------------------.
1868 | yyerrorlab -- error raised explicitly by YYERROR. |
1869 `---------------------------------------------------*/
1870 yyerrorlab:
1871
1872 /* Pacify compilers like GCC when the user code never invokes
1873 YYERROR and the label yyerrorlab therefore never appears in user
1874 code. */
1875 if (/*CONSTCOND*/ 0)
1876 goto yyerrorlab;
1877
1878 /* Do not reclaim the symbols of the rule which action triggered
1879 this YYERROR. */
1880 YYPOPSTACK (yylen);
1881 yylen = 0;
1882 YY_STACK_PRINT (yyss, yyssp);
1883 yystate = *yyssp;
1884 goto yyerrlab1;
1885
1886
1887 /*-------------------------------------------------------------.
1888 | yyerrlab1 -- common code for both syntax error and YYERROR. |
1889 `-------------------------------------------------------------*/
1890 yyerrlab1:
1891 yyerrstatus = 3; /* Each real token shifted decrements this. */
1892
1893 for (;;)
1894 {
1895 yyn = yypact[yystate];
1896 if (yyn != YYPACT_NINF)
1897 {
1898 yyn += YYTERROR;
1899 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1900 {
1901 yyn = yytable[yyn];
1902 if (0 < yyn)
1903 break;
1904 }
1905 }
1906
1907 /* Pop the current state because it cannot handle the error token. */
1908 if (yyssp == yyss)
1909 YYABORT;
1910
1911
1912 yydestruct ("Error: popping",
1913 yystos[yystate], yyvsp, context);
1914 YYPOPSTACK (1);
1915 yystate = *yyssp;
1916 YY_STACK_PRINT (yyss, yyssp);
1917 }
1918
1919 *++yyvsp = yylval;
1920
1921
1922 /* Shift the error token. */
1923 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
1924
1925 yystate = yyn;
1926 goto yynewstate;
1927
1928
1929 /*-------------------------------------.
1930 | yyacceptlab -- YYACCEPT comes here. |
1931 `-------------------------------------*/
1932 yyacceptlab:
1933 yyresult = 0;
1934 goto yyreturn;
1935
1936 /*-----------------------------------.
1937 | yyabortlab -- YYABORT comes here. |
1938 `-----------------------------------*/
1939 yyabortlab:
1940 yyresult = 1;
1941 goto yyreturn;
1942
1943 #if !defined(yyoverflow) || YYERROR_VERBOSE
1944 /*-------------------------------------------------.
1945 | yyexhaustedlab -- memory exhaustion comes here. |
1946 `-------------------------------------------------*/
1947 yyexhaustedlab:
1948 yyerror (context, YY_("memory exhausted"));
1949 yyresult = 2;
1950 /* Fall through. */
1951 #endif
1952
1953 yyreturn:
1954 if (yychar != YYEMPTY)
1955 yydestruct ("Cleanup: discarding lookahead",
1956 yytoken, &yylval, context);
1957 /* Do not reclaim the symbols of the rule which action triggered
1958 this YYABORT or YYACCEPT. */
1959 YYPOPSTACK (yylen);
1960 YY_STACK_PRINT (yyss, yyssp);
1961 while (yyssp != yyss)
1962 {
1963 yydestruct ("Cleanup: popping",
1964 yystos[*yyssp], yyvsp, context);
1965 YYPOPSTACK (1);
1966 }
1967 #ifndef yyoverflow
1968 if (yyss != yyssa)
1969 YYSTACK_FREE (yyss);
1970 #endif
1971 #if YYERROR_VERBOSE
1972 if (yymsg != yymsgbuf)
1973 YYSTACK_FREE (yymsg);
1974 #endif
1975 /* Make sure YYID is used. */
1976 return YYID (yyresult);
1977 }
1978
1979
1980
1981 /* Line 1675 of yacc.c */
1982 #line 280 "pxr/usd/sdf/path.yy"
1983
1984
1985 static void
pathYyerror(Sdf_PathParserContext * context,const char * msg)1986 pathYyerror(Sdf_PathParserContext *context, const char *msg)
1987 {
1988 TF_AXIOM(context);
1989 context->path = SdfPath();
1990 TF_AXIOM(msg);
1991 context->errStr = msg;
1992 context->variantSelectionStack.clear();
1993 }
1994
1995
1996