From: Jason L. <jl...@me...> - 2002-11-11 01:40:09
|
I've been thinking about yet another approach for parsers. Would it be possible to write the generic parsers in a way that they could be extended by more specific parsers. i.e. create a samba parser that extends the inifile parser samba parser does not need any syntax recognition abilities, but it will recognize known parameters and print out XML representation for them it could be something like whenever inifile recognizes a new section it calls a method named "newSection", which the samba parser overrides to recognize sections specific to Samba, or whenever inifile recognizes a new parameter, it calls a method named "newParameter" which the samba parser overrides to recognize known Samba parameters and their data types. It's an idea. Jason |