# File lib/treetop/compiler/node_classes/character_class.rb, line 18 def grounded_regexp(string) # Double any backslashes, then backslash any single-quotes: "'\\G#{string.gsub(/\\/) { '\\\\' }.gsub(/'/) { "\\'"}}'" end