raise NotImplementedException
class PLex(element.Element):
+ # internal classes
class StartCondition(element.Element):
# GENERATE ELEMENT(str name, bool exclusive, int eof_action) BEGIN
def __init__(
return 'ast.PLex.StartCondition({0:s})'.format(', '.join(params))
# GENERATE END
+ # syntax classes
class Name(element.Element):
# GENERATE ELEMENT() BEGIN
def __init__(
all: cal flex0 flex1
-cal: y.tab.c lex.yy.c
- gcc -o $@ $<
+# cal program
+cal: y.tab.o
+ ${CC} -o $@ $<
+
+y.tab.o: y.tab.c lex.yy.c
+
+y.tab.c: cal.y
+ ../../bootstrap_bison.git/src/bison -y $< 2>$<.xml
lex.yy.c: cal.l
../../bootstrap_flex.git/src/flex -o /dev/null $< 2>$<.xml
#cp $@ $@.orig
#patch $@ <$@.patch
-y.tab.c: cal.y
- ../../bootstrap_bison.git/src/bison -y $< 2>$<.xml
-
-flex0: flex0.c
+# flex0 program
+flex0: flex0.o
gcc -o $@ $< -ll
+flex0.o: flex0.c
+
flex0.c: flex0.l
../../bootstrap_flex.git/src/flex -o /dev/null $< 2>$<.xml
../bootstrap_plex.py -o $@ $<.xml
-flex1: flex1.c
+# flex1 program
+flex1: flex1.o
gcc -o $@ $< -ll
+flex1.o: flex1.c
+
flex1.c: flex1.l
../../bootstrap_flex.git/src/flex -o /dev/null $< 2>$<.xml
../bootstrap_plex.py -o $@ $<.xml
+
+# other
+clean:
+ rm -f *.c *.o *.xml cal flex0 flex1