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.12 2005/04/10 18:06:27 nilsson Exp $ +  * $Id: module.pmod,v 1.13 2007/04/05 08:35:18 grubba 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:442:    {    multiset(Item) items;       report(NOTICE, "do_goto",    "Performing GOTO on <%s>",    symbol_to_string(symbol));       items = symbol_items[symbol];    if (items) {    array(int) item_ids = [array(int)]map(sort(indices(items)->item_id), -  `+, 1); +  [function(int,int...:int)]`+, 1);    string kernel_hash = sprintf("%@4c", item_ids);       Kernel new_state = known_states[kernel_hash];       if (!new_state) {    known_states[kernel_hash] = new_state = Kernel();       foreach (indices(items), Item i) {    int|string lookahead;