*** empty log message ***

This commit is contained in:
hyung-hwan 2006-01-15 06:51:35 +00:00
parent f0f0ca69ea
commit 0f8a82de49
3 changed files with 29 additions and 10 deletions

View File

@ -1,7 +1,5 @@
SRCS = stx.c memory.c object.c symbol.c class.c dict.c misc.c array.c \
context.c name.c token.c parser.c bootstrp.c bytecode.c interp.c
OBJS = stx.obj memory.obj object.obj symbol.obj class.obj dict.obj misc.obj array.obj \
context.obj name.obj token.obj parser.obj bootstrp.obj bytecode.obj interp.obj
SRCS = awk.c parse.c tree.c
OBJS = awk.obj parse.obj tree.obj
OUT = xpawk.lib
CC = lcc

View File

@ -1,5 +1,5 @@
/*
* $Id: tree.c,v 1.2 2006-01-14 16:09:57 bacon Exp $
* $Id: tree.c,v 1.3 2006-01-15 06:51:35 bacon Exp $
*/
#include <xp/awk/awk.h>
@ -108,16 +108,17 @@ static void __print_statements (xp_awk_node_t* tree, int depth)
__print_tabs (depth);
xp_printf (XP_TEXT("if ("));
__print_expr_node (((xp_awk_node_if_t*)p)->test);
xp_printf (XP_TEXT(") "));
xp_printf (XP_TEXT(")\n"));
// TODO: identation of depth + 1 if then_part or else_part is not a block
if (((xp_awk_node_if_t*)p)->then_part == XP_NULL)
xp_printf (XP_TEXT(";\n"));
else __print_statements (((xp_awk_node_if_t*)p)->then_part, 0);
xp_printf (XP_TEXT(";\n"));
else __print_statements (((xp_awk_node_if_t*)p)->then_part, depth);
if (((xp_awk_node_if_t*)p)->else_part != XP_NULL) {
__print_tabs (depth);
xp_printf (XP_TEXT("else "));
__print_statements (((xp_awk_node_if_t*)p)->else_part, 0);
xp_printf (XP_TEXT("else\n"));
__print_statements (((xp_awk_node_if_t*)p)->else_part, depth);
}
break;

20
ase/test/awk/Makefile.lcc Normal file
View File

@ -0,0 +1,20 @@
CC = lcc
CFLAGS = -I../../.. -A -ansic -libcdll
#LDFLAGS = -L../../../xp/bas -L../../../xp/awk
#LIBS = -lxpawk -lxpbas
#LDFLAGS = -subsystem console -dynamic -s
LDFLAGS = -subsystem console -s
LIBS = ..\..\..\xp\awk\xpawk.lib ..\..\..\xp\bas\xpbas.lib
all: awk
awk: awk.obj
lcclnk $(LDFLAGS) -o awk.exe awk.obj $(LIBS)
clean:
del $(OBJS) *.obj $(OUT)
.SUFFIXES: .c .obj
.c.obj:
$(CC) $(CFLAGS) -c $<