This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 <stdio.h> | |
#include <stdlib.h> | |
#include <libxml/parser.h> | |
#include <libxml/tree.h> | |
#define DEBUG 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<grammar> | |
<token type="identifier"/> | |
<token type="becomes"/> | |
<token type="leftparen"/> | |
<token type="rightparen"/> | |
<token type="if"/> | |
<token type="then"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
typedef struct { | |
void *state; | |
long current; | |
} coroutine_state; | |
coroutine_state* createCoroutineState() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SHELL=bash | |
CC=gcc | |
CFLAGS=-Wall -pedantic | |
all: example | |
newbinary: newversion.c | |
$(CC) $(CFLAGS) -o $@ $< | |
example: original.c newbinary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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; |