Advertisement
Guest User

Untitled

a guest
Jan 24th, 2015
263
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. grammar ABC {
  2. token TOP { . "bc" . };
  3. };
  4.  
  5. say ABC.parse("abcd"); # abcd
  6.  
  7. token TOP { . "bc" .+ }; # abcd # .* is OK too
  8.  
  9. token TOP { .+ "bc" . }; # Any # .* Any too
  10.  
  11. # error?
  12. grammar ABC {
  13. token TOP { <noise> "bc" <noise> };
  14. token <noise> { . };
  15. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement