pike.git / lib / modules / Parser.pmod / LR.pmod / module.pmod

version» Context lines:

pike.git/lib/modules/Parser.pmod/LR.pmod/module.pmod:1:   /* -  * $Id: module.pmod,v 1.9 2002/06/12 19:28:58 jhs Exp $ +  * $Id: module.pmod,v 1.10 2002/06/14 14:32:04 nilsson Exp $    *    * A BNF-grammar in Pike.    * Compiles to a LALR(1) state-machine.    *    * Henrik Grubbström 1996-11-24    */      #pike __REAL_VERSION__      /*! LALR(1) parser generator
pike.git/lib/modules/Parser.pmod/LR.pmod/module.pmod:115:       //! Create a BNF rule.    //!    //! @example    //! The rule    //!    //! rule : nonterminal ":" symbols ";" { add_rule };    //!    //! might be created as    //! -  //! rule(4, ({ 9, ";", 5, ";" }), "add_rule"); +  //! rule(4, ({ 9, ":", 5, ";" }), "add_rule");    //!    //! where 4 corresponds to the nonterminal "rule", 9 to "nonterminal"    //! and 5 to "symbols", and the function "add_rule" is too be called    //! when this rule is reduced.    //!    //! @param nt    //! Non-terminal to reduce to.    //! @param r    //! Symbol sequence that reduces to nt.    //! @param a