Add Grammar::Rule class

This commit is contained in:
josh committed 2021-06-14 22:49:43 -04:00
1 parent 9d05861819
commit a34272dfd6
3 files changed
+21

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
module Imbecile
class Grammar
class Rule
def initialize(name, rule, code)
@name = name
rule_components = rule.split(/\s+/)
@components = rule_components
@code = code
end
end
end
end