Changeset 13c63d8c0d85ad5e66f522a0a79f9bb68e084c30
- 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
| r5c7d805 |
r13c63d8 |
|
| 45 | 45 | } |
|---|
| 46 | 46 | |
|---|
| | 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 | |
|---|
| 47 | 51 | rexx_comment = |
|---|
| 48 | | '/*' @comment ( |
|---|
| | 52 | '/*' >rexx_comment_nc_res @comment ( |
|---|
| 49 | 53 | newline %{ entity = INTERNAL_NL; } %rexx_ccallback |
|---|
| 50 | 54 | | |
|---|
| 51 | 55 | ws |
|---|
| 52 | 56 | | |
|---|
| 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; |
|---|
| 55 | 63 | |
|---|
| 56 | 64 | rexx_sq_str = '\'' @code ([^\r\n\f'\\] | '\\' nonnewline)* '\''; |
|---|
| … | … | |
| 93 | 101 | init |
|---|
| 94 | 102 | |
|---|
| | 103 | int nest_count = 0; |
|---|
| | 104 | |
|---|
| 95 | 105 | %% write init; |
|---|
| 96 | 106 | cs = (count) ? rexx_en_rexx_line : rexx_en_rexx_entity; |
|---|