Branch: Tag:

2002-05-24

2002-05-24 15:35:15 by Henrik Grubbström (Grubba) <grubba@grubba.org>

ErrorHandler now has a create(), to allow for easier setting of the verbosity level.

Rev: lib/modules/Parser.pmod/LR.pmod/module.pmod:1.8

1:   /* -  * $Id: module.pmod,v 1.7 2002/05/24 14:36:28 grubba Exp $ +  * $Id: module.pmod,v 1.8 2002/05/24 15:35:15 grubba Exp $    *    * A BNF-grammar in Pike.    * Compiles to a LALR(1) state-machine.
180:    //! @value 1    //! Also notices.    //! @endint -  optional int verbose=1; +  optional int(-1..1) verbose = 1;       static constant severity_kind = ([ NOTICE:"Notice",    WARNING:"Warning",
194:    severity_kind[level], subsystem, @args);    }    } +  +  //! Create a new error handler. +  //! +  //! @param verbosity +  //! Level of verbosity. +  //! +  //! @seealso +  //! @[verbose] +  static void create(int(-1..1)|void verbosity) +  { +  if (!zero_type(verbosity)) { +  verbose = verbosity;    } -  +  } + }      //! This object implements an LALR(1) parser and compiler.   //!