-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Kyle Maxwell
committed
Dec 8, 2008
1 parent
c0b5873
commit de397af
Showing
1 changed file
with
194 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,194 @@ | ||
/* A Bison parser, made by GNU Bison 2.3. */ | ||
|
||
/* Skeleton interface for Bison GLR parsers in C | ||
Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. | ||
This program is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation; either version 2, or (at your option) | ||
any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program; if not, write to the Free Software | ||
Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
Boston, MA 02110-1301, USA. */ | ||
|
||
/* As a special exception, you may create a larger work that contains | ||
part or all of the Bison parser skeleton and distribute that work | ||
under terms of your choice, so long as that work isn't itself a | ||
parser generator using the skeleton or a modified version thereof | ||
as a parser skeleton. Alternatively, if you modify or redistribute | ||
the parser skeleton itself, you may (at your option) remove this | ||
special exception, which will cause the skeleton and the resulting | ||
Bison output files to be licensed under the GNU General Public | ||
License without this special exception. | ||
This special exception was added by the Free Software Foundation in | ||
version 2.2 of Bison. */ | ||
|
||
/* Tokens. */ | ||
#ifndef YYTOKENTYPE | ||
# define YYTOKENTYPE | ||
/* Put the tokens into the symbol table, so that GDB and other debuggers | ||
know about them. */ | ||
enum yytokentype { | ||
NUMBER = 258, | ||
S = 259, | ||
AT = 260, | ||
LPAREN = 261, | ||
RPAREN = 262, | ||
PIPE = 263, | ||
LT = 264, | ||
SLASH = 265, | ||
DBLSLASH = 266, | ||
BANG = 267, | ||
COLON = 268, | ||
DBLCOLON = 269, | ||
QUERY = 270, | ||
HASH = 271, | ||
COMMA = 272, | ||
DOT = 273, | ||
DBLDOT = 274, | ||
GT = 275, | ||
LBRA = 276, | ||
RBRA = 277, | ||
TILDE = 278, | ||
SPLAT = 279, | ||
PLUS = 280, | ||
DASH = 281, | ||
EQ = 282, | ||
LTE = 283, | ||
GTE = 284, | ||
DOLLAR = 285, | ||
BSLASHLIT = 286, | ||
OTHER = 287, | ||
XANCESTOR = 288, | ||
XANCESTORSELF = 289, | ||
XATTR = 290, | ||
XCHILD = 291, | ||
XDESC = 292, | ||
XDESCSELF = 293, | ||
XFOLLOW = 294, | ||
XFOLLOWSIB = 295, | ||
XNS = 296, | ||
XPARENT = 297, | ||
XPRE = 298, | ||
XPRESIB = 299, | ||
XSELF = 300, | ||
XOR = 301, | ||
XAND = 302, | ||
XDIV = 303, | ||
XMOD = 304, | ||
XCOMMENT = 305, | ||
XTEXT = 306, | ||
XPI = 307, | ||
XNODE = 308, | ||
CXEQUATION = 309, | ||
CXOPHE = 310, | ||
CXOPNE = 311, | ||
CXOPSTARTEQ = 312, | ||
CXOPENDEQ = 313, | ||
CXOPCONTAINS = 314, | ||
CXOPCONTAINS2 = 315, | ||
CXFIRST = 316, | ||
CXLAST = 317, | ||
CXNOT = 318, | ||
CXEVEN = 319, | ||
CXODD = 320, | ||
CXEQ = 321, | ||
CXGT = 322, | ||
CXLT = 323, | ||
CXHEADER = 324, | ||
CXCONTAINS = 325, | ||
CXEMPTY = 326, | ||
CXHAS = 327, | ||
CXPARENT = 328, | ||
CXNTHCH = 329, | ||
CXNTHLASTCH = 330, | ||
CXNTHTYPE = 331, | ||
CXNTHLASTTYPE = 332, | ||
CXFIRSTCH = 333, | ||
CXLASTCH = 334, | ||
CXFIRSTTYPE = 335, | ||
CXLASTTYPE = 336, | ||
CXONLYCH = 337, | ||
CXONLYTYPE = 338, | ||
CXINPUT = 339, | ||
CXTEXT = 340, | ||
CXPASSWORD = 341, | ||
CXRADIO = 342, | ||
CXCHECKBOX = 343, | ||
CXSUBMIT = 344, | ||
CXIMAGE = 345, | ||
CXRESET = 346, | ||
CXBUTTON = 347, | ||
CXFILE = 348, | ||
CXENABLED = 349, | ||
CXDISABLED = 350, | ||
CXCHECKED = 351, | ||
CXSELECTED = 352, | ||
NAME = 353, | ||
STRING = 354 | ||
}; | ||
#endif | ||
|
||
|
||
/* Copy the first part of user declarations. */ | ||
#line 1 "parser.y" | ||
|
||
#include <math.h> | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
#include <string.h> | ||
#include "kstring.h" | ||
|
||
#ifndef PARSER_Y_H_INCLUDED | ||
#define PARSER_Y_H_INCLUDED | ||
|
||
#define YYSTYPE char * | ||
|
||
static char* parsed_answer; | ||
|
||
int yylex (void); | ||
void yyerror (char const *); | ||
|
||
void prepare_parse(char*); | ||
void cleanup_parse(void); | ||
void start_debugging(void); | ||
|
||
int yyparse(void); | ||
char* myparse(char*); | ||
void answer(char*); | ||
|
||
#endif | ||
|
||
|
||
|
||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED | ||
typedef int YYSTYPE; | ||
# define YYSTYPE_IS_DECLARED 1 | ||
# define YYSTYPE_IS_TRIVIAL 1 | ||
#endif | ||
|
||
#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED | ||
typedef struct YYLTYPE | ||
{ | ||
|
||
char yydummy; | ||
|
||
} YYLTYPE; | ||
# define YYLTYPE_IS_DECLARED 1 | ||
# define YYLTYPE_IS_TRIVIAL 1 | ||
#endif | ||
|
||
|
||
extern YYSTYPE yylval; | ||
|
||
|
||
|