From ae622fb6655bf3c490ff5ce272c0e474f4d9df0f Mon Sep 17 00:00:00 2001 From: archimed Date: Tue, 15 Jul 2014 09:25:44 +0400 Subject: Fix the line counting in string function The line counter becomes invalid, when the rules with linewrap are used. This issue appears, because the parsing FSM does not rollback the line counter after attempting such rule. --- lib/parsetools/include/leexinc.hrl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/parsetools/include/leexinc.hrl') diff --git a/lib/parsetools/include/leexinc.hrl b/lib/parsetools/include/leexinc.hrl index dbbb688d2d..7a0d65e28e 100644 --- a/lib/parsetools/include/leexinc.hrl +++ b/lib/parsetools/include/leexinc.hrl @@ -36,8 +36,8 @@ string(Ics0, L0, Tcs, Ts) -> string_cont(Ics1, L1, yyaction(A, Alen, Tcs, L0), Ts); {reject,_Alen,Tlen,_Ics1,L1,_S1} -> % After a non-accepting state {error,{L0,?MODULE,{illegal,yypre(Tcs, Tlen+1)}},L1}; - {A,Alen,_Tlen,_Ics1,L1,_S1} -> - string_cont(yysuf(Tcs, Alen), L1, yyaction(A, Alen, Tcs, L0), Ts) + {A,Alen,_Tlen,_Ics1,_L1,_S1} -> + string_cont(yysuf(Tcs, Alen), L0, yyaction(A, Alen, Tcs, L0), Ts) end. %% string_cont(RestChars, Line, Token, Tokens) -- cgit v1.2.3