© Copyright 2005 Peri Hankey - documentation license Gnu FDL - code license Gnu GPL- validate HTML
SourceForge.net Logo anbncn

anbncn.lmn: this file is (C) Copyright 2006 Peri Hankey (mpah@users.sourceforge.net). This text is published under the terms of the Gnu General Program License, and comes with absolutely no warranty.


S : | abc | aSBc.
cB: Bc.
bB: bb.

 .anbncn()
  say out         <-  eof -;
  -               <-  eof - say "no\n"  eof;
  - _S ';'        <-  eof - say "yes\n" eof;
  -               <-  _S;      // null case
  'a' _b  'c'     <-  _S;      // as standard rules, with non-terminal for 'b'
  'a' _S  _B 'c'  <-  _S;      // as standard rules
  _B  'c'         <- 'c' _B;   // as standard rules 
  'b' _b          <- _b _B;    // as standard rules, with non-terminal for 'b'
  'b'             <- _b;       // allow 'b' as _b
home