jflex icon indicating copy to clipboard operation
jflex copied to clipboard

[Feature] java compliant line and column counting [sf#28]

Open lsf37 opened this issue 10 years ago • 5 comments

Reported by vbstudio on 2013-03-11 15:05 UTC It would be nice to have an option to switch line and column counting into a mode that will only count \n and \r\n as new lines. I didnt't find an editor that handles the unicode line breaks correctly anyway and i am trying to write a java compliant lexer.

mfG Michael https://sourceforge.net/p/jflex/feature-requests/28/

lsf37 avatar Feb 15 '15 11:02 lsf37

Commented by vbstudio on 2013-03-13 22:51 UTC actually java regards a sole \r as new line aswell

lsf37 avatar Feb 15 '15 11:02 lsf37

Commented by vbstudio on 2013-03-14 18:39 UTC patch against the latest svn revision (623)

lsf37 avatar Feb 15 '15 11:02 lsf37

Commented by vbstudio on 2013-03-14 18:40 UTC patch against the current release 1.4.3 to add a switch %javanl that switches to java compliant new line mode

lsf37 avatar Feb 15 '15 11:02 lsf37

@lsf37 Should we update the patch, or is this obsolete by the full unicode support?

regisd avatar Sep 16 '18 20:09 regisd

I don't think it's really obsolete, so we should probably update and/or incorporate it. We seem to have forgotten about this one since 1.4.3, so I'll assign this to milestone 1.7.1 to have a more thorough look.

lsf37 avatar Sep 16 '18 22:09 lsf37