Skip to content

Instantly share code, notes, and snippets.

View nathanwiegand's full-sized avatar

Nathan Wiegand nathanwiegand

  • Austin, TX
View GitHub Profile
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="filename"></xsl:param>
<xsl:output method="text"/>
<xsl:template name="recurse">
<xsl:for-each select="*">
<xsl:variable name="context" select="."/>
<xsl:variable name="ref" select="./Identifier/@ref"/>
<xsl:variable name="type" select="./Expression/@type"/>
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>
<xsl:template match="/grammar">
#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;libxml/parser.h&gt;
#include &lt;libxml/tree.h&gt;
#define DEBUG 0
<?xml version="1.0"?>
<grammar>
<token type="identifier"/>
<token type="becomes"/>
<token type="leftparen"/>
<token type="rightparen"/>
<token type="if"/>
<token type="then"/>
#include <stdio.h>
#include <string.h>
typedef struct {
void *state;
long current;
} coroutine_state;
coroutine_state* createCoroutineState() {
SHELL=bash
CC=gcc
CFLAGS=-Wall -pedantic
all: example
newbinary: newversion.c
$(CC) $(CFLAGS) -o $@ $<
example: original.c newbinary
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <strings.h>
#include <sys/types.h>
int main(int argc, char **argv) {
int i;
unsigned int outputFD;
FILE *outputFile;