mirror of
https://github.com/jeremysrand/abCalc.git
synced 2024-12-29 19:31:23 +00:00
Initial commit of skeleton code.
This commit is contained in:
commit
1e6ae9335e
10
Makefile
Normal file
10
Makefile
Normal 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
9
abCalc.c
Normal 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
1
abCalcExpr.c
Normal file
@ -0,0 +1 @@
|
|||||||
|
#include "abCalcExpr.h"
|
28
abCalcExpr.h
Normal file
28
abCalcExpr.h
Normal 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
0
abCalcExprInt.c
Normal file
0
abCalcExprReal.c
Normal file
0
abCalcExprReal.c
Normal file
0
abCalcStack.c
Normal file
0
abCalcStack.c
Normal file
Loading…
Reference in New Issue
Block a user