Update of /cvsroot/libfunutil/libfunutil/lib/s11n/parsers In directory sc8-pr-cvs1:/tmp/cvs-serv28813/parsers Modified Files: Makefile ns.compact.flex.at ns.funtxt.flex.at ns.funxml.flex.at ns.hex.flex.at ns.paren.flex.at ns.simplexml.flex.at Log Message: mass file-name changes. All classes now have stl-style names, partly for consistency, partly because that's my fad at the moment, and partly to avoid stepping on the original fun::{Serializ{er,able}}.h. Index: Makefile =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/lib/s11n/parsers/Makefile,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Makefile 17 Nov 2003 20:30:37 -0000 1.4 +++ Makefile 19 Nov 2003 22:11:54 -0000 1.5 @@ -2,6 +2,8 @@ S11N_NAMESPACE ?= s11n +enable_hexed = 0 + NS_SOURCES = \ ns.flex_lexers.cpp NS_HEADERS = \ @@ -20,8 +22,10 @@ INSTALL_PACKAGE_HEADERS = $(HEADERS) FLEXES = compact paren funtxt funxml select_lexer simplexml +ifeq (0,$(enable_hexed)) +FLEXES += hex +endif CLEAN_FILES += $(addsuffix .flex.at,$(FLEXES)) -# hex SOURCES_FLEX = $(addsuffix .flex.cpp,$(FLEXES)) NAMESPACE = $(S11N_NAMESPACE) @@ -38,10 +42,13 @@ select_lexer_FLEXES_ARGS = -i -B -Pselect_lexer simplexml_FLEXES_ARGS = -B -Psimplexml paren_FLEXES_ARGS = -B -Pparen -hex_FLEXES_ARGS = -i -B -Phex compact_FLEXES_ARGS = -i -B -Pcompact +ifeq (0,$(enable_hexed)) +hex_FLEXES_ARGS = -i -B -Phex +endif include $(toc_makesdir)/flex.make + COMMON_FLEX_DEFS = common_flex_definitions.at flex_definitions = include:COMMON_DEFINITIONS=$(COMMON_FLEX_DEFS) $(COMMON_FLEX_DEFS): @@ -73,10 +80,12 @@ $(flex_definitions) \ ) || exit; touch $@ +ifeq (0,$(enable_hexed)) hex.flex: hex.flex.at $(COMMON_FLEX_DEFS) Makefile @$(call toc_atparse_file,$<,$@, \ $(flex_definitions) \ ) || exit; touch $@ +endif compact.flex: compact.flex.at $(COMMON_FLEX_DEFS) Makefile @$(call toc_atparse_file,$<,$@, \ @@ -123,11 +132,13 @@ paren: paren.flex Makefile $(call toc_compile_c_binary,paren) +ifeq (0,$(enable_hexed)) hex_bin_SOURCES = hex.flex.cpp hex_bin_CFLAGS = $(INCLUDES) -DHEX_DO_MAIN=1 -g hex_bin_LFLAGS = -lstdc++ $(S11N_CLIENT_LDADD) hex: hex.flex Makefile $(call toc_compile_c_binary,hex) +endif compact_bin_SOURCES = compact.flex.cpp compact_bin_CFLAGS = $(INCLUDES) -DCOMPACT_DO_MAIN=1 -g Index: ns.compact.flex.at =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/lib/s11n/parsers/ns.compact.flex.at,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ns.compact.flex.at 17 Nov 2003 20:29:50 -0000 1.1 +++ ns.compact.flex.at 19 Nov 2003 22:11:54 -0000 1.2 @@ -104,7 +104,7 @@ HEX_DIGIT ([a-fA-F0-9]) WORD4 ({HEX_DIGIT}{4}) - // maintenance note: these hex codes must be kept in sync with those from HexSerializer's enum + // maintenance note: these hex codes must be kept in sync with those from hex_serializer's enum NODE_OPEN f1 NODE_CLOSE f0 PROP_OPEN e1 @@ -184,7 +184,7 @@ %% #if COMPACT_DO_MAIN -#include <S11N_NAMESPACE/s11n_io.h> // HexSerializer +#include <S11N_NAMESPACE/s11n_io.h> // hex_serializer // #include <S11N_NAMESPACE/FlexShell.h> // #include <S11N_NAMESPACE/ELib.h> using namespace S11N_NAMESPACE; @@ -196,9 +196,9 @@ while( 0 != (lexer->yylex() ) ); if( bob.root_node() ) { - S11N_NAMESPACE::ParenSerializer ser; + S11N_NAMESPACE::paren_serializer ser; ser.serialize( *(bob.root_node()), std::cout ); -// S11N_NAMESPACE::CompactSerializer compact; +// S11N_NAMESPACE::compact_serializer compact; // compact.serialize( *(bob.root_node()), std::cout ); } return 0; Index: ns.funtxt.flex.at =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/lib/s11n/parsers/ns.funtxt.flex.at,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ns.funtxt.flex.at 17 Nov 2003 20:29:50 -0000 1.1 +++ ns.funtxt.flex.at 19 Nov 2003 22:11:54 -0000 1.2 @@ -73,7 +73,7 @@ #include <S11N_NAMESPACE/node_builder.h> #include <S11N_NAMESPACE/flex_lexers.h> -#include <S11N_NAMESPACE/Serializer.h> +#include <S11N_NAMESPACE/serializer.h> using std::cin; using std::cerr; Index: ns.funxml.flex.at =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/lib/s11n/parsers/ns.funxml.flex.at,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ns.funxml.flex.at 17 Nov 2003 20:29:50 -0000 1.1 +++ ns.funxml.flex.at 19 Nov 2003 22:11:54 -0000 1.2 @@ -13,7 +13,7 @@ #include <S11N_NAMESPACE/flex_lexers.h> #include <S11N_NAMESPACE/string_util.h> // translate_entities() #include <S11N_NAMESPACE/s11n_globals.h> // xml_entity_map() -#include <S11N_NAMESPACE/Serializer.h> +#include <S11N_NAMESPACE/serializer.h> using std::cin; using std::cerr; Index: ns.hex.flex.at =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/lib/s11n/parsers/ns.hex.flex.at,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ns.hex.flex.at 17 Nov 2003 20:29:50 -0000 1.1 +++ ns.hex.flex.at 19 Nov 2003 22:11:54 -0000 1.2 @@ -103,7 +103,7 @@ HEX_DIGIT ([a-fA-F0-9]) WORD2 {HEX_DIGIT}{2} - // maintenance note: these hex codes must be kept in sync with those from HexSerializer's enum + // maintenance note: these hex codes must be kept in sync with those from hex_serializer's enum NODE_OPEN 11 NODE_CLOSE 10 PROP_OPEN 21 @@ -186,7 +186,7 @@ %% #if HEX_DO_MAIN -#include <S11N_NAMESPACE/s11n_io.h> // HexSerializer +#include <S11N_NAMESPACE/s11n_io.h> // hex_serializer // #include <S11N_NAMESPACE/FlexShell.h> // #include <S11N_NAMESPACE/ELib.h> using namespace S11N_NAMESPACE; @@ -198,7 +198,7 @@ while( 0 != (lexer->yylex() ) ); if( bob.root_node() ) { - S11N_NAMESPACE::ParenSerializer ser; + S11N_NAMESPACE::paren_serializer ser; ser.serialize( *(bob.root_node()), std::cout ); } return 0; Index: ns.paren.flex.at =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/lib/s11n/parsers/ns.paren.flex.at,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ns.paren.flex.at 17 Nov 2003 20:29:50 -0000 1.1 +++ ns.paren.flex.at 19 Nov 2003 22:11:54 -0000 1.2 @@ -5,7 +5,7 @@ Author: stephan - st...@s1... This lexer reads in a lisp-like (but not lisp) grammar for the s11n -framework. It's output partner is S11N_NAMESPACE::ParenSerializer. +framework. It's output partner is S11N_NAMESPACE::paren_serializer. Sample: @@ -44,7 +44,7 @@ #include <S11N_NAMESPACE/node_builder.h> #include <S11N_NAMESPACE/flex_lexers.h> -#include <S11N_NAMESPACE/Serializer.h> // for ParenSerializer::translations() +#include <S11N_NAMESPACE/serializer.h> // for paren_serializer::translations() using std::cin; using std::cerr; using std::cout; @@ -171,7 +171,7 @@ } // S11N_NAMESPACE::trim_string( propval, S11N_NAMESPACE::TrimLeading ); - static S11N_NAMESPACE::ParenSerializer ser; + static S11N_NAMESPACE::paren_serializer ser; S11N_NAMESPACE::translate_entities( propval, ser.translations(), true ); //std::cout << "["<<propval<<"]"<<std::endl; serbuilder->add_property( propname, propval ); @@ -242,7 +242,7 @@ #if PAREN_DO_MAIN -#include <S11N_NAMESPACE/s11n_io.h> // ParenSerializer +#include <S11N_NAMESPACE/s11n_io.h> // paren_serializer int main( int argc, char ** argv ) { S11N_NAMESPACE::ParenTreeBuilder bob; @@ -250,7 +250,7 @@ while( 0 != (lexer->yylex() ) ); if( bob.root_node() ) { - S11N_NAMESPACE::ParenSerializer ser; + S11N_NAMESPACE::paren_serializer ser; ser.serialize( *(bob.root_node()), std::cout ); } return 0; Index: ns.simplexml.flex.at =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/lib/s11n/parsers/ns.simplexml.flex.at,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ns.simplexml.flex.at 17 Nov 2003 20:29:50 -0000 1.1 +++ ns.simplexml.flex.at 19 Nov 2003 22:11:54 -0000 1.2 @@ -19,7 +19,7 @@ #include <stack> #include <S11N_NAMESPACE/string_util.h> // normalize_string(), xml_entity_map(), etc #include <S11N_NAMESPACE/flex_lexers.h> -#include <S11N_NAMESPACE/Serializer.h> +#include <S11N_NAMESPACE/serializer.h> #include <S11N_NAMESPACE/key_value_parser.h> #include <S11N_NAMESPACE/context_singleton.h> using std::cin; |