File: xmlparse.h

package info (click to toggle)
ragel 5.14-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,628 kB
  • ctags: 4,619
  • sloc: cpp: 15,187; ansic: 3,490; yacc: 1,921; makefile: 411; sh: 146; awk: 6
file content (74 lines) | stat: -rw-r--r-- 1,635 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/*
 *  Copyright 2005-2006 Adrian Thurston <thurston@cs.queensu.ca>
 */

/*  This file is part of Ragel.
 *
 *  Ragel 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 of the License, or
 *  (at your option) any later version.
 * 
 *  Ragel 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 Ragel; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
 */

#ifndef _XMLPARSE_H
#define _XMLPARSE_H

#include "vector.h"
#include "buffer.h"

struct XMLTag
{
    char *name;
    int id;
};

extern Buffer xmlData;

struct Attribute
{
	Attribute( char *key, char *value )
		: key(key), value(value) { }

	char *key;
	char *value;
};

struct AttrList 
	: public Vector<Attribute>
{
	Attribute *find( char *key )
	{
		for ( Iter a = first(); a.lte(); a++ ) {
			if ( strcmp( a->key, key ) == 0 )
				return a;
		}
		return 0;
	}
};

struct InlineItem;
struct InlineList;

struct LmSwitchVect;
struct LmSwitchAction;

#include "xmlpdefs.h"

/* These come from the scanner and point back into the parser. We will borrow
 * them for error reporting. */
extern YYSTYPE *yylval;
extern YYLTYPE *yylloc;

int yylex( YYSTYPE *, YYLTYPE *);
void scannerInit();

#endif /* _RLCODEGEN_H */