[augeas-devel] augeas: master - * src/lexer.l: allow DOS line endings

David Lutterkort lutter at fedoraproject.org
Wed Aug 5 22:45:33 UTC 2009


Gitweb:        http://git.fedorahosted.org/git/augeas.git?p=augeas.git;a=commitdiff;h=9cc90c45e35fb85b9c1a6af528b93371ebbd7426
Commit:        9cc90c45e35fb85b9c1a6af528b93371ebbd7426
Parent:        97609ef4168b407406f9548de92850a322dd1030
Author:        David Lutterkort <lutter at redhat.com>
AuthorDate:    Wed Aug 5 15:43:25 2009 -0700
Committer:     David Lutterkort <lutter at redhat.com>
CommitterDate: Wed Aug 5 15:44:28 2009 -0700

* src/lexer.l: allow DOS line endings

Accept \r\n as a line ending in addition to \n

Fixes RH Bugzilla 514712
---
 src/lexer.l |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/lexer.l b/src/lexer.l
index e0401a0..12c5bb9 100644
--- a/src/lexer.l
+++ b/src/lexer.l
@@ -79,6 +79,7 @@ ARROW  ->
 {
   [ \t]*        LOCATION_STEP(*yylloc);
   \n+           LOCATION_LINES(*yylloc, yyleng); LOCATION_STEP(*yylloc);
+  (\r\n)+       LOCATION_LINES(*yylloc, yyleng/2); LOCATION_STEP(*yylloc);
 }
 
 <INITIAL>




More information about the augeas-devel mailing list