lib/antelope/ace/scanner/second.rb in antelope-0.0.1 vs lib/antelope/ace/scanner/second.rb in antelope-0.1.0
- old
+ new
@@ -6,11 +6,11 @@
# file _only_ contains productions (or rules). Rules have a
# label and a body; the label may be any lowercase alphabetical
# identifier followed by a colon; the body consists of "parts",
# an "or", a "prec", and/or a "block". The part may consist
# of any alphabetical characters. An or is just a vertical bar
- # (`|`). A prec is a presidence declaraction, which is `%prec `
+ # (`|`). A prec is a precedence declaraction, which is `%prec `
# followed by any alphabetical characters. A block is a `{`,
# followed by code, followed by a terminating `}`. Rules _may_
# be terminated by a semicolon, but this is optional.
module Second
@@ -98,10 +98,10 @@
if @scanner.scan(/\|/)
tokens << [:or]
end
end
- # Attempts to scan a presidence definition. A presidence
+ # Attempts to scan a precedence definition. A precedence
# definition is "%prec " followed by a terminal or nonterminal.
#
# @return [Boolean] if it matched.
def scan_second_rule_prec
if @scanner.scan(/%prec ([A-Za-z]+)/)