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

easymesh: make hex colour command arguments case-insensitive.

File:
1 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; }
Note: See TracChangeset for help on using the changeset viewer.