diff options
Diffstat (limited to 'ext/ripper/tools/preproc.rb')
-rwxr-xr-x | ext/ripper/tools/preproc.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/ripper/tools/preproc.rb b/ext/ripper/tools/preproc.rb index 8b68579164..560a82e54f 100755 --- a/ext/ripper/tools/preproc.rb +++ b/ext/ripper/tools/preproc.rb @@ -72,9 +72,13 @@ def prelude(f, out) end end +require_relative "dsl" + def grammar(f, out) while line = f.gets case line + when %r</\*% *ripper(?:\[(.*?)\])?: *(.*?) *%\*/> + out << DSL.new($2, ($1 || "").split(",")).generate << $/ when %r</\*%%%\*/> out << '#if 0' << $/ when %r</\*%c%\*/> |