setup files for parser part

This commit is contained in:
Bilal Catic
2020-01-23 19:16:16 +01:00
parent 323e815d5f
commit cb93670a58
5 changed files with 38 additions and 7 deletions

View File

@@ -2,11 +2,19 @@ require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new do |c|
options = ['--color']
options += ["--format", "documentation"]
options += %w[--format documentation]
c.rspec_opts = options
end
desc "Generate Lexer"
desc 'Generate Lexer'
task :lexer do
`rex specification.rex -o lexer.rb`
end
end
desc 'Generate Parser'
task :parser do
`racc grammar.y -o parser.rb`
end
desc 'Generate Lexer and Parser'
task generate: %i[lexer parser]