packages feed

webidl-0.1: include/parser.h

/*
 * This header file contains necessary definitions to compile the lexer, 
 * and to provide information for FFI bindings.
 */

#ifndef PARSER_H_INCL
#define PARSER_H_INCL

/* Numeric values for tokens the lexer returns */

#define ANY 0x70001001
#define ATTRIBUTE 0x70001002
#define BOOLEAN 0x70001003
#define CHAR 0x70001004
#define CONST 0x70001005
#define DOUBLE 0x70001006
#define EOL 0x70001007 
#define EXCEPTION 0x70001008
#define FALSE 0x70001009
#define FIXED 0x70001010
#define FLOAT 0x70001011
#define GETRAISES 0x70001012
#define IN 0x70001013
#define INOUT 0x70001014
#define INTERFACE 0x70001015
#define LONG 0x70001016
#define MODULE 0x70001017
#define MULTIPLE 0x70001018
#define NATIVE 0x70001019
#define OBJECT 0x70001020
#define OCTET 0x70001021
#define ONEWAY 0x70001022
#define OUT 0x70001023
#define RAISES 0x70001024
#define READONLY 0x70001025
#define SETRAISES 0x70001026
#define SEQUENCE 0x70001027
#define SHORT 0x70001028
#define STRING 0x70001029
#define STRUCT 0x70001030
#define TRUE 0x70001031
#define TYPEDEF 0x70001032
#define UNSIGNED 0x70001033
#define VALUETYPE 0x70001034
#define VOID 0x70001035
#define WCHAR 0x70001036
#define WSTRING 0x70001037

#define OP_SCOPE 0x70001101
#define OP_SHL 0x70001102
#define OP_SHR 0x70001103

#define POUND_SIGN 0x70001201
#define PRAGMA_ID 0x70001202

#define IDENTIFIER 0x70001301
#define INTEGER_LITERAL 0x70001302
#define CHARACTER_LITERAL 0x70001303
#define WIDE_CHARACTER_LITERAL 0x70001304
#define FLOATING_PT_LITERAL 0x70001305
#define STRING_LITERAL 0x70001306
#define WIDE_STRING_LITERAL 0x70001307
#define FIXED_PT_LITERAL 0x70001308

#define JAVADOC 0x70001401

/* Other structures and constants definitions */

typedef struct yyltype {
  int first_line;
  int first_column;
  int last_line;
  int last_column;
} yyltype;

#define YYLTYPE yyltype

typedef struct tokval {
  char *name;
} tokval;

extern YYLTYPE yylloc, *p_yylloc;
extern tokval  yylval, *p_yylval;

#define true 1
#define false 0
#define bool int

#define YY_USER_INIT {\
	yylval.name = NULL;\
	yylloc.first_line = 1;\
	yylloc.first_column = yylloc.last_line = yylloc.last_column = 0;\
	p_yylloc = &yylloc;\
	p_yylval = &yylval;\
}

int yyinput (void);

#endif