pike.git
/
src
/
modules
/
Parser
/
module.pmod.in
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/modules/Parser/module.pmod.in:1:
/*
-
* $Id: module.pmod.in,v 1.
5
1999/06/
12
19
:
51
:
38
mirar Exp $
+
* $Id: module.pmod.in,v 1.
6
1999/06/
14
20
:
49
:
34
mirar Exp $
* */ inherit @module@; //! module Parser class SGML //! class SGML //! This is a handy simple parser of SGML-like
pike.git/src/modules/Parser/module.pmod.in:126:
private static object p=HTML(); //! method void create() //! method void create(string filename) //! This object is created with this filename. //! It's passed to all created tags, for debug and trace purposes. //! note: //! No, it doesn't read the file itself. See <ref>feed</ref>.
+
int i;
+
void create(void|string _file) { file=_file; p->_set_tag_callback(got_tag);
-
+
// p->_set_tag_callback(lambda() { i++; sleep(0); return ({}); });
p->_set_data_callback(lambda(object g,string data) { if (data!="") res[0]+=({data}); return ({}); }); } //! method object feed(string s) //! method array finish() //! method array result(string s) //! Feed new data to the object, or finish the stream. //! No result can be used until finish() is called. //!
pike.git/src/modules/Parser/module.pmod.in:156:
{ p->feed(s); return this_object(); } array finish() { p->finish(); data=res[0]; res=0;
+
werror("i=%O\n",i);
return data; } array(object(SGMLatom)|string) result() { return data; } }