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 #line 3 "<stdout>"
26 
27 #define  YY_INT_ALIGNED short int
28 
29 /* A lexical scanner generated by flex */
30 
31 #define FLEX_SCANNER
32 #define YY_FLEX_MAJOR_VERSION 2
33 #define YY_FLEX_MINOR_VERSION 5
34 #define YY_FLEX_SUBMINOR_VERSION 39
35 #if YY_FLEX_SUBMINOR_VERSION > 0
36 #define FLEX_BETA
37 #endif
38 
39 /* First, we deal with  platform-specific or compiler-specific issues. */
40 
41 /* begin standard C headers. */
42 #include <stdio.h>
43 #include <string.h>
44 #include <errno.h>
45 #include <stdlib.h>
46 
47 /* end standard C headers. */
48 
49 /* flex integer type definitions */
50 
51 #ifndef FLEXINT_H
52 #define FLEXINT_H
53 
54 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
55 
56 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
57 
58 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
59  * if you want the limit (max/min) macros for int types.
60  */
61 #ifndef __STDC_LIMIT_MACROS
62 #define __STDC_LIMIT_MACROS 1
63 #endif
64 
65 #include <inttypes.h>
66 typedef int8_t flex_int8_t;
67 typedef uint8_t flex_uint8_t;
68 typedef int16_t flex_int16_t;
69 typedef uint16_t flex_uint16_t;
70 typedef int32_t flex_int32_t;
71 typedef uint32_t flex_uint32_t;
72 #else
73 typedef signed char flex_int8_t;
74 typedef short int flex_int16_t;
75 typedef int flex_int32_t;
76 typedef unsigned char flex_uint8_t;
77 typedef unsigned short int flex_uint16_t;
78 typedef unsigned int flex_uint32_t;
79 
80 /* Limits of integral types. */
81 #ifndef INT8_MIN
82 #define INT8_MIN               (-128)
83 #endif
84 #ifndef INT16_MIN
85 #define INT16_MIN              (-32767-1)
86 #endif
87 #ifndef INT32_MIN
88 #define INT32_MIN              (-2147483647-1)
89 #endif
90 #ifndef INT8_MAX
91 #define INT8_MAX               (127)
92 #endif
93 #ifndef INT16_MAX
94 #define INT16_MAX              (32767)
95 #endif
96 #ifndef INT32_MAX
97 #define INT32_MAX              (2147483647)
98 #endif
99 #ifndef UINT8_MAX
100 #define UINT8_MAX              (255U)
101 #endif
102 #ifndef UINT16_MAX
103 #define UINT16_MAX             (65535U)
104 #endif
105 #ifndef UINT32_MAX
106 #define UINT32_MAX             (4294967295U)
107 #endif
108 
109 #endif /* ! C99 */
110 
111 #endif /* ! FLEXINT_H */
112 
113 #ifdef __cplusplus
114 
115 /* The "const" storage-class-modifier is valid. */
116 #define YY_USE_CONST
117 
118 #else	/* ! __cplusplus */
119 
120 /* C99 requires __STDC__ to be defined as 1. */
121 #if defined (__STDC__)
122 
123 #define YY_USE_CONST
124 
125 #endif	/* defined (__STDC__) */
126 #endif	/* ! __cplusplus */
127 
128 #ifdef YY_USE_CONST
129 #define yyconst const
130 #else
131 #define yyconst
132 #endif
133 
134 /* Returned upon end-of-file. */
135 #define YY_NULL 0
136 
137 /* Promotes a possibly negative, possibly signed char to an unsigned
138  * integer for use as an array index.  If the signed char is negative,
139  * we want to instead treat it as an 8-bit unsigned char, hence the
140  * double cast.
141  */
142 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
143 
144 /* An opaque pointer. */
145 #ifndef YY_TYPEDEF_YY_SCANNER_T
146 #define YY_TYPEDEF_YY_SCANNER_T
147 typedef void* yyscan_t;
148 #endif
149 
150 /* For convenience, these vars (plus the bison vars far below)
151    are macros in the reentrant scanner. */
152 #define yyin yyg->yyin_r
153 #define yyout yyg->yyout_r
154 #define yyextra yyg->yyextra_r
155 #define yyleng yyg->yyleng_r
156 #define yytext yyg->yytext_r
157 #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
158 #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
159 #define yy_flex_debug yyg->yy_flex_debug_r
160 
161 /* Enter a start condition.  This macro really ought to take a parameter,
162  * but we do it the disgusting crufty way forced on us by the ()-less
163  * definition of BEGIN.
164  */
165 #define BEGIN yyg->yy_start = 1 + 2 *
166 
167 /* Translate the current start state into a value that can be later handed
168  * to BEGIN to return to the state.  The YYSTATE alias is for lex
169  * compatibility.
170  */
171 #define YY_START ((yyg->yy_start - 1) / 2)
172 #define YYSTATE YY_START
173 
174 /* Action number for EOF rule of a given start state. */
175 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
176 
177 /* Special action meaning "start processing a new file". */
178 #define YY_NEW_FILE pathYyrestart(yyin ,yyscanner )
179 
180 #define YY_END_OF_BUFFER_CHAR 0
181 
182 /* Size of default input buffer. */
183 #ifndef YY_BUF_SIZE
184 #define YY_BUF_SIZE 16384
185 #endif
186 
187 /* The state buf must be large enough to hold one state per character in the main buffer.
188  */
189 #define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
190 
191 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
192 #define YY_TYPEDEF_YY_BUFFER_STATE
193 typedef struct yy_buffer_state *YY_BUFFER_STATE;
194 #endif
195 
196 #ifndef YY_TYPEDEF_YY_SIZE_T
197 #define YY_TYPEDEF_YY_SIZE_T
198 typedef size_t yy_size_t;
199 #endif
200 
201 #define EOB_ACT_CONTINUE_SCAN 0
202 #define EOB_ACT_END_OF_FILE 1
203 #define EOB_ACT_LAST_MATCH 2
204 
205     #define YY_LESS_LINENO(n)
206     #define YY_LINENO_REWIND_TO(ptr)
207 
208 /* Return all but the first "n" matched characters back to the input stream. */
209 #define yyless(n) \
210 	do \
211 		{ \
212 		/* Undo effects of setting up yytext. */ \
213         int yyless_macro_arg = (n); \
214         YY_LESS_LINENO(yyless_macro_arg);\
215 		*yy_cp = yyg->yy_hold_char; \
216 		YY_RESTORE_YY_MORE_OFFSET \
217 		yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
218 		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
219 		} \
220 	while ( 0 )
221 
222 #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
223 
224 #ifndef YY_STRUCT_YY_BUFFER_STATE
225 #define YY_STRUCT_YY_BUFFER_STATE
226 struct yy_buffer_state
227 	{
228 	FILE *yy_input_file;
229 
230 	char *yy_ch_buf;		/* input buffer */
231 	char *yy_buf_pos;		/* current position in input buffer */
232 
233 	/* Size of input buffer in bytes, not including room for EOB
234 	 * characters.
235 	 */
236 	yy_size_t yy_buf_size;
237 
238 	/* Number of characters read into yy_ch_buf, not including EOB
239 	 * characters.
240 	 */
241 	yy_size_t yy_n_chars;
242 
243 	/* Whether we "own" the buffer - i.e., we know we created it,
244 	 * and can realloc() it to grow it, and should free() it to
245 	 * delete it.
246 	 */
247 	int yy_is_our_buffer;
248 
249 	/* Whether this is an "interactive" input source; if so, and
250 	 * if we're using stdio for input, then we want to use getc()
251 	 * instead of fread(), to make sure we stop fetching input after
252 	 * each newline.
253 	 */
254 	int yy_is_interactive;
255 
256 	/* Whether we're considered to be at the beginning of a line.
257 	 * If so, '^' rules will be active on the next match, otherwise
258 	 * not.
259 	 */
260 	int yy_at_bol;
261 
262     int yy_bs_lineno; /**< The line count. */
263     int yy_bs_column; /**< The column count. */
264 
265 	/* Whether to try to fill the input buffer when we reach the
266 	 * end of it.
267 	 */
268 	int yy_fill_buffer;
269 
270 	int yy_buffer_status;
271 
272 #define YY_BUFFER_NEW 0
273 #define YY_BUFFER_NORMAL 1
274 	/* When an EOF's been seen but there's still some text to process
275 	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
276 	 * shouldn't try reading from the input source any more.  We might
277 	 * still have a bunch of tokens to match, though, because of
278 	 * possible backing-up.
279 	 *
280 	 * When we actually see the EOF, we change the status to "new"
281 	 * (via pathYyrestart()), so that the user can continue scanning by
282 	 * just pointing yyin at a new input file.
283 	 */
284 #define YY_BUFFER_EOF_PENDING 2
285 
286 	};
287 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
288 
289 /* We provide macros for accessing buffer states in case in the
290  * future we want to put the buffer states in a more general
291  * "scanner state".
292  *
293  * Returns the top of the stack, or NULL.
294  */
295 #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
296                           ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
297                           : NULL)
298 
299 /* Same as previous macro, but useful when we know that the buffer stack is not
300  * NULL or when we need an lvalue. For internal use only.
301  */
302 #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
303 
304 void pathYyrestart (FILE *input_file ,yyscan_t yyscanner );
305 void pathYy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
306 YY_BUFFER_STATE pathYy_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
307 void pathYy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
308 void pathYy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
309 void pathYypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
310 void pathYypop_buffer_state (yyscan_t yyscanner );
311 
312 static void pathYyensure_buffer_stack (yyscan_t yyscanner );
313 static void pathYy_load_buffer_state (yyscan_t yyscanner );
314 static void pathYy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
315 
316 #define YY_FLUSH_BUFFER pathYy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
317 
318 YY_BUFFER_STATE pathYy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
319 YY_BUFFER_STATE pathYy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
320 YY_BUFFER_STATE pathYy_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
321 
322 void *pathYyalloc (yy_size_t ,yyscan_t yyscanner );
323 void *pathYyrealloc (void *,yy_size_t ,yyscan_t yyscanner );
324 void pathYyfree (void * ,yyscan_t yyscanner );
325 
326 #define yy_new_buffer pathYy_create_buffer
327 
328 #define yy_set_interactive(is_interactive) \
329 	{ \
330 	if ( ! YY_CURRENT_BUFFER ){ \
331         pathYyensure_buffer_stack (yyscanner); \
332 		YY_CURRENT_BUFFER_LVALUE =    \
333             pathYy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
334 	} \
335 	YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
336 	}
337 
338 #define yy_set_bol(at_bol) \
339 	{ \
340 	if ( ! YY_CURRENT_BUFFER ){\
341         pathYyensure_buffer_stack (yyscanner); \
342 		YY_CURRENT_BUFFER_LVALUE =    \
343             pathYy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
344 	} \
345 	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
346 	}
347 
348 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
349 
350 /* Begin user sect3 */
351 
352 #define pathYywrap(yyscanner) 1
353 #define YY_SKIP_YYWRAP
354 
355 typedef unsigned char YY_CHAR;
356 
357 typedef int yy_state_type;
358 
359 #define yytext_ptr yytext_r
360 
361 static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
362 static yy_state_type yy_try_NUL_trans (yy_state_type current_state  ,yyscan_t yyscanner);
363 static int yy_get_next_buffer (yyscan_t yyscanner );
364 static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
365 
366 /* Done after the current pattern has been matched and before the
367  * corresponding action - sets up yytext.
368  */
369 #define YY_DO_BEFORE_ACTION \
370 	yyg->yytext_ptr = yy_bp; \
371 	yyleng = (size_t) (yy_cp - yy_bp); \
372 	yyg->yy_hold_char = *yy_cp; \
373 	*yy_cp = '\0'; \
374 	yyg->yy_c_buf_p = yy_cp;
375 
376 #define YY_NUM_RULES 10
377 #define YY_END_OF_BUFFER 11
378 /* This struct is not used in this scanner,
379    but its presence is necessary. */
380 struct yy_trans_info
381 	{
382 	flex_int32_t yy_verify;
383 	flex_int32_t yy_nxt;
384 	};
385 static yyconst flex_int16_t yy_accept[43] =
386     {   0,
387         0,    0,   11,    9,    8,   10,    6,    9,    3,    3,
388         3,    3,    6,    8,    6,    6,    7,    5,    3,    0,
389         6,    5,    3,    3,    3,    6,    4,    6,    3,    3,
390         4,    3,    3,    3,    3,    3,    1,    3,    3,    3,
391         2,    0
392     } ;
393 
394 static yyconst flex_int32_t yy_ec[256] =
395     {   0,
396         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
397         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
398         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
399         1,    2,    1,    1,    1,    1,    1,    1,    1,    1,
400         1,    1,    1,    1,    4,    5,    1,    6,    6,    6,
401         6,    6,    6,    6,    6,    6,    6,    7,    1,    1,
402         1,    1,    1,    1,    8,    8,    8,    8,    8,    8,
403         8,    8,    8,    8,    8,    8,    8,    8,    8,    8,
404         8,    8,    8,    8,    8,    8,    8,    8,    8,    8,
405         1,    1,    1,    1,    9,    1,   10,    8,    8,    8,
406 
407        11,    8,    8,    8,   12,    8,    8,    8,   13,   14,
408        15,   16,    8,   17,   18,    8,    8,    8,    8,   19,
409         8,    8,    1,   20,    1,    1,    1,    1,    1,    1,
410         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
411         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
412         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
413         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
414         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
415         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
416         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
417 
418         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
419         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
420         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
421         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
422         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
423         1,    1,    1,    1,    1
424     } ;
425 
426 static yyconst flex_int32_t yy_meta[21] =
427     {   0,
428         1,    1,    1,    2,    1,    3,    4,    5,    5,    5,
429         5,    5,    5,    5,    5,    5,    5,    5,    5,    2
430     } ;
431 
432 static yyconst flex_int16_t yy_base[52] =
433     {   0,
434         0,    0,   99,  100,   96,  100,   77,   91,   17,   18,
435        35,   13,    0,   93,   74,    0,  100,   69,   66,    0,
436         0,   61,   23,   10,   12,    0,   70,    0,   16,   25,
437        58,   29,   34,   28,   17,   31,   42,   39,   37,   43,
438        41,  100,   61,   65,   69,   73,   77,   54,   81,   85,
439        88
440     } ;
441 
442 static yyconst flex_int16_t yy_def[52] =
443     {   0,
444        42,    1,   42,   42,   42,   42,   43,   42,   44,   45,
445        44,   11,   46,   42,   43,   46,   42,   47,   11,   48,
446        49,   50,   45,   11,   11,   46,   51,   49,   11,   11,
447        51,   11,   11,   11,   11,   11,   11,   11,   11,   11,
448        11,    0,   42,   42,   42,   42,   42,   42,   42,   42,
449        42
450     } ;
451 
452 static yyconst flex_int16_t yy_nxt[121] =
453     {   0,
454         4,    5,    6,    7,    8,    7,    4,    9,   10,    9,
455        11,    9,   12,    9,    9,    9,    9,    9,    9,   13,
456        18,   22,   25,   20,   20,   29,   22,   30,   19,   20,
457        19,   19,   32,   37,   19,   19,   21,   16,   18,   34,
458        33,   20,   16,   19,   35,   36,   19,   19,   38,   19,
459        39,   40,   19,   24,   21,   19,   41,   19,   27,   19,
460        19,   19,   15,   15,   20,   15,   19,   19,   19,   19,
461        23,   23,   23,   23,   26,   26,   20,   26,   18,   18,
462        16,   18,   28,   28,   19,   28,   22,   22,   21,   22,
463        31,   31,   31,   16,   14,   17,   16,   14,   42,    3,
464 
465        42,   42,   42,   42,   42,   42,   42,   42,   42,   42,
466        42,   42,   42,   42,   42,   42,   42,   42,   42,   42
467     } ;
468 
469 static yyconst flex_int16_t yy_chk[121] =
470     {   0,
471         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
472         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
473         9,   10,   12,    9,   10,   24,   23,   25,   24,   23,
474        25,   12,   29,   35,   29,   35,    9,   10,   11,   32,
475        30,   11,   23,   30,   33,   34,   34,   32,   36,   36,
476        38,   39,   33,   11,   11,   39,   40,   38,   48,   41,
477        37,   40,   43,   43,   31,   43,   44,   44,   44,   44,
478        45,   45,   45,   45,   46,   46,   27,   46,   47,   47,
479        22,   47,   49,   49,   19,   49,   50,   50,   18,   50,
480        51,   51,   51,   15,   14,    8,    7,    5,    3,   42,
481 
482        42,   42,   42,   42,   42,   42,   42,   42,   42,   42,
483        42,   42,   42,   42,   42,   42,   42,   42,   42,   42
484     } ;
485 
486 /* The intent behind this definition is that it'll catch
487  * any uses of REJECT which flex missed.
488  */
489 #define REJECT reject_used_but_not_detected
490 #define yymore() yymore_used_but_not_detected
491 #define YY_MORE_ADJ 0
492 #define YY_RESTORE_YY_MORE_OFFSET
493 #line 1 "pxr/usd/sdf/path.ll"
494 #line 2 "pxr/usd/sdf/path.ll"
495 //
496 // Copyright 2016 Pixar
497 //
498 // Licensed under the Apache License, Version 2.0 (the "Apache License")
499 // with the following modification; you may not use this file except in
500 // compliance with the Apache License and the following modification to it:
501 // Section 6. Trademarks. is deleted and replaced with:
502 //
503 // 6. Trademarks. This License does not grant permission to use the trade
504 //    names, trademarks, service marks, or product names of the Licensor
505 //    and its affiliates, except as required to comply with Section 4(c) of
506 //    the License and to reproduce the content of the NOTICE file.
507 //
508 // You may obtain a copy of the Apache License at
509 //
510 //     http://www.apache.org/licenses/LICENSE-2.0
511 //
512 // Unless required by applicable law or agreed to in writing, software
513 // distributed under the Apache License with the above modification is
514 // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
515 // KIND, either express or implied. See the Apache License for the specific
516 // language governing permissions and limitations under the Apache License.
517 //
518 
519 #include "pxr/pxr.h"
520 #include "pxr/base/arch/fileSystem.h"
521 #include "pxr/usd/sdf/pathParser.h"
522 #include "pxr/usd/sdf/tokens.h"
523 #include "path.tab.h"
524 
525 #include <string>
526 
527 #ifndef fileno
528 #define fileno(fd) ArchFileNo(fd)
529 #endif
530 #ifndef isatty
531 #define isatty(fd) ArchFileIsaTTY(fd)
532 #endif
533 
534 using std::string;
535 
536 PXR_NAMESPACE_USING_DIRECTIVE
537 
538 // As a pure parser, we must define the following
539 #define YY_DECL int pathYylex(YYSTYPE *yylval_param, yyscan_t yyscanner)
540 
541 /* Configuration options for flex */
542 #line 520 "<stdout>"
543 
544 #define INITIAL 0
545 
546 #ifndef YY_NO_UNISTD_H
547 /* Special case for "unistd.h", since it is non-ANSI. We include it way
548  * down here because we want the user's section 1 to have been scanned first.
549  * The user has a chance to override it with an option.
550  */
551 #include <unistd.h>
552 #endif
553 
554 #ifndef YY_EXTRA_TYPE
555 #define YY_EXTRA_TYPE void *
556 #endif
557 
558 /* Holds the entire state of the reentrant scanner. */
559 struct yyguts_t
560     {
561 
562     /* User-defined. Not touched by flex. */
563     YY_EXTRA_TYPE yyextra_r;
564 
565     /* The rest are the same as the globals declared in the non-reentrant scanner. */
566     FILE *yyin_r, *yyout_r;
567     size_t yy_buffer_stack_top; /**< index of top of stack. */
568     size_t yy_buffer_stack_max; /**< capacity of stack. */
569     YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
570     char yy_hold_char;
571     yy_size_t yy_n_chars;
572     yy_size_t yyleng_r;
573     char *yy_c_buf_p;
574     int yy_init;
575     int yy_start;
576     int yy_did_buffer_switch_on_eof;
577     int yy_start_stack_ptr;
578     int yy_start_stack_depth;
579     int *yy_start_stack;
580     yy_state_type yy_last_accepting_state;
581     char* yy_last_accepting_cpos;
582 
583     int yylineno_r;
584     int yy_flex_debug_r;
585 
586     char *yytext_r;
587     int yy_more_flag;
588     int yy_more_len;
589 
590     YYSTYPE * yylval_r;
591 
592     }; /* end struct yyguts_t */
593 
594 static int yy_init_globals (yyscan_t yyscanner );
595 
596     /* This must go here because YYSTYPE and YYLTYPE are included
597      * from bison output in section 1.*/
598     #    define yylval yyg->yylval_r
599 
600 int pathYylex_init (yyscan_t* scanner);
601 
602 int pathYylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
603 
604 /* Accessor methods to globals.
605    These are made visible to non-reentrant scanners for convenience. */
606 
607 int pathYylex_destroy (yyscan_t yyscanner );
608 
609 int pathYyget_debug (yyscan_t yyscanner );
610 
611 void pathYyset_debug (int debug_flag ,yyscan_t yyscanner );
612 
613 YY_EXTRA_TYPE pathYyget_extra (yyscan_t yyscanner );
614 
615 void pathYyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
616 
617 FILE *pathYyget_in (yyscan_t yyscanner );
618 
619 void pathYyset_in  (FILE * in_str ,yyscan_t yyscanner );
620 
621 FILE *pathYyget_out (yyscan_t yyscanner );
622 
623 void pathYyset_out  (FILE * out_str ,yyscan_t yyscanner );
624 
625 yy_size_t pathYyget_leng (yyscan_t yyscanner );
626 
627 char *pathYyget_text (yyscan_t yyscanner );
628 
629 int pathYyget_lineno (yyscan_t yyscanner );
630 
631 void pathYyset_lineno (int line_number ,yyscan_t yyscanner );
632 
633 int pathYyget_column  (yyscan_t yyscanner );
634 
635 void pathYyset_column (int column_no ,yyscan_t yyscanner );
636 
637 YYSTYPE * pathYyget_lval (yyscan_t yyscanner );
638 
639 void pathYyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
640 
641 /* Macros after this point can all be overridden by user definitions in
642  * section 1.
643  */
644 
645 #ifndef YY_SKIP_YYWRAP
646 #ifdef __cplusplus
647 extern "C" int pathYywrap (yyscan_t yyscanner );
648 #else
649 extern int pathYywrap (yyscan_t yyscanner );
650 #endif
651 #endif
652 
653 #ifndef yytext_ptr
654 static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
655 #endif
656 
657 #ifdef YY_NEED_STRLEN
658 static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
659 #endif
660 
661 #ifndef YY_NO_INPUT
662 
663 #ifdef __cplusplus
664 static int yyinput (yyscan_t yyscanner );
665 #else
666 static int input (yyscan_t yyscanner );
667 #endif
668 
669 #endif
670 
671 /* Amount of stuff to slurp up with each read. */
672 #ifndef YY_READ_BUF_SIZE
673 #define YY_READ_BUF_SIZE 8192
674 #endif
675 
676 /* Copy whatever the last rule matched to the standard output. */
677 #ifndef ECHO
678 /* This used to be an fputs(), but since the string might contain NUL's,
679  * we now use fwrite().
680  */
681 #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
682 #endif
683 
684 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
685  * is returned in "result".
686  */
687 #ifndef YY_INPUT
688 #define YY_INPUT(buf,result,max_size) \
689 	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
690 		{ \
691 		int c = '*'; \
692 		size_t n; \
693 		for ( n = 0; n < max_size && \
694 			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
695 			buf[n] = (char) c; \
696 		if ( c == '\n' ) \
697 			buf[n++] = (char) c; \
698 		if ( c == EOF && ferror( yyin ) ) \
699 			YY_FATAL_ERROR( "input in flex scanner failed" ); \
700 		result = n; \
701 		} \
702 	else \
703 		{ \
704 		errno=0; \
705 		while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
706 			{ \
707 			if( errno != EINTR) \
708 				{ \
709 				YY_FATAL_ERROR( "input in flex scanner failed" ); \
710 				break; \
711 				} \
712 			errno=0; \
713 			clearerr(yyin); \
714 			} \
715 		}\
716 \
717 
718 #endif
719 
720 /* No semi-colon after return; correct usage is to write "yyterminate();" -
721  * we don't want an extra ';' after the "return" because that will cause
722  * some compilers to complain about unreachable statements.
723  */
724 #ifndef yyterminate
725 #define yyterminate() return YY_NULL
726 #endif
727 
728 /* Number of entries by which start-condition stack grows. */
729 #ifndef YY_START_STACK_INCR
730 #define YY_START_STACK_INCR 25
731 #endif
732 
733 /* Report a fatal error. */
734 #ifndef YY_FATAL_ERROR
735 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
736 #endif
737 
738 /* end tables serialization structures and prototypes */
739 
740 /* Default declaration of generated scanner - a define so the user can
741  * easily add parameters.
742  */
743 #ifndef YY_DECL
744 #define YY_DECL_IS_OURS 1
745 
746 extern int pathYylex \
747                (YYSTYPE * yylval_param ,yyscan_t yyscanner);
748 
749 #define YY_DECL int pathYylex \
750                (YYSTYPE * yylval_param , yyscan_t yyscanner)
751 #endif /* !YY_DECL */
752 
753 /* Code executed at the beginning of each rule, after yytext and yyleng
754  * have been set up.
755  */
756 #ifndef YY_USER_ACTION
757 #define YY_USER_ACTION
758 #endif
759 
760 /* Code executed at the end of each rule. */
761 #ifndef YY_BREAK
762 #define YY_BREAK break;
763 #endif
764 
765 #define YY_RULE_SETUP \
766 	YY_USER_ACTION
767 
768 /** The main scanner function which does all the work.
769  */
770 YY_DECL
771 {
772 	register yy_state_type yy_current_state;
773 	register char *yy_cp, *yy_bp;
774 	register int yy_act;
775     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
776 
777     yylval = yylval_param;
778 
779 	if ( !yyg->yy_init )
780 		{
781 		yyg->yy_init = 1;
782 
783 #ifdef YY_USER_INIT
784 		YY_USER_INIT;
785 #endif
786 
787 		if ( ! yyg->yy_start )
788 			yyg->yy_start = 1;	/* first start state */
789 
790 		if ( ! yyin )
791 			yyin = stdin;
792 
793 		if ( ! yyout )
794 			yyout = stdout;
795 
796 		if ( ! YY_CURRENT_BUFFER ) {
797 			pathYyensure_buffer_stack (yyscanner);
798 			YY_CURRENT_BUFFER_LVALUE =
799 				pathYy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
800 		}
801 
802 		pathYy_load_buffer_state(yyscanner );
803 		}
804 
805 	{
806 #line 56 "pxr/usd/sdf/path.ll"
807 
808 
809 #line 787 "<stdout>"
810 
811 	while ( 1 )		/* loops until end-of-file is reached */
812 		{
813 		yy_cp = yyg->yy_c_buf_p;
814 
815 		/* Support of yytext. */
816 		*yy_cp = yyg->yy_hold_char;
817 
818 		/* yy_bp points to the position in yy_ch_buf of the start of
819 		 * the current run.
820 		 */
821 		yy_bp = yy_cp;
822 
823 		yy_current_state = yyg->yy_start;
824 yy_match:
825 		do
826 			{
827 			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
828 			if ( yy_accept[yy_current_state] )
829 				{
830 				yyg->yy_last_accepting_state = yy_current_state;
831 				yyg->yy_last_accepting_cpos = yy_cp;
832 				}
833 			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
834 				{
835 				yy_current_state = (int) yy_def[yy_current_state];
836 				if ( yy_current_state >= 43 )
837 					yy_c = yy_meta[(unsigned int) yy_c];
838 				}
839 			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
840 			++yy_cp;
841 			}
842 		while ( yy_base[yy_current_state] != 100 );
843 
844 yy_find_action:
845 		yy_act = yy_accept[yy_current_state];
846 		if ( yy_act == 0 )
847 			{ /* have to back up */
848 			yy_cp = yyg->yy_last_accepting_cpos;
849 			yy_current_state = yyg->yy_last_accepting_state;
850 			yy_act = yy_accept[yy_current_state];
851 			}
852 
853 		YY_DO_BEFORE_ACTION;
854 
855 do_action:	/* This label is used only to access EOF actions. */
856 
857 		switch ( yy_act )
858 	{ /* beginning of action switch */
859 			case 0: /* must back up */
860 			/* undo the effects of YY_DO_BEFORE_ACTION */
861 			*yy_cp = yyg->yy_hold_char;
862 			yy_cp = yyg->yy_last_accepting_cpos;
863 			yy_current_state = yyg->yy_last_accepting_state;
864 			goto yy_find_action;
865 
866 case 1:
867 YY_RULE_SETUP
868 #line 58 "pxr/usd/sdf/path.ll"
869 {
870     yylval_param->token = SdfPathTokens->mapperIndicator;
871     return TOK_MAPPER;
872 }
873 	YY_BREAK
874 case 2:
875 YY_RULE_SETUP
876 #line 62 "pxr/usd/sdf/path.ll"
877 {
878     yylval_param->token = SdfPathTokens->expressionIndicator;
879     return TOK_EXPRESSION;
880 }
881 	YY_BREAK
882 /* This should always match identifiers in the menva parser.  We
883   * currently allow valid C/Python identifiers.
884   */
885 case 3:
886 YY_RULE_SETUP
887 #line 70 "pxr/usd/sdf/path.ll"
888 {
889     yylval_param->token = TfToken(yytext);
890     return TOK_IDENTIFIER;
891 }
892 	YY_BREAK
893 /* Match any number of colon delimited C/Python identifiers.
894   */
895 case 4:
896 YY_RULE_SETUP
897 #line 77 "pxr/usd/sdf/path.ll"
898 {
899     yylval_param->token = TfToken(yytext);
900     return TOK_NAMESPACED_IDENTIFIER;
901 }
902 	YY_BREAK
903 /* This is more lenient than an identifier for locks, which use GUIDs
904   * in paths and the GUIDs use hyphens.  Prims with non-identifier names
905   * can't actually be created.
906   */
907 case 5:
908 YY_RULE_SETUP
909 #line 86 "pxr/usd/sdf/path.ll"
910 {
911     yylval_param->token = TfToken(yytext);
912     return TOK_PRIM_NAME;
913 }
914 	YY_BREAK
915 /* In addition to allowing prim names, we allow variant names to have
916   * hyphens and bars, and to start with a digit, underbar, bar or hyphen.
917   * We have to be careful here not to match a prim name so in the case
918   * where we start with [:alnum:] we must have at least one bar somewhere
919   * in the name.
920   *
921   * Altogether, variant names match .?[[:alnum:]_|\-]*;  the optional
922   * leading dot is handled by the parser.
923   */
924 case 6:
925 YY_RULE_SETUP
926 #line 100 "pxr/usd/sdf/path.ll"
927 {
928     yylval_param->token = TfToken(yytext);
929     return TOK_VARIANT_NAME;
930 }
931 	YY_BREAK
932 case 7:
933 YY_RULE_SETUP
934 #line 105 "pxr/usd/sdf/path.ll"
935 {
936     return TOK_DOTDOT;
937 }
938 	YY_BREAK
939 case 8:
940 YY_RULE_SETUP
941 #line 109 "pxr/usd/sdf/path.ll"
942 {
943     return TOK_WHITESPACE;
944 }
945 	YY_BREAK
946 case 9:
947 YY_RULE_SETUP
948 #line 113 "pxr/usd/sdf/path.ll"
949 {
950     return yytext[0];
951 }
952 	YY_BREAK
953 case 10:
954 YY_RULE_SETUP
955 #line 117 "pxr/usd/sdf/path.ll"
956 ECHO;
957 	YY_BREAK
958 #line 936 "<stdout>"
959 case YY_STATE_EOF(INITIAL):
960 	yyterminate();
961 
962 	case YY_END_OF_BUFFER:
963 		{
964 		/* Amount of text matched not including the EOB char. */
965 		int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
966 
967 		/* Undo the effects of YY_DO_BEFORE_ACTION. */
968 		*yy_cp = yyg->yy_hold_char;
969 		YY_RESTORE_YY_MORE_OFFSET
970 
971 		if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
972 			{
973 			/* We're scanning a new file or input source.  It's
974 			 * possible that this happened because the user
975 			 * just pointed yyin at a new source and called
976 			 * pathYylex().  If so, then we have to assure
977 			 * consistency between YY_CURRENT_BUFFER and our
978 			 * globals.  Here is the right place to do so, because
979 			 * this is the first action (other than possibly a
980 			 * back-up) that will match for the new input source.
981 			 */
982 			yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
983 			YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
984 			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
985 			}
986 
987 		/* Note that here we test for yy_c_buf_p "<=" to the position
988 		 * of the first EOB in the buffer, since yy_c_buf_p will
989 		 * already have been incremented past the NUL character
990 		 * (since all states make transitions on EOB to the
991 		 * end-of-buffer state).  Contrast this with the test
992 		 * in input().
993 		 */
994 		if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
995 			{ /* This was really a NUL. */
996 			yy_state_type yy_next_state;
997 
998 			yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
999 
1000 			yy_current_state = yy_get_previous_state( yyscanner );
1001 
1002 			/* Okay, we're now positioned to make the NUL
1003 			 * transition.  We couldn't have
1004 			 * yy_get_previous_state() go ahead and do it
1005 			 * for us because it doesn't know how to deal
1006 			 * with the possibility of jamming (and we don't
1007 			 * want to build jamming into it because then it
1008 			 * will run more slowly).
1009 			 */
1010 
1011 			yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
1012 
1013 			yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1014 
1015 			if ( yy_next_state )
1016 				{
1017 				/* Consume the NUL. */
1018 				yy_cp = ++yyg->yy_c_buf_p;
1019 				yy_current_state = yy_next_state;
1020 				goto yy_match;
1021 				}
1022 
1023 			else
1024 				{
1025 				yy_cp = yyg->yy_c_buf_p;
1026 				goto yy_find_action;
1027 				}
1028 			}
1029 
1030 		else switch ( yy_get_next_buffer( yyscanner ) )
1031 			{
1032 			case EOB_ACT_END_OF_FILE:
1033 				{
1034 				yyg->yy_did_buffer_switch_on_eof = 0;
1035 
1036 				if ( pathYywrap(yyscanner ) )
1037 					{
1038 					/* Note: because we've taken care in
1039 					 * yy_get_next_buffer() to have set up
1040 					 * yytext, we can now set up
1041 					 * yy_c_buf_p so that if some total
1042 					 * hoser (like flex itself) wants to
1043 					 * call the scanner after we return the
1044 					 * YY_NULL, it'll still work - another
1045 					 * YY_NULL will get returned.
1046 					 */
1047 					yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
1048 
1049 					yy_act = YY_STATE_EOF(YY_START);
1050 					goto do_action;
1051 					}
1052 
1053 				else
1054 					{
1055 					if ( ! yyg->yy_did_buffer_switch_on_eof )
1056 						YY_NEW_FILE;
1057 					}
1058 				break;
1059 				}
1060 
1061 			case EOB_ACT_CONTINUE_SCAN:
1062 				yyg->yy_c_buf_p =
1063 					yyg->yytext_ptr + yy_amount_of_matched_text;
1064 
1065 				yy_current_state = yy_get_previous_state( yyscanner );
1066 
1067 				yy_cp = yyg->yy_c_buf_p;
1068 				yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1069 				goto yy_match;
1070 
1071 			case EOB_ACT_LAST_MATCH:
1072 				yyg->yy_c_buf_p =
1073 				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
1074 
1075 				yy_current_state = yy_get_previous_state( yyscanner );
1076 
1077 				yy_cp = yyg->yy_c_buf_p;
1078 				yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1079 				goto yy_find_action;
1080 			}
1081 		break;
1082 		}
1083 
1084 	default:
1085 		YY_FATAL_ERROR(
1086 			"fatal flex scanner internal error--no action found" );
1087 	} /* end of action switch */
1088 		} /* end of scanning one token */
1089 	} /* end of user's declarations */
1090 } /* end of pathYylex */
1091 
1092 /* yy_get_next_buffer - try to read in a new buffer
1093  *
1094  * Returns a code representing an action:
1095  *	EOB_ACT_LAST_MATCH -
1096  *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1097  *	EOB_ACT_END_OF_FILE - end of file
1098  */
1099 static int yy_get_next_buffer (yyscan_t yyscanner)
1100 {
1101     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1102 	register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1103 	register char *source = yyg->yytext_ptr;
1104 	register int number_to_move, i;
1105 	int ret_val;
1106 
1107 	if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
1108 		YY_FATAL_ERROR(
1109 		"fatal flex scanner internal error--end of buffer missed" );
1110 
1111 	if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1112 		{ /* Don't try to fill the buffer, so this is an EOF. */
1113 		if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
1114 			{
1115 			/* We matched a single character, the EOB, so
1116 			 * treat this as a final EOF.
1117 			 */
1118 			return EOB_ACT_END_OF_FILE;
1119 			}
1120 
1121 		else
1122 			{
1123 			/* We matched some text prior to the EOB, first
1124 			 * process it.
1125 			 */
1126 			return EOB_ACT_LAST_MATCH;
1127 			}
1128 		}
1129 
1130 	/* Try to read more data. */
1131 
1132 	/* First move last chars to start of buffer. */
1133 	number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
1134 
1135 	for ( i = 0; i < number_to_move; ++i )
1136 		*(dest++) = *(source++);
1137 
1138 	if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1139 		/* don't do the read, it's not guaranteed to return an EOF,
1140 		 * just force an EOF
1141 		 */
1142 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
1143 
1144 	else
1145 		{
1146 			yy_size_t num_to_read =
1147 			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1148 
1149 		while ( num_to_read <= 0 )
1150 			{ /* Not enough room in the buffer - grow it. */
1151 
1152 			/* just a shorter name for the current buffer */
1153 			YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
1154 
1155 			int yy_c_buf_p_offset =
1156 				(int) (yyg->yy_c_buf_p - b->yy_ch_buf);
1157 
1158 			if ( b->yy_is_our_buffer )
1159 				{
1160 				yy_size_t new_size = b->yy_buf_size * 2;
1161 
1162 				if ( new_size <= 0 )
1163 					b->yy_buf_size += b->yy_buf_size / 8;
1164 				else
1165 					b->yy_buf_size *= 2;
1166 
1167 				b->yy_ch_buf = (char *)
1168 					/* Include room in for 2 EOB chars. */
1169 					pathYyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
1170 				}
1171 			else
1172 				/* Can't grow it, we don't own it. */
1173 				b->yy_ch_buf = 0;
1174 
1175 			if ( ! b->yy_ch_buf )
1176 				YY_FATAL_ERROR(
1177 				"fatal error - scanner input buffer overflow" );
1178 
1179 			yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1180 
1181 			num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1182 						number_to_move - 1;
1183 
1184 			}
1185 
1186 		if ( num_to_read > YY_READ_BUF_SIZE )
1187 			num_to_read = YY_READ_BUF_SIZE;
1188 
1189 		/* Read in more data. */
1190 		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1191 			yyg->yy_n_chars, num_to_read );
1192 
1193 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1194 		}
1195 
1196 	if ( yyg->yy_n_chars == 0 )
1197 		{
1198 		if ( number_to_move == YY_MORE_ADJ )
1199 			{
1200 			ret_val = EOB_ACT_END_OF_FILE;
1201 			pathYyrestart(yyin  ,yyscanner);
1202 			}
1203 
1204 		else
1205 			{
1206 			ret_val = EOB_ACT_LAST_MATCH;
1207 			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1208 				YY_BUFFER_EOF_PENDING;
1209 			}
1210 		}
1211 
1212 	else
1213 		ret_val = EOB_ACT_CONTINUE_SCAN;
1214 
1215 	if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1216 		/* Extend the array by 50%, plus the number we really need. */
1217 		yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
1218 		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) pathYyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
1219 		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1220 			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1221 	}
1222 
1223 	yyg->yy_n_chars += number_to_move;
1224 	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1225 	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1226 
1227 	yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1228 
1229 	return ret_val;
1230 }
1231 
1232 /* yy_get_previous_state - get the state just before the EOB char was reached */
1233 
yy_get_previous_state(yyscan_t yyscanner)1234     static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
1235 {
1236 	register yy_state_type yy_current_state;
1237 	register char *yy_cp;
1238     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1239 
1240 	yy_current_state = yyg->yy_start;
1241 
1242 	for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
1243 		{
1244 		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1245 		if ( yy_accept[yy_current_state] )
1246 			{
1247 			yyg->yy_last_accepting_state = yy_current_state;
1248 			yyg->yy_last_accepting_cpos = yy_cp;
1249 			}
1250 		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1251 			{
1252 			yy_current_state = (int) yy_def[yy_current_state];
1253 			if ( yy_current_state >= 43 )
1254 				yy_c = yy_meta[(unsigned int) yy_c];
1255 			}
1256 		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1257 		}
1258 
1259 	return yy_current_state;
1260 }
1261 
1262 /* yy_try_NUL_trans - try to make a transition on the NUL character
1263  *
1264  * synopsis
1265  *	next_state = yy_try_NUL_trans( current_state );
1266  */
yy_try_NUL_trans(yy_state_type yy_current_state,yyscan_t yyscanner)1267     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state , yyscan_t yyscanner)
1268 {
1269 	register int yy_is_jam;
1270     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
1271 	register char *yy_cp = yyg->yy_c_buf_p;
1272 
1273 	register YY_CHAR yy_c = 1;
1274 	if ( yy_accept[yy_current_state] )
1275 		{
1276 		yyg->yy_last_accepting_state = yy_current_state;
1277 		yyg->yy_last_accepting_cpos = yy_cp;
1278 		}
1279 	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1280 		{
1281 		yy_current_state = (int) yy_def[yy_current_state];
1282 		if ( yy_current_state >= 43 )
1283 			yy_c = yy_meta[(unsigned int) yy_c];
1284 		}
1285 	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1286 	yy_is_jam = (yy_current_state == 42);
1287 
1288 	(void)yyg;
1289 	return yy_is_jam ? 0 : yy_current_state;
1290 }
1291 
1292 #ifndef YY_NO_INPUT
1293 #ifdef __cplusplus
yyinput(yyscan_t yyscanner)1294     static int yyinput (yyscan_t yyscanner)
1295 #else
1296     static int input  (yyscan_t yyscanner)
1297 #endif
1298 
1299 {
1300 	int c;
1301     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1302 
1303 	*yyg->yy_c_buf_p = yyg->yy_hold_char;
1304 
1305 	if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1306 		{
1307 		/* yy_c_buf_p now points to the character we want to return.
1308 		 * If this occurs *before* the EOB characters, then it's a
1309 		 * valid NUL; if not, then we've hit the end of the buffer.
1310 		 */
1311 		if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1312 			/* This was really a NUL. */
1313 			*yyg->yy_c_buf_p = '\0';
1314 
1315 		else
1316 			{ /* need more input */
1317 			yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
1318 			++yyg->yy_c_buf_p;
1319 
1320 			switch ( yy_get_next_buffer( yyscanner ) )
1321 				{
1322 				case EOB_ACT_LAST_MATCH:
1323 					/* This happens because yy_g_n_b()
1324 					 * sees that we've accumulated a
1325 					 * token and flags that we need to
1326 					 * try matching the token before
1327 					 * proceeding.  But for input(),
1328 					 * there's no matching to consider.
1329 					 * So convert the EOB_ACT_LAST_MATCH
1330 					 * to EOB_ACT_END_OF_FILE.
1331 					 */
1332 
1333 					/* Reset buffer status. */
1334 					pathYyrestart(yyin ,yyscanner);
1335 
1336 					/*FALLTHROUGH*/
1337 
1338 				case EOB_ACT_END_OF_FILE:
1339 					{
1340 					if ( pathYywrap(yyscanner ) )
1341 						return EOF;
1342 
1343 					if ( ! yyg->yy_did_buffer_switch_on_eof )
1344 						YY_NEW_FILE;
1345 #ifdef __cplusplus
1346 					return yyinput(yyscanner);
1347 #else
1348 					return input(yyscanner);
1349 #endif
1350 					}
1351 
1352 				case EOB_ACT_CONTINUE_SCAN:
1353 					yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
1354 					break;
1355 				}
1356 			}
1357 		}
1358 
1359 	c = *(unsigned char *) yyg->yy_c_buf_p;	/* cast for 8-bit char's */
1360 	*yyg->yy_c_buf_p = '\0';	/* preserve yytext */
1361 	yyg->yy_hold_char = *++yyg->yy_c_buf_p;
1362 
1363 	return c;
1364 }
1365 #endif	/* ifndef YY_NO_INPUT */
1366 
1367 /** Immediately switch to a different input stream.
1368  * @param input_file A readable stream.
1369  * @param yyscanner The scanner object.
1370  * @note This function does not reset the start condition to @c INITIAL .
1371  */
pathYyrestart(FILE * input_file,yyscan_t yyscanner)1372     void pathYyrestart  (FILE * input_file , yyscan_t yyscanner)
1373 {
1374     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1375 
1376 	if ( ! YY_CURRENT_BUFFER ){
1377         pathYyensure_buffer_stack (yyscanner);
1378 		YY_CURRENT_BUFFER_LVALUE =
1379             pathYy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
1380 	}
1381 
1382 	pathYy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
1383 	pathYy_load_buffer_state(yyscanner );
1384 }
1385 
1386 /** Switch to a different input buffer.
1387  * @param new_buffer The new input buffer.
1388  * @param yyscanner The scanner object.
1389  */
pathYy_switch_to_buffer(YY_BUFFER_STATE new_buffer,yyscan_t yyscanner)1390     void pathYy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer , yyscan_t yyscanner)
1391 {
1392     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1393 
1394 	/* TODO. We should be able to replace this entire function body
1395 	 * with
1396 	 *		pathYypop_buffer_state();
1397 	 *		pathYypush_buffer_state(new_buffer);
1398      */
1399 	pathYyensure_buffer_stack (yyscanner);
1400 	if ( YY_CURRENT_BUFFER == new_buffer )
1401 		return;
1402 
1403 	if ( YY_CURRENT_BUFFER )
1404 		{
1405 		/* Flush out information for old buffer. */
1406 		*yyg->yy_c_buf_p = yyg->yy_hold_char;
1407 		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
1408 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1409 		}
1410 
1411 	YY_CURRENT_BUFFER_LVALUE = new_buffer;
1412 	pathYy_load_buffer_state(yyscanner );
1413 
1414 	/* We don't actually know whether we did this switch during
1415 	 * EOF (pathYywrap()) processing, but the only time this flag
1416 	 * is looked at is after pathYywrap() is called, so it's safe
1417 	 * to go ahead and always set it.
1418 	 */
1419 	yyg->yy_did_buffer_switch_on_eof = 1;
1420 }
1421 
pathYy_load_buffer_state(yyscan_t yyscanner)1422 static void pathYy_load_buffer_state  (yyscan_t yyscanner)
1423 {
1424     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1425 	yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1426 	yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1427 	yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1428 	yyg->yy_hold_char = *yyg->yy_c_buf_p;
1429 }
1430 
1431 /** Allocate and initialize an input buffer state.
1432  * @param file A readable stream.
1433  * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1434  * @param yyscanner The scanner object.
1435  * @return the allocated buffer state.
1436  */
pathYy_create_buffer(FILE * file,int size,yyscan_t yyscanner)1437     YY_BUFFER_STATE pathYy_create_buffer  (FILE * file, int  size , yyscan_t yyscanner)
1438 {
1439 	YY_BUFFER_STATE b;
1440 
1441 	b = (YY_BUFFER_STATE) pathYyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
1442 	if ( ! b )
1443 		YY_FATAL_ERROR( "out of dynamic memory in pathYy_create_buffer()" );
1444 
1445 	b->yy_buf_size = size;
1446 
1447 	/* yy_ch_buf has to be 2 characters longer than the size given because
1448 	 * we need to put in 2 end-of-buffer characters.
1449 	 */
1450 	b->yy_ch_buf = (char *) pathYyalloc(b->yy_buf_size + 2 ,yyscanner );
1451 	if ( ! b->yy_ch_buf )
1452 		YY_FATAL_ERROR( "out of dynamic memory in pathYy_create_buffer()" );
1453 
1454 	b->yy_is_our_buffer = 1;
1455 
1456 	pathYy_init_buffer(b,file ,yyscanner);
1457 
1458 	return b;
1459 }
1460 
1461 /** Destroy the buffer.
1462  * @param b a buffer created with pathYy_create_buffer()
1463  * @param yyscanner The scanner object.
1464  */
pathYy_delete_buffer(YY_BUFFER_STATE b,yyscan_t yyscanner)1465     void pathYy_delete_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
1466 {
1467     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1468 
1469 	if ( ! b )
1470 		return;
1471 
1472 	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1473 		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1474 
1475 	if ( b->yy_is_our_buffer )
1476 		pathYyfree((void *) b->yy_ch_buf ,yyscanner );
1477 
1478 	pathYyfree((void *) b ,yyscanner );
1479 }
1480 
1481 /* Initializes or reinitializes a buffer.
1482  * This function is sometimes called more than once on the same buffer,
1483  * such as during a pathYyrestart() or at EOF.
1484  */
pathYy_init_buffer(YY_BUFFER_STATE b,FILE * file,yyscan_t yyscanner)1485     static void pathYy_init_buffer  (YY_BUFFER_STATE  b, FILE * file , yyscan_t yyscanner)
1486 
1487 {
1488 	int oerrno = errno;
1489     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1490 
1491 	pathYy_flush_buffer(b ,yyscanner);
1492 
1493 	b->yy_input_file = file;
1494 	b->yy_fill_buffer = 1;
1495 
1496     /* If b is the current buffer, then pathYy_init_buffer was _probably_
1497      * called from pathYyrestart() or through yy_get_next_buffer.
1498      * In that case, we don't want to reset the lineno or column.
1499      */
1500     if (b != YY_CURRENT_BUFFER){
1501         b->yy_bs_lineno = 1;
1502         b->yy_bs_column = 0;
1503     }
1504 
1505         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1506 
1507 	errno = oerrno;
1508 }
1509 
1510 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1511  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1512  * @param yyscanner The scanner object.
1513  */
pathYy_flush_buffer(YY_BUFFER_STATE b,yyscan_t yyscanner)1514     void pathYy_flush_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
1515 {
1516     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1517 	if ( ! b )
1518 		return;
1519 
1520 	b->yy_n_chars = 0;
1521 
1522 	/* We always need two end-of-buffer characters.  The first causes
1523 	 * a transition to the end-of-buffer state.  The second causes
1524 	 * a jam in that state.
1525 	 */
1526 	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1527 	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1528 
1529 	b->yy_buf_pos = &b->yy_ch_buf[0];
1530 
1531 	b->yy_at_bol = 1;
1532 	b->yy_buffer_status = YY_BUFFER_NEW;
1533 
1534 	if ( b == YY_CURRENT_BUFFER )
1535 		pathYy_load_buffer_state(yyscanner );
1536 }
1537 
1538 /** Pushes the new state onto the stack. The new state becomes
1539  *  the current state. This function will allocate the stack
1540  *  if necessary.
1541  *  @param new_buffer The new state.
1542  *  @param yyscanner The scanner object.
1543  */
pathYypush_buffer_state(YY_BUFFER_STATE new_buffer,yyscan_t yyscanner)1544 void pathYypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
1545 {
1546     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1547 	if (new_buffer == NULL)
1548 		return;
1549 
1550 	pathYyensure_buffer_stack(yyscanner);
1551 
1552 	/* This block is copied from pathYy_switch_to_buffer. */
1553 	if ( YY_CURRENT_BUFFER )
1554 		{
1555 		/* Flush out information for old buffer. */
1556 		*yyg->yy_c_buf_p = yyg->yy_hold_char;
1557 		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
1558 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1559 		}
1560 
1561 	/* Only push if top exists. Otherwise, replace top. */
1562 	if (YY_CURRENT_BUFFER)
1563 		yyg->yy_buffer_stack_top++;
1564 	YY_CURRENT_BUFFER_LVALUE = new_buffer;
1565 
1566 	/* copied from pathYy_switch_to_buffer. */
1567 	pathYy_load_buffer_state(yyscanner );
1568 	yyg->yy_did_buffer_switch_on_eof = 1;
1569 }
1570 
1571 /** Removes and deletes the top of the stack, if present.
1572  *  The next element becomes the new top.
1573  *  @param yyscanner The scanner object.
1574  */
pathYypop_buffer_state(yyscan_t yyscanner)1575 void pathYypop_buffer_state (yyscan_t yyscanner)
1576 {
1577     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1578 	if (!YY_CURRENT_BUFFER)
1579 		return;
1580 
1581 	pathYy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
1582 	YY_CURRENT_BUFFER_LVALUE = NULL;
1583 	if (yyg->yy_buffer_stack_top > 0)
1584 		--yyg->yy_buffer_stack_top;
1585 
1586 	if (YY_CURRENT_BUFFER) {
1587 		pathYy_load_buffer_state(yyscanner );
1588 		yyg->yy_did_buffer_switch_on_eof = 1;
1589 	}
1590 }
1591 
1592 /* Allocates the stack if it does not exist.
1593  *  Guarantees space for at least one push.
1594  */
pathYyensure_buffer_stack(yyscan_t yyscanner)1595 static void pathYyensure_buffer_stack (yyscan_t yyscanner)
1596 {
1597 	yy_size_t num_to_alloc;
1598     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1599 
1600 	if (!yyg->yy_buffer_stack) {
1601 
1602 		/* First allocation is just for 2 elements, since we don't know if this
1603 		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
1604 		 * immediate realloc on the next call.
1605          */
1606 		num_to_alloc = 1;
1607 		yyg->yy_buffer_stack = (struct yy_buffer_state**)pathYyalloc
1608 								(num_to_alloc * sizeof(struct yy_buffer_state*)
1609 								, yyscanner);
1610 		if ( ! yyg->yy_buffer_stack )
1611 			YY_FATAL_ERROR( "out of dynamic memory in pathYyensure_buffer_stack()" );
1612 
1613 		memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1614 
1615 		yyg->yy_buffer_stack_max = num_to_alloc;
1616 		yyg->yy_buffer_stack_top = 0;
1617 		return;
1618 	}
1619 
1620 	if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
1621 
1622 		/* Increase the buffer to prepare for a possible push. */
1623 		int grow_size = 8 /* arbitrary grow size */;
1624 
1625 		num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
1626 		yyg->yy_buffer_stack = (struct yy_buffer_state**)pathYyrealloc
1627 								(yyg->yy_buffer_stack,
1628 								num_to_alloc * sizeof(struct yy_buffer_state*)
1629 								, yyscanner);
1630 		if ( ! yyg->yy_buffer_stack )
1631 			YY_FATAL_ERROR( "out of dynamic memory in pathYyensure_buffer_stack()" );
1632 
1633 		/* zero only the new slots.*/
1634 		memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
1635 		yyg->yy_buffer_stack_max = num_to_alloc;
1636 	}
1637 }
1638 
1639 /** Setup the input buffer state to scan directly from a user-specified character buffer.
1640  * @param base the character buffer
1641  * @param size the size in bytes of the character buffer
1642  * @param yyscanner The scanner object.
1643  * @return the newly allocated buffer state object.
1644  */
pathYy_scan_buffer(char * base,yy_size_t size,yyscan_t yyscanner)1645 YY_BUFFER_STATE pathYy_scan_buffer  (char * base, yy_size_t  size , yyscan_t yyscanner)
1646 {
1647 	YY_BUFFER_STATE b;
1648 
1649 	if ( size < 2 ||
1650 	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
1651 	     base[size-1] != YY_END_OF_BUFFER_CHAR )
1652 		/* They forgot to leave room for the EOB's. */
1653 		return 0;
1654 
1655 	b = (YY_BUFFER_STATE) pathYyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
1656 	if ( ! b )
1657 		YY_FATAL_ERROR( "out of dynamic memory in pathYy_scan_buffer()" );
1658 
1659 	b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
1660 	b->yy_buf_pos = b->yy_ch_buf = base;
1661 	b->yy_is_our_buffer = 0;
1662 	b->yy_input_file = 0;
1663 	b->yy_n_chars = b->yy_buf_size;
1664 	b->yy_is_interactive = 0;
1665 	b->yy_at_bol = 1;
1666 	b->yy_fill_buffer = 0;
1667 	b->yy_buffer_status = YY_BUFFER_NEW;
1668 
1669 	pathYy_switch_to_buffer(b ,yyscanner );
1670 
1671 	return b;
1672 }
1673 
1674 /** Setup the input buffer state to scan a string. The next call to pathYylex() will
1675  * scan from a @e copy of @a str.
1676  * @param yystr a NUL-terminated string to scan
1677  * @param yyscanner The scanner object.
1678  * @return the newly allocated buffer state object.
1679  * @note If you want to scan bytes that may contain NUL values, then use
1680  *       pathYy_scan_bytes() instead.
1681  */
pathYy_scan_string(yyconst char * yystr,yyscan_t yyscanner)1682 YY_BUFFER_STATE pathYy_scan_string (yyconst char * yystr , yyscan_t yyscanner)
1683 {
1684 
1685 	return pathYy_scan_bytes(yystr,strlen(yystr) ,yyscanner);
1686 }
1687 
1688 /** Setup the input buffer state to scan the given bytes. The next call to pathYylex() will
1689  * scan from a @e copy of @a bytes.
1690  * @param yybytes the byte buffer to scan
1691  * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
1692  * @param yyscanner The scanner object.
1693  * @return the newly allocated buffer state object.
1694  */
pathYy_scan_bytes(yyconst char * yybytes,yy_size_t _yybytes_len,yyscan_t yyscanner)1695 YY_BUFFER_STATE pathYy_scan_bytes  (yyconst char * yybytes, yy_size_t  _yybytes_len , yyscan_t yyscanner)
1696 {
1697 	YY_BUFFER_STATE b;
1698 	char *buf;
1699 	yy_size_t n;
1700 	yy_size_t i;
1701 
1702 	/* Get memory for full buffer, including space for trailing EOB's. */
1703 	n = _yybytes_len + 2;
1704 	buf = (char *) pathYyalloc(n ,yyscanner );
1705 	if ( ! buf )
1706 		YY_FATAL_ERROR( "out of dynamic memory in pathYy_scan_bytes()" );
1707 
1708 	for ( i = 0; i < _yybytes_len; ++i )
1709 		buf[i] = yybytes[i];
1710 
1711 	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1712 
1713 	b = pathYy_scan_buffer(buf,n ,yyscanner);
1714 	if ( ! b )
1715 		YY_FATAL_ERROR( "bad buffer in pathYy_scan_bytes()" );
1716 
1717 	/* It's okay to grow etc. this buffer, and we should throw it
1718 	 * away when we're done.
1719 	 */
1720 	b->yy_is_our_buffer = 1;
1721 
1722 	return b;
1723 }
1724 
1725 #ifndef YY_EXIT_FAILURE
1726 #define YY_EXIT_FAILURE 2
1727 #endif
1728 
yy_fatal_error(yyconst char * msg,yyscan_t yyscanner)1729 static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
1730 {
1731     	(void) fprintf( stderr, "%s\n", msg );
1732 	exit( YY_EXIT_FAILURE );
1733 }
1734 
1735 /* Redefine yyless() so it works in section 3 code. */
1736 
1737 #undef yyless
1738 #define yyless(n) \
1739 	do \
1740 		{ \
1741 		/* Undo effects of setting up yytext. */ \
1742         int yyless_macro_arg = (n); \
1743         YY_LESS_LINENO(yyless_macro_arg);\
1744 		yytext[yyleng] = yyg->yy_hold_char; \
1745 		yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
1746 		yyg->yy_hold_char = *yyg->yy_c_buf_p; \
1747 		*yyg->yy_c_buf_p = '\0'; \
1748 		yyleng = yyless_macro_arg; \
1749 		} \
1750 	while ( 0 )
1751 
1752 /* Accessor  methods (get/set functions) to struct members. */
1753 
1754 /** Get the user-defined data for this scanner.
1755  * @param yyscanner The scanner object.
1756  */
pathYyget_extra(yyscan_t yyscanner)1757 YY_EXTRA_TYPE pathYyget_extra  (yyscan_t yyscanner)
1758 {
1759     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1760     return yyextra;
1761 }
1762 
1763 /** Get the current line number.
1764  * @param yyscanner The scanner object.
1765  */
pathYyget_lineno(yyscan_t yyscanner)1766 int pathYyget_lineno  (yyscan_t yyscanner)
1767 {
1768     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1769 
1770         if (! YY_CURRENT_BUFFER)
1771             return 0;
1772 
1773     return yylineno;
1774 }
1775 
1776 /** Get the current column number.
1777  * @param yyscanner The scanner object.
1778  */
pathYyget_column(yyscan_t yyscanner)1779 int pathYyget_column  (yyscan_t yyscanner)
1780 {
1781     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1782 
1783         if (! YY_CURRENT_BUFFER)
1784             return 0;
1785 
1786     return yycolumn;
1787 }
1788 
1789 /** Get the input stream.
1790  * @param yyscanner The scanner object.
1791  */
pathYyget_in(yyscan_t yyscanner)1792 FILE *pathYyget_in  (yyscan_t yyscanner)
1793 {
1794     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1795     return yyin;
1796 }
1797 
1798 /** Get the output stream.
1799  * @param yyscanner The scanner object.
1800  */
pathYyget_out(yyscan_t yyscanner)1801 FILE *pathYyget_out  (yyscan_t yyscanner)
1802 {
1803     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1804     return yyout;
1805 }
1806 
1807 /** Get the length of the current token.
1808  * @param yyscanner The scanner object.
1809  */
pathYyget_leng(yyscan_t yyscanner)1810 yy_size_t pathYyget_leng  (yyscan_t yyscanner)
1811 {
1812     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1813     return yyleng;
1814 }
1815 
1816 /** Get the current token.
1817  * @param yyscanner The scanner object.
1818  */
1819 
pathYyget_text(yyscan_t yyscanner)1820 char *pathYyget_text  (yyscan_t yyscanner)
1821 {
1822     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1823     return yytext;
1824 }
1825 
1826 /** Set the user-defined data. This data is never touched by the scanner.
1827  * @param user_defined The data to be associated with this scanner.
1828  * @param yyscanner The scanner object.
1829  */
pathYyset_extra(YY_EXTRA_TYPE user_defined,yyscan_t yyscanner)1830 void pathYyset_extra (YY_EXTRA_TYPE  user_defined , yyscan_t yyscanner)
1831 {
1832     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1833     yyextra = user_defined ;
1834 }
1835 
1836 /** Set the current line number.
1837  * @param line_number
1838  * @param yyscanner The scanner object.
1839  */
pathYyset_lineno(int line_number,yyscan_t yyscanner)1840 void pathYyset_lineno (int  line_number , yyscan_t yyscanner)
1841 {
1842     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1843 
1844         /* lineno is only valid if an input buffer exists. */
1845         if (! YY_CURRENT_BUFFER )
1846            YY_FATAL_ERROR( "pathYyset_lineno called with no buffer" );
1847 
1848     yylineno = line_number;
1849 }
1850 
1851 /** Set the current column.
1852  * @param line_number
1853  * @param yyscanner The scanner object.
1854  */
pathYyset_column(int column_no,yyscan_t yyscanner)1855 void pathYyset_column (int  column_no , yyscan_t yyscanner)
1856 {
1857     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1858 
1859         /* column is only valid if an input buffer exists. */
1860         if (! YY_CURRENT_BUFFER )
1861            YY_FATAL_ERROR( "pathYyset_column called with no buffer" );
1862 
1863     yycolumn = column_no;
1864 }
1865 
1866 /** Set the input stream. This does not discard the current
1867  * input buffer.
1868  * @param in_str A readable stream.
1869  * @param yyscanner The scanner object.
1870  * @see pathYy_switch_to_buffer
1871  */
pathYyset_in(FILE * in_str,yyscan_t yyscanner)1872 void pathYyset_in (FILE *  in_str , yyscan_t yyscanner)
1873 {
1874     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1875     yyin = in_str ;
1876 }
1877 
pathYyset_out(FILE * out_str,yyscan_t yyscanner)1878 void pathYyset_out (FILE *  out_str , yyscan_t yyscanner)
1879 {
1880     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1881     yyout = out_str ;
1882 }
1883 
pathYyget_debug(yyscan_t yyscanner)1884 int pathYyget_debug  (yyscan_t yyscanner)
1885 {
1886     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1887     return yy_flex_debug;
1888 }
1889 
pathYyset_debug(int bdebug,yyscan_t yyscanner)1890 void pathYyset_debug (int  bdebug , yyscan_t yyscanner)
1891 {
1892     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1893     yy_flex_debug = bdebug ;
1894 }
1895 
1896 /* Accessor methods for yylval and yylloc */
1897 
pathYyget_lval(yyscan_t yyscanner)1898 YYSTYPE * pathYyget_lval  (yyscan_t yyscanner)
1899 {
1900     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1901     return yylval;
1902 }
1903 
pathYyset_lval(YYSTYPE * yylval_param,yyscan_t yyscanner)1904 void pathYyset_lval (YYSTYPE *  yylval_param , yyscan_t yyscanner)
1905 {
1906     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1907     yylval = yylval_param;
1908 }
1909 
1910 /* User-visible API */
1911 
1912 /* pathYylex_init is special because it creates the scanner itself, so it is
1913  * the ONLY reentrant function that doesn't take the scanner as the last argument.
1914  * That's why we explicitly handle the declaration, instead of using our macros.
1915  */
1916 
pathYylex_init(yyscan_t * ptr_yy_globals)1917 int pathYylex_init(yyscan_t* ptr_yy_globals)
1918 
1919 {
1920     if (ptr_yy_globals == NULL){
1921         errno = EINVAL;
1922         return 1;
1923     }
1924 
1925     *ptr_yy_globals = (yyscan_t) pathYyalloc ( sizeof( struct yyguts_t ), NULL );
1926 
1927     if (*ptr_yy_globals == NULL){
1928         errno = ENOMEM;
1929         return 1;
1930     }
1931 
1932     /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
1933     memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
1934 
1935     return yy_init_globals ( *ptr_yy_globals );
1936 }
1937 
1938 /* pathYylex_init_extra has the same functionality as pathYylex_init, but follows the
1939  * convention of taking the scanner as the last argument. Note however, that
1940  * this is a *pointer* to a scanner, as it will be allocated by this call (and
1941  * is the reason, too, why this function also must handle its own declaration).
1942  * The user defined value in the first argument will be available to pathYyalloc in
1943  * the yyextra field.
1944  */
1945 
pathYylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t * ptr_yy_globals)1946 int pathYylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
1947 
1948 {
1949     struct yyguts_t dummy_yyguts;
1950 
1951     pathYyset_extra (yy_user_defined, &dummy_yyguts);
1952 
1953     if (ptr_yy_globals == NULL){
1954         errno = EINVAL;
1955         return 1;
1956     }
1957 
1958     *ptr_yy_globals = (yyscan_t) pathYyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
1959 
1960     if (*ptr_yy_globals == NULL){
1961         errno = ENOMEM;
1962         return 1;
1963     }
1964 
1965     /* By setting to 0xAA, we expose bugs in
1966     yy_init_globals. Leave at 0x00 for releases. */
1967     memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
1968 
1969     pathYyset_extra (yy_user_defined, *ptr_yy_globals);
1970 
1971     return yy_init_globals ( *ptr_yy_globals );
1972 }
1973 
yy_init_globals(yyscan_t yyscanner)1974 static int yy_init_globals (yyscan_t yyscanner)
1975 {
1976     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1977     /* Initialization is the same as for the non-reentrant scanner.
1978      * This function is called from pathYylex_destroy(), so don't allocate here.
1979      */
1980 
1981     yyg->yy_buffer_stack = 0;
1982     yyg->yy_buffer_stack_top = 0;
1983     yyg->yy_buffer_stack_max = 0;
1984     yyg->yy_c_buf_p = (char *) 0;
1985     yyg->yy_init = 0;
1986     yyg->yy_start = 0;
1987 
1988     yyg->yy_start_stack_ptr = 0;
1989     yyg->yy_start_stack_depth = 0;
1990     yyg->yy_start_stack =  NULL;
1991 
1992 /* Defined in main.c */
1993 #ifdef YY_STDINIT
1994     yyin = stdin;
1995     yyout = stdout;
1996 #else
1997     yyin = (FILE *) 0;
1998     yyout = (FILE *) 0;
1999 #endif
2000 
2001     /* For future reference: Set errno on error, since we are called by
2002      * pathYylex_init()
2003      */
2004     return 0;
2005 }
2006 
2007 /* pathYylex_destroy is for both reentrant and non-reentrant scanners. */
pathYylex_destroy(yyscan_t yyscanner)2008 int pathYylex_destroy  (yyscan_t yyscanner)
2009 {
2010     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2011 
2012     /* Pop the buffer stack, destroying each element. */
2013 	while(YY_CURRENT_BUFFER){
2014 		pathYy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
2015 		YY_CURRENT_BUFFER_LVALUE = NULL;
2016 		pathYypop_buffer_state(yyscanner);
2017 	}
2018 
2019 	/* Destroy the stack itself. */
2020 	pathYyfree(yyg->yy_buffer_stack ,yyscanner);
2021 	yyg->yy_buffer_stack = NULL;
2022 
2023     /* Destroy the start condition stack. */
2024         pathYyfree(yyg->yy_start_stack ,yyscanner );
2025         yyg->yy_start_stack = NULL;
2026 
2027     /* Reset the globals. This is important in a non-reentrant scanner so the next time
2028      * pathYylex() is called, initialization will occur. */
2029     yy_init_globals( yyscanner);
2030 
2031     /* Destroy the main struct (reentrant only). */
2032     pathYyfree ( yyscanner , yyscanner );
2033     yyscanner = NULL;
2034     return 0;
2035 }
2036 
2037 /*
2038  * Internal utility routines.
2039  */
2040 
2041 #ifndef yytext_ptr
yy_flex_strncpy(char * s1,yyconst char * s2,int n,yyscan_t yyscanner)2042 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
2043 {
2044 	register int i;
2045 	for ( i = 0; i < n; ++i )
2046 		s1[i] = s2[i];
2047 }
2048 #endif
2049 
2050 #ifdef YY_NEED_STRLEN
yy_flex_strlen(yyconst char * s,yyscan_t yyscanner)2051 static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
2052 {
2053 	register int n;
2054 	for ( n = 0; s[n]; ++n )
2055 		;
2056 
2057 	return n;
2058 }
2059 #endif
2060 
pathYyalloc(yy_size_t size,yyscan_t yyscanner)2061 void *pathYyalloc (yy_size_t  size , yyscan_t yyscanner)
2062 {
2063 	return (void *) malloc( size );
2064 }
2065 
pathYyrealloc(void * ptr,yy_size_t size,yyscan_t yyscanner)2066 void *pathYyrealloc  (void * ptr, yy_size_t  size , yyscan_t yyscanner)
2067 {
2068 	/* The cast to (char *) in the following accommodates both
2069 	 * implementations that use char* generic pointers, and those
2070 	 * that use void* generic pointers.  It works with the latter
2071 	 * because both ANSI C and C++ allow castless assignment from
2072 	 * any pointer type to void*, and deal with argument conversions
2073 	 * as though doing an assignment.
2074 	 */
2075 	return (void *) realloc( (char *) ptr, size );
2076 }
2077 
pathYyfree(void * ptr,yyscan_t yyscanner)2078 void pathYyfree (void * ptr , yyscan_t yyscanner)
2079 {
2080 	free( (char *) ptr );	/* see pathYyrealloc() for (char *) cast */
2081 }
2082 
2083 #define YYTABLES_NAME "yytables"
2084 
2085 #line 117 "pxr/usd/sdf/path.ll"
2086 
2087 
2088 
2089