D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
proc
/
self
/
root
/
proc
/
self
/
root
/
opt
/
alt
/
ruby27
/
share
/
ruby
/
racc
/
Filename :
pre-setup
back
Copy
def generate_parser_text_rb(target) return if File.exist?(srcfile(target)) $stderr.puts "generating #{target}..." File.open(target, 'w') {|f| f.puts "module Racc" f.puts " PARSER_TEXT = <<'__end_of_file__'" f.puts File.read(srcfile('parser.rb')) f.puts "__end_of_file__" f.puts "end" } end generate_parser_text_rb 'parser-text.rb'