diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2011-12-14 19:52:24 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2011-12-14 19:52:24 -0800 |
commit | e3390f1ed75d58f78218acf22c2a9209a88a14a2 (patch) | |
tree | 684ddb7f1845ec0076fa5523704facdc8976a742 /parser.l | |
parent | 89baf71c475f494c139df7c7f29a593b5a0f7d61 (diff) | |
download | txr-e3390f1ed75d58f78218acf22c2a9209a88a14a2.tar.gz txr-e3390f1ed75d58f78218acf22c2a9209a88a14a2.tar.bz2 txr-e3390f1ed75d58f78218acf22c2a9209a88a14a2.zip |
@# comments are becoming obsolescent. @# comments
can now be used. Within nested forms,
Lisp-compatible ; comments are suported.
* parser.l: Support @# and ; comments.
* txr.1: Documentation updated.
* txr.vim: Updated.
Diffstat (limited to 'parser.l')
-rw-r--r-- | parser.l | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -439,6 +439,9 @@ UONLY {U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U} return TEXT; } +<SPECIAL,NESTED>[;].* { + /* comment */ + } <SPECIAL,NESTED>{UANYN} { yyerrprepf(lit("bad character in directive: '~a'"), string_utf8(yytext), nao); @@ -536,14 +539,14 @@ UONLY {U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U} yy_push_state(SPECIAL); } -<INITIAL>^@#.*\n { +<INITIAL>^@[#;].*\n { /* eat whole line comment */ lineno++; } -<INITIAL>@#.* { - /* comment to end of line */ - } +<INITIAL>@[#;].* { + /* comment to end of line */ + } <STRLIT>\" { yy_pop_state(); |