Show
Ignore:
Timestamp:
07/05/07 04:03:51 (17 months ago)
Author:
krobillard
Message:

Added component! & lit-select! datatypes.
ur_makeBlockT() now has a ptr return argument.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/thune/thread_safe/tokenize.c

    r408 r426  
    539539    } 
    540540 
     541    mode = UT_LITWORD; 
     542 
    541543    SCAN_LOOP 
    542         if( ur_bitIsSet( charset_delimiters, ch ) )   // '[' 'word[] 
     544        if( ch == '/' ) 
     545        { 
     546            mode = UT_LITSELECT; 
     547        } 
     548        else if( ur_bitIsSet( charset_delimiters, ch ) )   // '[' 'word[] 
     549        { 
    543550            break; 
     551        } 
    544552    SCAN_END 
    545553 
     
    549557        if( it == token ) 
    550558            goto quote_err; 
    551         cell = ur_appendWord( BLOCK, UT_LITWORD, token, it - token ); 
     559        if( mode == UT_LITWORD ) 
     560        { 
     561            cell = ur_appendWord( BLOCK, UT_LITWORD, token, it - token ); 
     562        } 
     563        else 
     564        { 
     565            cell = ur_appendCell( BLOCK, UT_UNSET ); 
     566            if( ! ur_makeSelector( ut, cell, token, it ) ) 
     567            { 
     568                syntaxError( "Invalid lit-select" ); 
     569            } 
     570            ur_type(cell) = UT_LITSELECT; 
     571        } 
    552572        goto set_eol; 
    553573    } 
     
    591611#endif 
    592612 
    593     mode = (ch == '\'') ? UT_LITWORD : UT_WORD; 
     613    mode = UT_WORD; 
    594614 
    595615    SCAN_LOOP 
    596         if( ch == ':' /*&& (mode != UT_LITWORD)*/ ) 
     616        if( ch == ':' ) 
    597617        { 
    598618            mode = WORD_COLON; 
     
    638658            if( ! ur_makeSelector( ut, cell, token, it ) ) 
    639659            { 
    640                 syntaxError( "Invalid selector" ); 
     660                syntaxError( "Invalid select" ); 
    641661            } 
    642662        }