Changeset 4571 for src/pge

Show
Ignore:
Timestamp:
06/12/05 22:41:00 (4 years ago)
Author:
putter
svk:copy_cache_prev:
6338
Message:

Parse non-capturing subrules <?foo>, and subrule names with ":" and ".". Updated tests.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/pge/PGE/P6Rule.pir

    r3079 r4571  
    350350    pos = lex["pos"] 
    351351    $I0 = pos 
     352    $S0 = substr pattern, pos, 1 
     353    unless $S0 == '?' goto subrule_1 
     354    inc pos 
     355    inc $I0 
    352356  subrule_1: 
    353357    $I1 = is_wordchar pattern, pos  
    354     unless $I1 goto subrule_2 
     358    unless $I1 goto subrule_1b 
     359  subrule_1_inc: 
    355360    inc pos 
    356361    goto subrule_1 
     362  subrule_1b: 
     363    $S0 = substr pattern, pos, 1 
     364    if $S0 == '.' goto subrule_1_inc 
     365    if $S0 == ':' goto subrule_1_inc 
    357366  subrule_2: 
    358367    $I1 = pos - $I0