XmlEda

From Clothbot

(Difference between revisions)
Jump to: navigation, search
Revision as of 00:52, 31 May 2008 (edit)
AndrewPlumb (Talk | contribs)
(Sample Code)
← Previous diff
Current revision (05:44, 8 November 2008) (edit)
AndrewPlumb (Talk | contribs)
(Sample Code)
 
Line 1: Line 1:
=XML EDA= =XML EDA=
-HDL Parsing using XSLT 2.0+A place to collect my ideas revolving around HDL Parsing using XSLT 2.0.
==Why XSLT 2.0?== ==Why XSLT 2.0?==
Line 18: Line 18:
*** [http://clothbot.com/code/xmleda/example1.xsl example1.xsl] *** [http://clothbot.com/code/xmleda/example1.xsl example1.xsl]
*** [http://clothbot.com/code/xmleda/runExample1 runExample1] *** [http://clothbot.com/code/xmleda/runExample1 runExample1]
 +
 +'''Note:''' If/when the [https://sourceforge.net/projects/xmleda/ XML EDA SourceForge Project] goes active, I'll start uploading some more useful works in progress.
==References== ==References==
Line 23: Line 25:
* [http://www.saxonica.com/documentation/using-xsl/commandline.html Saxonica: XSLT 2.0 Parser] * [http://www.saxonica.com/documentation/using-xsl/commandline.html Saxonica: XSLT 2.0 Parser]
* [http://www.w3.org/TR/xslt20/ XSLT 2.0 Standard] * [http://www.w3.org/TR/xslt20/ XSLT 2.0 Standard]
 +* [https://sourceforge.net/projects/xmleda/ XML EDA SourceForge Project] (Pending Approval)

Current revision

Contents

XML EDA

A place to collect my ideas revolving around HDL Parsing using XSLT 2.0.

Why XSLT 2.0?

  • Has regular expression support.
  • Primary language parser itself can be transformed via XSLT into application-specific transforms.
  • Primary language parser could be transformed into Lex/Yacc or JavaCC compile-able code.
  • Easy to maintain

Sample Code

  • code/xmleda
    • Example 1: Since multi-line comment parsing and escaped end-of-line characters can be one of the more challenging aspects of parser writing, that's what this example exercises. It uses the Saxonica parser; see the runExample1 script.

Note: If/when the XML EDA SourceForge Project goes active, I'll start uploading some more useful works in progress.

References

Personal tools