Ghost Wheel supports look-ahead rules, but I haven't yet added them into the grammar syntax. If you are using the Ruby DSL though, you can create them as shown in these tests:
assert_equal( LookAhead.new(Literal.new("one")),
@builder.look(@builder.lit("one")) )
assert_equal( LookAhead.new(Literal.new("one"), true),
@builder.nlook(@builder.lit("one")) )
assert_equal( LookAhead.new(Literal.new("one"), true),
@builder.look(true, @builder.lit("one")) )
assert_equal( LookAhead.new(Literal.new("one"), true),
@builder.look(@builder.lit("one"), true) )
Basically, you want the nlook() method.
|