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

Raja R Harinath rharinath at novell.com
Thu Mar 17 03:14:29 EST 2005


Hi Eno,

Atsushi Eno <atsushi at ximian.com> writes:

> Okay. So I made tiny patch for jay (am so lazy to make big changes).
> Attached patch for jay adds "-d BlahBlah" to insert #define BlahBlah
> on top of the output. (It is somewhat C# specific, but users could
> just ignore this option when they don't want to use it.)

We don't even need this.
  
> -System.Xml.Query/XQueryParser.cs: System.Xml.Query/XQueryParser.jay System.Xml.Query/skeleton-2.0.cs
> -	$(topdir)/jay/jay -ct < System.Xml.Query/skeleton-2.0.cs $< >$@
> +Mono.Xml.Xsl/PatternParser.jay: System.Xml.XPath/Parser.jay $(topdir)/jay/skeleton.cs
> +	sed "s/\%start Expr/\%start Pattern/" $< >$@
>  
> -BUILT_SOURCES = System.Xml.XPath/Parser.cs #System.Xml.Query/XQueryParser.cs
> -CLEAN_FILES = Test/XmlFiles/xsl/result.xml System.Xml.Query/XQueryParser.cs
> +Mono.Xml.Xsl/PatternParser.cs: Mono.Xml.Xsl/PatternParser.jay $(topdir)/jay/skeleton.cs
> +	$(topdir)/jay/jay -ct -d XSLT_PATTERN < $(topdir)/jay/skeleton.cs $< >$@

Change this to:

       echo "#define XSLT_PATTERN" > $@
       $(topdir)/jay/jay -ct $< < $(topdir)/jay/skeleton.cs >> $@#

- Hari



More information about the Mono-devel-list mailing list