[Mono-devel-list] RFC: how to manage almost duplicate parser/tokenizer

Ben Maurer bmaurer at ximian.com
Wed Mar 16 17:22:36 EST 2005


On Thu, 2005-03-17 at 06:43 +0900, Atsushi Eno wrote:
> Hi,
> 
> I wonder which is the best way to have "almost duplicate" but
> different parser/tokenizer pair for XSLT "Pattern" apart from
> XPath (I'm going to fix a bug that allows improper XPath for
> XSLT pattern e.g. namespace::*).
> 
> With my way to do, they could be generated by attached patches:
> 
>   $ patch -i pattern-parser.diff System.Xml.XPath/Parser.jay -o
>     System.Xml.XPath/PatternParser.jay
>   $ patch -i pattern-parser.diff System.Xml.XPath/Tokenizer.cs -o
>     System.Xml.XPath/PatternTokenizer.cs
>   $ patch -i use-pattern-parser.diff
> 
> ... but I wonder if there are better ways to do handle those
> parser/tokenizer stuff, because parser/tokenizer patches are easy
> to become broken when we fix XPath parser and/or tokenizer sources.
> 
> Would it be better if I just put another parser/tokenizer pair?

Could we do an ifdef with jay and compile it twice?

-- Ben




More information about the Mono-devel-list mailing list