lib/antelope/ace/scanner/second.rb in antelope-0.2.2 vs lib/antelope/ace/scanner/second.rb in antelope-0.2.3
- old
+ new
@@ -30,11 +30,12 @@
def scan_second_part
scanner.scan(CONTENT_BOUNDRY) or error!
tokens << [:second]
until @scanner.check(CONTENT_BOUNDRY)
- scan_second_rule || scan_whitespace || error!
+ scan_second_rule || scan_whitespace || scan_comment ||
+ error!
end
end
# Scans a rule. A rule consists of a label (the nonterminal
# the production is for), a body, and a block; and then,
@@ -75,10 +76,10 @@
def scan_second_rule_body
body = true
while body
scan_second_rule_prec || scan_second_rule_part ||
scan_second_rule_or || scan_second_rule_block ||
- scan_whitespace || (body = false)
+ scan_whitespace || scan_comment || (body = false)
end
@scanner.scan(/;/)
end
# Attempts to scan a "part". A part is any series of