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$ -  * +     * 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:196:       //! Create a new error handler.    //!    //! @param verbosity    //! Level of verbosity.    //!    //! @seealso    //! @[verbose]    protected void create(int(-1..1)|void verbosity)    { -  if (!zero_type(verbosity)) { +  if (!undefinedp(verbosity))    verbose = verbosity;    }   } - } +       //! This object implements an LALR(1) parser and compiler.   //!   //! Normal use of this object would be:   //!   //! @pre{   //! set_error_handler   //! {add_rule, set_priority, set_associativity}*   //! set_symbol_to_string   //! compile
pike.git/lib/modules/Parser.pmod/LR.pmod/module.pmod:625:       string cast_to_string()    {    return _sprintf();    }       //! Implements casting.    //!    //! @param type    //! Type to cast to. -  mixed cast(string type) +  protected mixed cast(string type)    {    if (type == "string")    return _sprintf(); -  error("Cast to %s not supported\n", type); +  return UNDEFINED;    }       /* Here come the functions that actually do some work */       //! Sets the priority of a terminal.    //!    //! @param terminal    //! Terminal to set the priority for.    //! @param pri_val    //! Priority; higher = prefer this terminal.