Skip to content

Commit

Permalink
Bump to 0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Phoenix committed Apr 6, 2011
1 parent 7f43673 commit 678097e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
17 changes: 3 additions & 14 deletions lib/kpeg/format_parser.rb
Expand Up @@ -2560,7 +2560,7 @@ def _eof
return _tmp
end

# root = statements - "\n"? eof_comment? eof
# root = statements - eof_comment? eof
def _root

_save = self.pos
Expand All @@ -2576,20 +2576,10 @@ def _root
break
end
_save1 = self.pos
_tmp = match_string("\n")
unless _tmp
_tmp = true
self.pos = _save1
end
unless _tmp
self.pos = _save
break
end
_save2 = self.pos
_tmp = apply(:_eof_comment)
unless _tmp
_tmp = true
self.pos = _save2
self.pos = _save1
end
unless _tmp
self.pos = _save
Expand Down Expand Up @@ -2828,8 +2818,7 @@ def _ast_root
Rules[:_statement] = rule_info("statement", "(- var:v \"(\" args:a \")\" - \"=\" - expression:o { @g.set(v, o, a) } | - var:v - \"=\" - expression:o { @g.set(v, o) } | - \"%\" var:name - \"=\" - < /[::A-Za-z0-9_]+/ > { @g.add_foreign_grammar(name, text) } | - \"%%\" - curly:act { @g.add_setup act } | - \"%%\" - var:name - \"=\" - < (!\"\\n\" .)+ > { @g.set_variable(name, text) })")
Rules[:_statements] = rule_info("statements", "statement (- statements)?")
Rules[:_eof] = rule_info("eof", "!.")
Rules[:_root] = rule_info("root", "statements - \"\\n\"? eof_comment? eof")
Rules[:_root] = rule_info("root", "statements - \"\\n\"? eof")
Rules[:_root] = rule_info("root", "statements - eof_comment? eof")
Rules[:_ast_constant] = rule_info("ast_constant", "< /[A-Z][A-Za-z0-9_]*/ > { text }")
Rules[:_ast_word] = rule_info("ast_word", "< /[A-Za-z_][A-Za-z0-9_]*/ > { text }")
Rules[:_ast_sp] = rule_info("ast_sp", "(\" \" | \"\\t\")*")
Expand Down
2 changes: 1 addition & 1 deletion lib/kpeg/version.rb
@@ -1,3 +1,3 @@
module KPeg
VERSION = "0.7.2"
VERSION = "0.8.0"
end

0 comments on commit 678097e

Please sign in to comment.