Skip to content
Snippets Groups Projects
Select Git revision
1 result Searching

Grammar_parser.pmod

Blame
    • Henrik (Grubba) Grubbström's avatar
      705daf5e
      First version of LR(1) parser module. · 705daf5e
      Henrik (Grubba) Grubbström authored
      Rev: lib/modules/LR.pmod/Grammar_parser.pmod:1.1
      Rev: lib/modules/LR.pmod/item.pike:1.1
      Rev: lib/modules/LR.pmod/kernel.pike:1.1
      Rev: lib/modules/LR.pmod/lr.pike:1.1
      Rev: lib/modules/LR.pmod/parser.pike:1.1
      Rev: lib/modules/LR.pmod/priority.pike:1.1
      Rev: lib/modules/LR.pmod/rule.pike:1.1
      Rev: lib/modules/LR.pmod/scanner.pike:1.1
      705daf5e
      History
      First version of LR(1) parser module.
      Henrik (Grubba) Grubbström authored
      Rev: lib/modules/LR.pmod/Grammar_parser.pmod:1.1
      Rev: lib/modules/LR.pmod/item.pike:1.1
      Rev: lib/modules/LR.pmod/kernel.pike:1.1
      Rev: lib/modules/LR.pmod/lr.pike:1.1
      Rev: lib/modules/LR.pmod/parser.pike:1.1
      Rev: lib/modules/LR.pmod/priority.pike:1.1
      Rev: lib/modules/LR.pmod/rule.pike:1.1
      Rev: lib/modules/LR.pmod/scanner.pike:1.1
    aes.c 18.79 KiB
    /* aes.c
     *
     * The aes/rijndael block cipher.
     */
    
    /* nettle, low-level cryptographics library
     *
     * Copyright (C) 2000, 2001 Rafael R. Sevilla, Niels Mller
     *  
     * The nettle library is free software; you can redistribute it and/or modify
     * it under the terms of the GNU Lesser General Public License as published by
     * the Free Software Foundation; either version 2.1 of the License, or (at your
     * option) any later version.
     * 
     * The nettle library is distributed in the hope that it will be useful, but
     * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
     * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
     * License for more details.
     * 
     * You should have received a copy of the GNU Lesser General Public License
     * along with the nettle library; see the file COPYING.LIB.  If not, write to
     * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
     * MA 02111-1307, USA.
     */
    
    /* Originally written by Rafael R. Sevilla <dido@pacific.net.ph> */
    
    #include "aes.h"
    
    #include <assert.h>
    
    /* These tables combine both the S-boxes and the mixcolumn
     * transformation, so that we can perform a round's encryption or by
     * means of four table lookups and four XOR's per column of state.
     * They were generated by the makertbls.pl script. */
    static const uint32_t dtbl[] = {
      0xa56363c6, 0x847c7cf8, 0x997777ee, 0x8d7b7bf6, 
      0x0df2f2ff, 0xbd6b6bd6, 0xb16f6fde, 0x54c5c591, 
      0x50303060, 0x03010102, 0xa96767ce, 0x7d2b2b56, 
      0x19fefee7, 0x62d7d7b5, 0xe6abab4d, 0x9a7676ec, 
      0x45caca8f, 0x9d82821f, 0x40c9c989, 0x877d7dfa, 
      0x15fafaef, 0xeb5959b2, 0xc947478e, 0x0bf0f0fb, 
      0xecadad41, 0x67d4d4b3, 0xfda2a25f, 0xeaafaf45, 
      0xbf9c9c23, 0xf7a4a453, 0x967272e4, 0x5bc0c09b, 
      0xc2b7b775, 0x1cfdfde1, 0xae93933d, 0x6a26264c, 
      0x5a36366c, 0x413f3f7e, 0x02f7f7f5, 0x4fcccc83, 
      0x5c343468, 0xf4a5a551, 0x34e5e5d1, 0x08f1f1f9, 
      0x937171e2, 0x73d8d8ab, 0x53313162, 0x3f15152a, 
      0x0c040408, 0x52c7c795, 0x65232346, 0x5ec3c39d, 
      0x28181830, 0xa1969637, 0x0f05050a, 0xb59a9a2f, 
      0x0907070e, 0x36121224, 0x9b80801b, 0x3de2e2df, 
      0x26ebebcd, 0x6927274e, 0xcdb2b27f, 0x9f7575ea, 
      0x1b090912, 0x9e83831d, 0x742c2c58, 0x2e1a1a34, 
      0x2d1b1b36, 0xb26e6edc, 0xee5a5ab4, 0xfba0a05b, 
      0xf65252a4, 0x4d3b3b76, 0x61d6d6b7, 0xceb3b37d, 
      0x7b292952, 0x3ee3e3dd, 0x712f2f5e, 0x97848413, 
      0xf55353a6, 0x68d1d1b9, 0x00000000, 0x2cededc1, 
      0x60202040, 0x1ffcfce3, 0xc8b1b179, 0xed5b5bb6, 
      0xbe6a6ad4, 0x46cbcb8d, 0xd9bebe67, 0x4b393972, 
      0xde4a4a94, 0xd44c4c98, 0xe85858b0, 0x4acfcf85, 
      0x6bd0d0bb, 0x2aefefc5, 0xe5aaaa4f, 0x16fbfbed, 
      0xc5434386, 0xd74d4d9a, 0x55333366, 0x94858511, 
      0xcf45458a, 0x10f9f9e9, 0x06020204, 0x817f7ffe, 
      0xf05050a0, 0x443c3c78, 0xba9f9f25, 0xe3a8a84b, 
      0xf35151a2, 0xfea3a35d, 0xc0404080, 0x8a8f8f05, 
      0xad92923f, 0xbc9d9d21, 0x48383870, 0x04f5f5f1, 
      0xdfbcbc63, 0xc1b6b677, 0x75dadaaf, 0x63212142, 
      0x30101020, 0x1affffe5, 0x0ef3f3fd, 0x6dd2d2bf, 
      0x4ccdcd81, 0x140c0c18, 0x35131326, 0x2fececc3, 
      0xe15f5fbe, 0xa2979735, 0xcc444488, 0x3917172e,