-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (33 loc) · 1.76 KB
/
Copy pathMakefile
File metadata and controls
43 lines (33 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
all: repetitive2 repetitive precedence simple
# HAPPY= cabal new-run happy:happy --
# HAPPY=./dist-newstyle/build/x86_64-linux/ghc-8.4.3/happy-1.20.0/build/happy/happy
HAPPY=happy-az
repetitive2 : parsers/Repetitive2.y templates
$(HAPPY) --ghc --incremental --debug --template=./happy-templates --info=Repetitive2.info \
--lr0 --action --goto --lookaheads \
-o generated-parsers/Repetitive2.hs \
parsers/Repetitive2.y
repetitive : parsers/Repetitive.y templates
$(HAPPY) --ghc --incremental --debug --template=./happy-templates --info=Repetitive.info \
--lr0 --action --goto --lookaheads \
-o generated-parsers/Repetitive.hs \
parsers/Repetitive.y
precedence : parsers/ExprPrecedence.y templates
$(HAPPY) --ghc --incremental --debug --template=./happy-templates --info=ExprPrecedence.info \
--lr0 --action --goto --lookaheads \
-o generated-parsers/ExprPrecedence.hs \
parsers/ExprPrecedence.y
simple : parsers/ExprSimple.y templates
$(HAPPY) --ghc --incremental --debug --template=./happy-templates --info=ExprSimple.info \
--lr0 --action --goto --lookaheads \
-o generated-parsers/ExprSimple.hs \
parsers/ExprSimple.y
.PHONY : templates
templates : happy-templates/IncrementalTemplate-ghc-debug
# happy-templates/HappyTemplate-incremental-ghc-debug: happy-templates/GenericTemplate.hs
happy-templates/IncrementalTemplate-ghc-debug: happy-templates/GenericTemplate.hs
ghc -cpp -E -DHAPPY_ARRAY -DHAPPY_GHC -DHAPPY_DEBUG -DHAPPY_INCR happy-templates/GenericTemplate.hs -o $@
sed -i -E "s/^# ([0-9]+ \".*\").*/{-# LINE \1 #-}/" $@
# ("HappyTemplate-arrays-ghc-debug" , ["-DHAPPY_ARRAY","-DHAPPY_GHC","-DHAPPY_DEBUG"]),
orig : parsers/ExprSimpleOrig.y
$(HAPPY) --ghc --array --debug --info=ExprSimpleOrig.info parsers/ExprSimpleOrig.y