diff --git a/make.red b/make.red index c65f7f4..f496ca5 100644 --- a/make.red +++ b/make.red @@ -26,19 +26,16 @@ Red [ } ] -unless exists? %parse-compiler.red [ - print "Downloading pre-built version of parse-compiler.red for bootstrap..." - write %parse-compiler.red read https://github.com/giesse/red-topaz-parse/releases/download/bootstrap.1/parse-compiler.red +unless exists? %compiled-rules.red [ + print "Downloading pre-built version of compiled-rules.red for bootstrap..." + write %compiled-rules.red read https://github.com/giesse/red-topaz-parse/releases/download/bootstrap.2/compiled-rules.red ] do %parse-compiler.red do %parse-parse.red -template: load %parse-compiler-template.red - -print "Building new parse-compiler.red..." +print "Building new compiled-rules.red..." compiled-rules: parse-compiler/compile-rules in parse-parse 'alternatives -change find/tail select template 'context [compiled-rules:] compiled-rules -write %parse-compiler.red mold/only template +write %compiled-rules.red mold/all compiled-rules print "All done!" diff --git a/parse-compiler-template.red b/parse-compiler.red similarity index 98% rename from parse-compiler-template.red rename to parse-compiler.red index 98cc948..ae64003 100644 --- a/parse-compiler-template.red +++ b/parse-compiler.red @@ -29,7 +29,10 @@ Red [ do %ast-tools.red parse-compiler: context [ - compiled-rules: [] + unless exists? %compiled-rules.red [ + do make error! "%compiled-rules.red missing. Please do %make.red first." + ] + compiled-rules: do load %compiled-rules.red compile-rules*: function [result name rules] [ compiled-rules/_collection: compiled-rules/_result: none