This repository has been archived by the owner on Jun 15, 2019. It is now read-only.
forked from zaach/jison-lex
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
170 lines (115 loc) · 4.98 KB
/
Makefile
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
LEX = node ./dist/cli-cjs-es5.js
ROLLUP = node_modules/.bin/rollup
BABEL = node_modules/.bin/babel
MOCHA = node_modules/.bin/mocha
all: build test examples
prep: npm-install
npm-install:
npm install
npm-update:
ncu -a --packageFile=package.json
build:
node __patch_version_in_js.js
node __patch_lexer_kernel_in_js.js
-mkdir -p dist
$(ROLLUP) -c
$(BABEL) dist/regexp-lexer-cjs.js -o dist/regexp-lexer-cjs-es5.js
$(BABEL) dist/regexp-lexer-umd.js -o dist/regexp-lexer-umd-es5.js
$(ROLLUP) -c rollup.config-cli.js
$(BABEL) dist/cli-cjs.js -o dist/cli-cjs-es5.js
$(BABEL) dist/cli-umd.js -o dist/cli-umd-es5.js
node __patch_nodebang_in_js.js
test:
$(MOCHA) --timeout 18000 --check-leaks --globals assert tests/
examples: \
example-include \
example-lex \
examples_basic2_lex \
examples_basic_lex \
examples_c99 \
examples_ccalc_lex \
examples_classy \
examples_codegen_feature_tester_base \
examples_comments \
examples_compiled_calc_parse \
examples_faking \
examples_floop \
examples_handlebars \
examples_issue_url_lexing \
examples_issue_x1 \
examples_issue_x2 \
examples_lex_grammar \
examples_lexer_comm_debug \
examples_pascal \
examples_regex \
examples_semwhitespace \
examples_tikiwikiparser \
examples_unicode2 \
examples_unicode \
examples_with_custom_lexer \
examples_with_includes
example-lex:
$(LEX) examples/lex.l -o examples/output/ -x
example-include:
$(LEX) examples/with-includes.test.lex -o examples/output/ -x
examples_basic2_lex:
$(LEX) examples/basic2_lex.jison -o examples/output/ -x
examples_basic_lex:
$(LEX) examples/basic_lex.jison -o examples/output/ -x
examples_c99:
$(LEX) examples/c99.l -o examples/output/ -x
examples_ccalc_lex:
$(LEX) examples/ccalc-lex.l -o examples/output/ -x
examples_classy:
$(LEX) examples/classy.jisonlex -o examples/output/ -x
examples_codegen_feature_tester_base:
$(LEX) examples/codegen-feature-tester-base.jison -o examples/output/ -x
examples_comments:
$(LEX) examples/comments.jison -o examples/output/ -x
examples_compiled_calc_parse:
$(LEX) examples/compiled_calc_parse.jison -o examples/output/ -x
examples_faking:
$(LEX) examples/faking-multiple-start-rules-alt.jison -o examples/output/ -x
examples_floop:
$(LEX) examples/floop.l -o examples/output/ -x
examples_handlebars:
$(LEX) examples/handlebars.jison.l -o examples/output/ -x
examples_issue_x1:
$(LEX) examples/issue-19-jison_lex-fixed.jison -o examples/output/ -x
examples_issue_x2:
$(LEX) examples/issue-19-jison_lex.jison -o examples/output/ -x
examples_issue_url_lexing:
$(LEX) examples/issue-357-url-lexing.jison -o examples/output/ -x
examples_lex_grammar:
$(LEX) examples/lex_grammar.jisonlex -o examples/output/ -x
examples_lexer_comm_debug:
$(LEX) examples/parser-to-lexer-communication-test-w-debug.jison -o examples/output/ -x
examples_pascal:
$(LEX) examples/pascal.l -o examples/output/ -x
examples_regex:
$(LEX) examples/regex.jison -o examples/output/ -x
examples_semwhitespace:
$(LEX) examples/semwhitespace_lex.jison -o examples/output/ -x
examples_tikiwikiparser:
$(LEX) examples/tikiwikiparser.jison -o examples/output/ -x
examples_unicode:
$(LEX) examples/unicode.jison -o examples/output/ -x
examples_unicode2:
$(LEX) examples/unicode2.jison -o examples/output/ -x
examples_with_includes:
$(LEX) examples/with-includes.jison -o examples/output/ -x
examples_with_custom_lexer:
$(LEX) examples/with_custom_lexer.jison -o examples/output/ -x
# increment the XXX <prelease> number in the package.json file: version <major>.<minor>.<patch>-<prelease>
bump:
git-tag:
publish:
npm run pub
clean:
-rm -rf dist/
-rm -rf node_modules/
-rm -f package-lock.json
-rm -rf examples/output/
superclean: clean
-find . -type d -name 'node_modules' -exec rm -rf "{}" \;
.PHONY: all prep npm-install build test examples clean superclean bump git-tag publish example-lex example-include examples_basic2_lex examples_basic_lex examples_c99 examples_ccalc_lex examples_classy examples_codegen_feature_tester_base examples_comments examples_compiled_calc_parse examples_faking examples_floop examples_handlebars examples_issue_url_lexing examples_issue_x1 examples_issue_x2 examples_lex_grammar examples_lexer_comm_debug examples_pascal examples_regex examples_semwhitespace examples_tikiwikiparser examples_unicode2 examples_unicode examples_with_custom_lexer examples_with_includes