Changeset 13c63d8c0d85ad5e66f522a0a79f9bb68e084c30

Show
Ignore:
Timestamp:
06/16/2008 11:26:53 AM (2 months ago)
Author:
mitchell <mitchell@frost.(none)>
git-committer:
mitchell <mitchell@frost.(none)> 1213640813 -0400
git-parent:

[ab150902d8bf8e8a9205d721adf0f28017bc0ec0]

git-author:
mitchell <mitchell@frost.(none)> 1213640813 -0400
Message:

Fixed REXX parser to include nested block comments.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • ext/ohcount_native/ragel_parsers/rexx.rl

    r5c7d805 r13c63d8  
    4545  } 
    4646 
     47  action rexx_comment_nc_res { nest_count = 0; } 
     48  action rexx_comment_nc_inc { nest_count++; } 
     49  action rexx_comment_nc_dec { nest_count--; } 
     50 
    4751  rexx_comment = 
    48     '/*' @comment ( 
     52    '/*' >rexx_comment_nc_res @comment ( 
    4953      newline %{ entity = INTERNAL_NL; } %rexx_ccallback 
    5054      | 
    5155      ws 
    5256      | 
    53       (nonnewline - ws) @comment 
    54     )* :>> '*/'; 
     57      '/*' @rexx_comment_nc_inc @comment 
     58      | 
     59      '*/' @rexx_comment_nc_dec @comment 
     60      | 
     61      ^space @comment 
     62    )* :>> ('*/' when { nest_count == 0 }) @comment; 
    5563 
    5664  rexx_sq_str = '\'' @code ([^\r\n\f'\\] | '\\' nonnewline)* '\''; 
     
    93101  init 
    94102 
     103  int nest_count = 0; 
     104 
    95105  %% write init; 
    96106  cs = (count) ? rexx_en_rexx_line : rexx_en_rexx_entity;