First commit

This commit is contained in:
GotPPay
2018-02-23 00:40:26 +01:00
commit f9a08ea8da
333 changed files with 50313 additions and 0 deletions

2203
ruby-grammar-editor/input Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,27 @@
#! /bin/ruby
lines = File.readlines("input")
File.open("output", "w") { |file|
#file.write("adding first line of text")
lines.each do |line|
if line.length == 1 then
file.puts()
else
start = line.index('\'')+1
finish = (line.length) - 4
subs = line[start..finish].to_s
newSubs = subs.gsub(/(.{1})(?=.)/, '\1 \2')
newSubs2 = ''
newSubs.split('').each do |ch|
if ((ch >= 'A' and ch <= 'Z') or (ch>= 'a' and ch<= 'z') or (ch == ' ')) then
newSubs2 = newSubs2 + ch
else
newSubs2 = newSubs2 + '\'' + ch + '\''
end
end
newLine = line[0..start-2] + newSubs2 + ';'
file.puts(newLine)
end
end
}