Initial commit of skeleton code.

This commit is contained in:
Jeremy Rand 2013-07-24 08:45:33 -05:00
commit 1e6ae9335e
7 changed files with 48 additions and 0 deletions

10
Makefile Normal file
View File

@ -0,0 +1,10 @@
OBJS=abCalc.o abCalcExpr.o abCalcExprReal.o abCalcExprInt.o abCalcStack.o
NAME=abCalc
all: $(NAME)
$(NAME): $(OBJS)
cc -o $(NAME) $(OBJS)
clean:
rm -f $(NAME) $(OBJS)

9
abCalc.c Normal file
View File

@ -0,0 +1,9 @@
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
printf("Hello, world!\n");
exit(0);
}

1
abCalcExpr.c Normal file
View File

@ -0,0 +1 @@
#include "abCalcExpr.h"

28
abCalcExpr.h Normal file
View File

@ -0,0 +1,28 @@
/*
abCalcExpr.h
By: Jeremy Rand
*/
typedef enum abCalcExprType {
abCalcExprTypeReal,
abCalcExprTypeInt
} abCalcExprType;
typedef double abCalcRealType;
typedef long abCalcIntType;
typedef struct abCalcExpr {
abCalcExprType type;
union {
abCalcRealType real;
abCalcIntType integer;
} u;
} abCalcExpr;
typedef struct abCalcExprCallbacks {
abCalcExpr * (*parseExpression)(abCalcExpr *expr, char *buffer);
} abCalcExprCallbacks;

0
abCalcExprInt.c Normal file
View File

0
abCalcExprReal.c Normal file
View File

0
abCalcStack.c Normal file
View File