Show
Ignore:
Timestamp:
05/14/09 04:40:35 (5 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1242276035 +0000
git-parent:

[12ceece32357a2a20de62a92a67a2ee71ae72917]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1242276035 +0000
Message:

fixes #126

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/noit_tokenizer.c

    r6210da7 r88a7178  
    1 /* Generated by re2c 0.13.2 on Tue Mar 17 15:37:18 2009 */ 
     1/* Generated by re2c 0.12.3 on Thu May 14 00:29:12 2009 */ 
    22#line 1 "noit_tokenizer.re" 
     3/* 
     4 * Copyright (c) 2007, OmniTI Computer Consulting, Inc. 
     5 * All rights reserved. 
     6 * 
     7 * Redistribution and use in source and binary forms, with or without 
     8 * modification, are permitted provided that the following conditions are 
     9 * met: 
     10 *  
     11 *     * Redistributions of source code must retain the above copyright 
     12 *       notice, this list of conditions and the following disclaimer. 
     13 *     * Redistributions in binary form must reproduce the above 
     14 *       copyright notice, this list of conditions and the following 
     15 *       disclaimer in the documentation and/or other materials provided 
     16 *       with the distribution. 
     17 *     * Neither the name OmniTI Computer Consulting, Inc. nor the names 
     18 *       of its contributors may be used to endorse or promote products 
     19 *       derived from this software without specific prior written 
     20 *       permission. 
     21 *  
     22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
     23 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
     24 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
     25 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
     26 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
     27 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
     28 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
     29 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
     30 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
     31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
     32 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
     33 */ 
     34 
    335#include "noit_defines.h" 
    436#include <stdlib.h> 
     
    4880 mainpattern: 
    4981 
    50 #line 51 "noit_tokenizer.c" 
     82#line 83 "noit_tokenizer.c" 
    5183        { 
    5284                unsigned char yych; 
    5385 
    5486                yych = (unsigned char)*t->next; 
    55                 switch (yych) { 
     87                switch(yych) { 
    5688                case 0x00:      goto yy10; 
    5789                case 0x09: 
     
    68100                goto yy17; 
    69101yy3: 
    70 #line 54 "noit_tokenizer.re" 
     102#line 86 "noit_tokenizer.re" 
    71103                { t->token = NULL; 
    72104                      t->end = t->next; 
    73105                      t->type = NT_SPACE; 
    74106                      return 1; } 
    75 #line 76 "noit_tokenizer.c" 
     107#line 108 "noit_tokenizer.c" 
    76108yy4: 
    77109                ++t->next; 
    78 #line 58 "noit_tokenizer.re" 
     110#line 90 "noit_tokenizer.re" 
    79111                { t->type = NT_DQSTRING; 
    80112                      if(t->start != t->end) { 
     
    89121                        goto dqstring; 
    90122                    } 
    91 #line 92 "noit_tokenizer.c" 
     123#line 124 "noit_tokenizer.c" 
    92124yy6: 
    93125                ++t->next; 
    94 #line 70 "noit_tokenizer.re" 
     126#line 102 "noit_tokenizer.re" 
    95127                { t->type = NT_IDENT; 
    96128                      if(t->start != t->end) { 
     
    104136                        goto sqstring; 
    105137                    } 
    106 #line 107 "noit_tokenizer.c" 
     138#line 139 "noit_tokenizer.c" 
    107139yy8: 
    108140                ++t->next; 
     
    110142                goto yy13; 
    111143yy9: 
    112 #line 82 "noit_tokenizer.re" 
     144#line 114 "noit_tokenizer.re" 
    113145                { char only = ' '; 
    114146                      t->end = t->next; 
     
    119151                      return 1; 
    120152                    } 
    121 #line 122 "noit_tokenizer.c" 
     153#line 154 "noit_tokenizer.c" 
    122154yy10: 
    123155                ++t->next; 
    124 #line 90 "noit_tokenizer.re" 
     156#line 122 "noit_tokenizer.re" 
    125157                { t->token = NULL; 
    126158                      t->type = NT_EOF; 
    127159                      return 0; 
    128160                    } 
    129 #line 130 "noit_tokenizer.c" 
     161#line 162 "noit_tokenizer.c" 
    130162yy12: 
    131163                ++t->next; 
    132164                yych = (unsigned char)*t->next; 
    133165yy13: 
    134                 switch (yych) { 
     166                switch(yych) { 
    135167                case 0x00: 
    136168                case 0x09: 
     
    144176                ++t->next; 
    145177                yych = (unsigned char)*t->next; 
    146                 switch (yych) { 
     178                switch(yych) { 
    147179                case 0x00: 
    148180                case 0x09: 
     
    156188                yych = (unsigned char)*t->next; 
    157189yy17: 
    158                 switch (yych) { 
     190                switch(yych) { 
    159191                case 0x09: 
    160192                case 0x0A: 
     
    164196                } 
    165197        } 
    166 #line 95 "noit_tokenizer.re" 
     198#line 127 "noit_tokenizer.re" 
    167199 
    168200 
    169201 sqstring: 
    170202 
    171 #line 172 "noit_tokenizer.c" 
     203#line 204 "noit_tokenizer.c" 
    172204        { 
    173205                unsigned char yych; 
    174206                yych = (unsigned char)*t->next; 
    175                 switch (yych) { 
     207                switch(yych) { 
    176208                case 0x00:      goto yy23; 
    177209                case '\'':      goto yy20; 
     
    179211                } 
    180212yy20: 
    181 #line 99 "noit_tokenizer.re" 
     213#line 131 "noit_tokenizer.re" 
    182214                { t->end = t->next; 
    183215                      goto mainpattern; } 
    184 #line 185 "noit_tokenizer.c" 
     216#line 217 "noit_tokenizer.c" 
    185217yy21: 
    186218                ++t->next; 
    187219                yych = (unsigned char)*t->next; 
    188                 switch (yych) { 
     220                switch(yych) { 
    189221                case 0x00: 
    190222                case '\'':      goto yy20; 
     
    193225yy23: 
    194226                ++t->next; 
    195 #line 101 "noit_tokenizer.re" 
     227#line 133 "noit_tokenizer.re" 
    196228                { BAIL_UNKNOWN; } 
    197 #line 198 "noit_tokenizer.c" 
     229#line 230 "noit_tokenizer.c" 
    198230        } 
    199 #line 102 "noit_tokenizer.re" 
     231#line 134 "noit_tokenizer.re" 
    200232 
    201233 
    202234 dqstring: 
    203235 
    204 #line 205 "noit_tokenizer.c" 
     236#line 237 "noit_tokenizer.c" 
    205237        { 
    206238                unsigned char yych; 
    207239                yych = (unsigned char)*t->next; 
    208                 switch (yych) { 
     240                switch(yych) { 
    209241                case 0x00:      goto yy33; 
    210242                case '"':       goto yy29; 
     
    214246yy27: 
    215247                yych = (unsigned char)*++t->next; 
    216                 switch (yych) { 
     248                switch(yych) { 
    217249                case 0x00:      goto yy28; 
    218250                case '"': 
     
    231263yy29: 
    232264                ++t->next; 
    233 #line 110 "noit_tokenizer.re" 
     265#line 142 "noit_tokenizer.re" 
    234266                { t->end = t->next--; 
    235267                      goto mainpattern; 
    236268                    } 
    237 #line 238 "noit_tokenizer.c" 
     269#line 270 "noit_tokenizer.c" 
    238270yy31: 
    239271                ++t->next; 
    240 #line 113 "noit_tokenizer.re" 
     272#line 145 "noit_tokenizer.re" 
    241273                { goto dqstring; } 
    242 #line 243 "noit_tokenizer.c" 
     274#line 275 "noit_tokenizer.c" 
    243275yy33: 
    244276                ++t->next; 
    245 #line 114 "noit_tokenizer.re" 
     277#line 146 "noit_tokenizer.re" 
    246278                { BAIL_UNKNOWN; } 
    247 #line 248 "noit_tokenizer.c" 
     279#line 280 "noit_tokenizer.c" 
    248280yy35: 
    249281                ++t->next; 
    250 #line 109 "noit_tokenizer.re" 
     282#line 141 "noit_tokenizer.re" 
    251283                { goto dqstring; } 
    252 #line 253 "noit_tokenizer.c" 
     284#line 285 "noit_tokenizer.c" 
    253285yy37: 
    254286                ++t->next; 
    255 #line 107 "noit_tokenizer.re" 
     287#line 139 "noit_tokenizer.re" 
    256288                { goto dqstring; } 
    257 #line 258 "noit_tokenizer.c" 
     289#line 290 "noit_tokenizer.c" 
    258290        } 
    259 #line 115 "noit_tokenizer.re" 
     291#line 147 "noit_tokenizer.re" 
    260292 
    261293}