Skip to content

Instantly share code, notes, and snippets.

View dMaggot's full-sized avatar

David E. Narváez dMaggot

View GitHub Profile
#/usr/bin/perl -w
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
@dMaggot
dMaggot / FSMXML2RegularRules.xslt
Created August 23, 2009 05:06
XSLT to transform an Automata description from FSMXML to regular rules in LaTeX
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:b="http://vaucanson.lrde.epita.fr">
<xsl:output method="text" />
<xsl:template match="/">
<xsl:apply-templates select="b:fsmxml/b:automaton" />
</xsl:template>
<xsl:template match="b:automaton">
<xsl:variable name="columns" as="item()*">
<xsl:for-each select="b:valueType/b:monoid/b:monGen">
@dMaggot
dMaggot / FSMXML2Matrix.xslt
Created August 23, 2009 05:04
XSLT to transform an Automata description from FSMXML to a LaTeX function matrix
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:b="http://vaucanson.lrde.epita.fr">
<xsl:output method="text" />
<xsl:template match="/">
<xsl:apply-templates select="b:fsmxml/b:automaton" />
</xsl:template>
<xsl:template match="b:automaton">
<xsl:variable name="columns" as="item()*">
<xsl:for-each select="b:valueType/b:monoid/b:monGen">
@dMaggot
dMaggot / FSMXML2Graphviz.xslt
Created August 23, 2009 04:55
XSLT to transform an Automata description from FSMXML to Graphviz DOT
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:b="http://vaucanson.lrde.epita.fr">
<xsl:output method="text" />
<xsl:template match="/">
<xsl:apply-templates select="b:fsmxml/b:automaton" />
</xsl:template>
<xsl:template match="b:automaton">
<xsl:text>digraph </xsl:text>
<xsl:value-of select="@name" />