diff --git a/src/modules/Parser/html.c b/src/modules/Parser/html.c index 73534dee4a9928beac12474056f7a179bb135f49..f2c16942491b14134e59a1fa30e24c6abcaed36c 100644 --- a/src/modules/Parser/html.c +++ b/src/modules/Parser/html.c @@ -42,6 +42,18 @@ extern struct program *parser_html_program; /* **! module Parser **! class HTML +**! This is a simple parser for SGML structured markups. +**! It's not really HTML, but it's useful for that +**! purpose. +**! +**! The simple way to use it is to give it some information +**! about available tags and containers, and what +**! callbacks those is to call. +**! +**! The object is easily reused, by calling the <ref>clone</ref>() +**! function. +**! +**! see also: add_tag, add_container, clone */ struct location @@ -397,9 +409,9 @@ static void exit_html_struct(struct object *o) /****** setup callbacks *****************************/ /* -**! method _set_tag_callback(function to_call) -**! method _set_entity_callback(function to_call) -**! method _set_data_callback(function to_call) +**! method void _set_tag_callback(function to_call) +**! method void _set_entity_callback(function to_call) +**! method void _set_data_callback(function to_call) **! This functions set up the parser object to **! call the given callbacks upon tags, entities **! and/or data. @@ -411,6 +423,9 @@ static void exit_html_struct(struct object *o) **! Note that no parsing of the contents has been done. **! Both endtags and normal tags are called, there is **! no container parsing. +**! note: +**! The callbacks will _only_ be called if there isn't +**! another tag/container/entity handler for these. **! */ @@ -568,6 +583,14 @@ static void html_add_entities(INT32 args) pop_n_elems(args); } +/* +**! method mapping tags() +**! method mapping containers() +**! method mapping entities() +**! Returns the current callback settings. +**! see also: add_tag, add_tags, add_container, add_containers, add_entity, add_entities +*/ + static void html_tags(INT32 args) { pop_n_elems(args); diff --git a/src/modules/Parser/module.pmod.in b/src/modules/Parser/module.pmod.in index 3089d84fe41d87709106db0164a6322fba542611..7f2f222d5a3a1e8b2e12d7ce8042713f06787361 100644 --- a/src/modules/Parser/module.pmod.in +++ b/src/modules/Parser/module.pmod.in @@ -1,5 +1,5 @@ /* - * $Id: module.pmod.in,v 1.2 1999/06/12 19:13:08 mirar Exp $ + * $Id: module.pmod.in,v 1.3 1999/06/12 19:44:30 mirar Exp $ * */ @@ -126,8 +126,8 @@ class SGML private static object p=HTML(); -//! static void create() -//! static void create(string filename) +//! 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: @@ -142,9 +142,9 @@ class SGML { if (data!="") res[0]+=({data}); return ({}); }); } -//! static object feed(string s) -//! static array finish() -//! static array result(string s) +//! 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. //!