Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- grammar Mammoth
- rule primary
- string / number
- end
- rule number
- ([1-9] [0-9]* / '0') {
- def to_ruby(env={})
- text_value.to_i
- end
- }
- end
- rule string
- (['"] content:([^'"]+) ['"]) {
- def to_ruby(env={})
- content.text_value.to_s
- end
- }
- end
- end
Add Comment
Please, Sign In to add comment