diff options
author | Guenter Bartsch <guenter@users.sourceforge.net> | 2002-05-01 19:41:55 +0000 |
---|---|---|
committer | Guenter Bartsch <guenter@users.sourceforge.net> | 2002-05-01 19:41:55 +0000 |
commit | 47760fada8acc782d6f3037017733aff8d49a4f5 (patch) | |
tree | afc3444391f8b68f9b1ad906c68a3cfa35772acb /src/xine-utils/xmllexer.h | |
parent | aea434b4696c9dabe34f81ed87ee2ae1432137ec (diff) | |
download | xine-lib-47760fada8acc782d6f3037017733aff8d49a4f5.tar.gz xine-lib-47760fada8acc782d6f3037017733aff8d49a4f5.tar.bz2 |
added xml parser/lexer from thibaut mattern
CVS patchset: 1823
CVS date: 2002/05/01 19:41:55
Diffstat (limited to 'src/xine-utils/xmllexer.h')
-rw-r--r-- | src/xine-utils/xmllexer.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/src/xine-utils/xmllexer.h b/src/xine-utils/xmllexer.h new file mode 100644 index 000000000..e9a382d46 --- /dev/null +++ b/src/xine-utils/xmllexer.h @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2002 the xine project + * + * This file is part of xine, a free video player. + * + * xine 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. + * + * xine 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * $Id: xmllexer.h,v 1.1 2002/05/01 19:41:55 guenter Exp $ + * + */ + +/* xml lexer */ +#ifndef XML_LEXER_H +#define XML_LEXER_H + +/* public constants */ +#define T_ERROR -1 /* lexer error */ +#define T_EOF 0 /* end of file */ +#define T_EOL 1 /* end of line */ +#define T_SEPAR 2 /* separator ' ' '/t' '\n' '\r' */ +#define T_M_START_1 3 /* markup start < */ +#define T_M_START_2 4 /* markup start </ */ +#define T_M_STOP_1 5 /* markup stop > */ +#define T_M_STOP_2 6 /* markup stop /> */ +#define T_EQUAL 7 /* = */ +#define T_QUOTE 8 /* \" or \' */ +#define T_STRING 9 /* "string" */ +#define T_IDENT 10 /* identifier */ +#define T_DATA 11 /* data */ +#define T_C_START 12 /* <!-- */ +#define T_C_STOP 13 /* --> */ +#define T_TI_START 14 /* <? */ +#define T_TI_STOP 15 /* ?> */ +#define T_DOCTYPE_START 16 /* <!DOCTYPE */ +#define T_DOCTYPE_STOP 17 /* > */ + + +/* public functions */ +void lexer_init(char * buf, int size); +int lexer_get_token(char * tok, int tok_size); + +#endif |