Permalink
Browse files

Add racc debugging ability.

  • Loading branch information...
ntalbott committed Dec 22, 2011
1 parent b6ee8e6 commit 1c3b3287377f751171918e3daba90ef0fe9d0c75
Showing with 3 additions and 1 deletion.
  1. +1 −1 Rakefile
  2. +1 −0 lib/gherkin/parser/gherkin.y
  3. +1 −0 lib/gherkin/parser/parser.rb
View
@@ -15,7 +15,7 @@ task :regenerate do
if has_rex && has_racc
`rex lib/gherkin/parser/gherkin.rex -o lib/gherkin/parser/lexer.rb`
- `racc lib/gherkin/parser/gherkin.y -o lib/gherkin/parser/parser.rb`
+ `racc #{'--debug' if ENV['DEBUG_RACC']} lib/gherkin/parser/gherkin.y -o lib/gherkin/parser/parser.rb`
else
puts "You need both Rexical and Racc to do that. Install them by doing:"
puts
@@ -96,5 +96,6 @@ end
---- inner
def parse(input)
+ @yydebug = true if ENV['DEBUG_RACC']
scan_str(input)
end

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit 1c3b328

Please sign in to comment.