Changeset 1738


Ignore:
Timestamp:
Aug 14, 2012, 1:47:48 PM (11 years ago)
Author:
sam
Message:

easymesh: make hex colour command arguments case-insensitive.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/easymesh/easymesh-scanner.l

    r1619 r1738  
    8484acg   { return token::T_COG; }
    8585
    86 #[0-9a-f]{3} {
     86#[0-9a-fA-F]{3} {
    8787        uint32_t tmp = std::strtol(yytext + 1, NULL, 16);
    8888        yylval->u32val = 0x11000000u * (tmp >> 8)
     
    9191                       | 0x000000ffu;
    9292        return token::COLOR; }
    93 #[0-9a-f]{4} {
     93#[0-9a-fA-F]{4} {
    9494        uint32_t tmp = std::strtol(yytext + 1, NULL, 16);
    9595        yylval->u32val = 0x11000000u * (tmp >> 12)
     
    9898                       | 0x00000011u * (tmp & 0xf);
    9999        return token::COLOR; }
    100 #[0-9a-f]{6} {
     100#[0-9a-fA-F]{6} {
    101101        yylval->u32val = 0xffu
    102102                       | 0x100u * (uint32_t)std::strtol(yytext + 1, NULL, 16);
    103103        return token::COLOR; }
    104 #[0-9a-f]{8} {
     104#[0-9a-fA-F]{8} {
    105105        yylval->u32val = (uint32_t)std::strtol(yytext + 1, NULL, 16);
    106106        return token::COLOR; }
  • trunk/src/generated/easymesh-scanner.cpp

    r1619 r1738  
    360360        1,    1,    5,    3,    6,    7,    1,    8,    8,    8,
    361361        8,    8,    8,    8,    8,    8,    8,    1,    1,    1,
    362         1,    1,    1,    1,    1,    1,    1,    1,    9,    1,
     362        1,    1,    1,    1,    9,    9,    9,    9,   10,    9,
    363363        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
    364364        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
    365        10,    1,   11,    1,    1,    1,   12,   13,   14,   15,
    366 
    367        16,   17,   18,   19,    1,    1,    1,    1,   20,    1,
    368         1,   21,   22,   23,   24,   25,    1,    1,    1,   26,
    369        27,   28,    1,    1,    1,    1,    1,    1,    1,    1,
     365       11,    1,   12,    1,    1,    1,   13,   14,   15,   16,
     366
     367       17,   18,   19,   20,    1,    1,    1,    1,   21,    1,
     368        1,   22,   23,   24,   25,   26,    1,    1,    1,   27,
     369       28,   29,    1,    1,    1,    1,    1,    1,    1,    1,
    370370        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
    371371        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
     
    384384    } ;
    385385
    386 static yyconst flex_int32_t yy_meta[29] =
     386static yyconst flex_int32_t yy_meta[30] =
    387387    {   0,
    388         1,    1,    1,    1,    1,    1,    1,    2,    1,    1,
    389         1,    2,    2,    2,    2,    2,    2,    1,    1,    1,
    390         1,    1,    1,    1,    1,    1,    1,    1
     388        1,    1,    1,    1,    1,    1,    1,    2,    2,    2,
     389        1,    1,    2,    2,    2,    2,    2,    2,    1,    1,
     390        1,    1,    1,    1,    1,    1,    1,    1,    1
    391391    } ;
    392392
    393393static yyconst flex_int16_t yy_base[80] =
    394394    {   0,
    395         0,    0,   96,   97,   97,   97,    0,   22,   24,   87,
    396        26,   97,   97,   30,   75,   10,   13,   34,   37,    0,
    397        85,   50,   59,   45,   97,   58,   97,   68,   77,   97,
    398        57,   97,   97,   97,   97,   97,   97,   97,   97,   77,
    399        97,   97,   97,   46,   97,   97,   97,    0,   81,   80,
    400        66,   97,   97,   73,   72,   65,   97,   97,   97,   97,
    401         0,   97,   97,   97,   97,    0,    0,    0,    0,   97,
    402        97,   81,   80,   79,   78,   77,   75,   67,   54
     395        0,    0,   97,   98,   98,   98,    0,   23,   25,   88,
     396       27,   98,   98,   31,   75,   11,   14,   35,   38,    0,
     397       86,   51,   61,   47,   98,   57,   98,   68,   77,   98,
     398       57,   98,   98,   98,   98,   98,   98,   98,   98,   77,
     399       98,   98,   98,   46,   98,   98,   98,    0,   82,   81,
     400       66,   98,   98,   73,   72,   65,   98,   98,   98,   98,
     401        0,   98,   98,   98,   98,    0,    0,    0,    0,   98,
     402       98,   82,   81,   80,   79,   78,   75,   58,   34
    403403    } ;
    404404
     
    415415    } ;
    416416
    417 static yyconst flex_int16_t yy_nxt[126] =
     417static yyconst flex_int16_t yy_nxt[128] =
    418418    {   0,
    419         4,    5,    6,    7,    8,    9,   10,   11,    4,   12,
    420        13,   14,    4,   15,    4,    4,    4,    4,    4,   16,
    421         4,    4,   17,   18,   19,    4,    4,    4,   21,   22,
    422        21,   22,   21,   22,   24,   34,   35,   36,   37,   38,
    423        39,   24,   25,   26,   27,   28,   29,   40,   44,   49,
    424        49,   30,   50,   31,   32,   70,   21,   22,   24,   41,
    425        42,   43,   45,   46,   47,   24,   23,   24,   69,   51,
    426        55,   58,   59,   60,   24,   52,   68,   56,   67,   66,
    427        61,   48,   20,   65,   64,   63,   62,   50,   50,   57,
    428        54,   53,   23,   33,   23,   71,    3,   71,   71,   71,
     419        4,    5,    6,    7,    8,    9,   10,   11,    4,    4,
     420       12,   13,   14,    4,   15,    4,    4,    4,    4,    4,
     421       16,    4,    4,   17,   18,   19,    4,    4,    4,   21,
     422       22,   21,   22,   21,   22,   70,   24,   34,   35,   36,
     423       37,   38,   39,   24,   25,   26,   27,   28,   29,   40,
     424       44,   49,   49,   30,   50,   31,   32,   21,   22,   69,
     425       24,   41,   42,   43,   45,   46,   47,   24,   23,   51,
     426       24,   55,   58,   59,   60,   52,   68,   24,   56,   67,
     427       66,   61,   48,   20,   65,   64,   63,   62,   50,   50,
     428       57,   54,   53,   23,   33,   23,   71,    3,   71,   71,
    429429
    430430       71,   71,   71,   71,   71,   71,   71,   71,   71,   71,
    431431       71,   71,   71,   71,   71,   71,   71,   71,   71,   71,
    432        71,   71,   71,   71,   71
     432       71,   71,   71,   71,   71,   71,   71
    433433    } ;
    434434
    435 static yyconst flex_int16_t yy_chk[126] =
     435static yyconst flex_int16_t yy_chk[128] =
    436436    {   0,
    437437        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
    438438        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
    439         1,    1,    1,    1,    1,    1,    1,    1,    8,    8,
    440         9,    9,   11,   11,   11,   16,   16,   16,   17,   17,
    441        17,   11,   14,   14,   14,   14,   14,   18,   19,   24,
    442        24,   14,   24,   14,   14,   79,   22,   22,   22,   18,
    443        18,   18,   19,   19,   19,   22,   23,   23,   78,   26,
    444        31,   44,   44,   44,   23,   26,   77,   31,   76,   75,
    445        74,   73,   72,   56,   55,   54,   51,   50,   49,   40,
    446        29,   28,   21,   15,   10,    3,   71,   71,   71,   71,
     439        1,    1,    1,    1,    1,    1,    1,    1,    1,    8,
     440        8,    9,    9,   11,   11,   79,   11,   16,   16,   16,
     441       17,   17,   17,   11,   14,   14,   14,   14,   14,   18,
     442       19,   24,   24,   14,   24,   14,   14,   22,   22,   78,
     443       22,   18,   18,   18,   19,   19,   19,   22,   23,   26,
     444       23,   31,   44,   44,   44,   26,   77,   23,   31,   76,
     445       75,   74,   73,   72,   56,   55,   54,   51,   50,   49,
     446       40,   29,   28,   21,   15,   10,    3,   71,   71,   71,
    447447
    448448       71,   71,   71,   71,   71,   71,   71,   71,   71,   71,
    449449       71,   71,   71,   71,   71,   71,   71,   71,   71,   71,
    450        71,   71,   71,   71,   71
     450       71,   71,   71,   71,   71,   71,   71
    451451    } ;
    452452
Note: See TracChangeset for help on using the changeset viewer.