diff options
author | David Walter Seikel | 2012-01-05 04:47:56 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-01-05 04:47:56 +1000 |
commit | d4b977d0904a1dea37922dac60d3bb37f9769230 (patch) | |
tree | e5f23ddd6a6dd880f770c897fa9c11e67c4c79cf /LuaSL/build.sh | |
parent | Add a compiler stub. (diff) | |
download | SledjHamr-d4b977d0904a1dea37922dac60d3bb37f9769230.zip SledjHamr-d4b977d0904a1dea37922dac60d3bb37f9769230.tar.gz SledjHamr-d4b977d0904a1dea37922dac60d3bb37f9769230.tar.bz2 SledjHamr-d4b977d0904a1dea37922dac60d3bb37f9769230.tar.xz |
Add a simple flex + btyacc stub.
Will be fleshed out soon with LSL grammer.
Diffstat (limited to 'LuaSL/build.sh')
-rwxr-xr-x | LuaSL/build.sh | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/LuaSL/build.sh b/LuaSL/build.sh index 6aba3a0..9f2420b 100755 --- a/LuaSL/build.sh +++ b/LuaSL/build.sh | |||
@@ -51,7 +51,7 @@ names="LuaSL_main LuaSL_compile LuaSL_utilities" | |||
51 | 51 | ||
52 | EDJE_FLAGS="-id images -fd fonts" | 52 | EDJE_FLAGS="-id images -fd fonts" |
53 | 53 | ||
54 | rm -f LuaSL *.o *.edj | 54 | rm -f ../LuaSL ../LuaSL_parser *.o *.edj LuaSL_lexer.h LuaSL_lexer.c LuaSL_yaccer.h LuaSL_yaccer.tab.c |
55 | command="edje_cc $EDJE_FLAGS LuaSL.edc ../LuaSL.edj" | 55 | command="edje_cc $EDJE_FLAGS LuaSL.edc ../LuaSL.edj" |
56 | echo $command | 56 | echo $command |
57 | $command | 57 | $command |
@@ -69,3 +69,28 @@ command="gcc $CFLAGS -o ../LuaSL $objects $LDFLAGS $libs" | |||
69 | echo $command | 69 | echo $command |
70 | $command | 70 | $command |
71 | 71 | ||
72 | |||
73 | |||
74 | names="LuaSL_parser LuaSL_LSL_tree LuaSL_lexer LuaSL_yaccer.tab" | ||
75 | |||
76 | command="flex --outfile=LuaSL_lexer.c --header-file=LuaSL_lexer.h LuaSL_lexer.l" | ||
77 | echo $command | ||
78 | $command | ||
79 | |||
80 | command="btyacc -d -b LuaSL_yaccer -S btyacc-c.ske LuaSL_yaccer.y" | ||
81 | echo $command | ||
82 | $command | ||
83 | |||
84 | objects="" | ||
85 | for i in $names | ||
86 | do | ||
87 | command="gcc $CFLAGS -c -o ../$i.o $i.c" | ||
88 | echo $command | ||
89 | $command | ||
90 | objects="$objects ../$i.o" | ||
91 | done | ||
92 | |||
93 | command="gcc $CFLAGS -o ../LuaSL_parser $objects $LDFLAGS $libs" | ||
94 | echo $command | ||
95 | $command | ||
96 | |||