Update of /cvsroot/jython/jython/org/python/parser
In directory usw-pr-cvs1:/tmp/cvs-serv24051
Modified Files:
python.jjt
Log Message:
Fix for "[ #475445 ] incompatibility with python".
Explicit ignore newlines in single-line-comments and make a special
case for trailing comments where the newline isn't ignored.
Index: python.jjt
===================================================================
RCS file: /cvsroot/jython/jython/org/python/parser/python.jjt,v
retrieving revision 2.15
retrieving revision 2.16
diff -C2 -d -r2.15 -r2.16
*** python.jjt 2001/07/21 09:15:24 2.15
--- python.jjt 2001/10/30 20:30:10 2.16
***************
*** 211,217 ****
! <DEFAULT, INDENTING, INDENTATION_UNCHANGED> SPECIAL_TOKEN: /* COMMENTS */
{
! <SINGLE_LINE_COMMENT: "#" (~["\n","\r"])* > { indent = 0; }
}
--- 211,223 ----
! <DEFAULT> SPECIAL_TOKEN: /* COMMENTS */
{
! <TRAILING_COMMENT: "#" (~["\n","\r"])* >
! }
!
! <INDENTING, INDENTATION_UNCHANGED> SPECIAL_TOKEN: /* COMMENTS */
! {
! <SINGLE_LINE_COMMENT: "#" (~["\n","\r"])* ("\r\n" | "\n" | "\r")>
! { indent = 0; }
}
|