Add a header file to declare routines defined in lexer and used in

parser, or vice versa.

svn path=/trunk/; revision=15769
This commit is contained in:
Guy Harris 2005-09-12 19:32:35 +00:00
parent 3db317ca2b
commit 019ed9005f
4 changed files with 40 additions and 8 deletions

View File

@ -110,7 +110,8 @@ LIBETHEREAL_INCLUDES = \
crypt-md5.h \
crypt-rc4.h \
dtd.h \
dtd_grammar.h \
dtd_grammar.h \
dtd_parse.h \
emem.h \
epan.h \
epan_dissect.h \

View File

@ -6,7 +6,7 @@
*
* Copyright 2005, Luis E. Garcia Ontanon <luis.ontanon@gmail.com>
*
* $Id $
* $Id$
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -27,9 +27,10 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <stdio.h>
#include <glib.h>
#include "dtd.h"
#include "dtd_parse.h"
static dtd_named_list_t* dtd_named_list_new(gchar* name, GPtrArray* list) {
dtd_named_list_t* nl = g_malloc(sizeof(dtd_named_list_t));

33
epan/dtd_parse.h Normal file
View File

@ -0,0 +1,33 @@
/* dtd_parse.h
* an XML dissector for ethereal
* header file to declare functions defined in lexer and used in parser,
* or vice versa
*
* Copyright 2004, Luis E. Garcia Ontanon <luis.ontanon@gmail.com>
*
* $Id$
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
* 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
* of the License, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
extern void DtdParse(void*,int,dtd_token_data_t*,dtd_build_data_t*);
extern void *DtdParseAlloc(void *(*)(gulong));
extern void DtdParseFree( void*, void(*)(void*) );
extern void DtdParseTrace(FILE *TraceFILE, char *zTracePrompt);
extern int Dtd_Parse_lex(void);

View File

@ -6,7 +6,7 @@
%{
/* dtd_lexer.l
/* dtd_parse.l
* an XML dissector for ethereal
* lexical analyzer for DTDs
*
@ -38,16 +38,13 @@
#include "dtd.h"
#include "dtd_grammar.h"
#include "dtd_parse.h"
struct _proto_xmlpi_attr {
gchar* name;
void (*act)(gchar*);
};
void DtdParse(void*,int,dtd_token_data_t*,dtd_build_data_t*);
void *DtdParseAlloc(void *(*)(gulong));
void DtdParseFree( void*, void(*)(void*) );
void DtdParseTrace(FILE *TraceFILE, char *zTracePrompt);
void* pParser;
GString* input_string;
guint offset;