aboutsummaryrefslogtreecommitdiffstats
path: root/lib/parsetools
diff options
context:
space:
mode:
authorarchimed <[email protected]>2014-07-15 09:25:44 +0400
committerarchimed <[email protected]>2014-07-24 09:42:48 +0400
commitae622fb6655bf3c490ff5ce272c0e474f4d9df0f (patch)
tree8bdc119e737510374a05b7fbd5b59b5056ef320c /lib/parsetools
parent9a1419a7d4325085dc2235a8531d77e1d96ea689 (diff)
downloadotp-ae622fb6655bf3c490ff5ce272c0e474f4d9df0f.tar.gz
otp-ae622fb6655bf3c490ff5ce272c0e474f4d9df0f.tar.bz2
otp-ae622fb6655bf3c490ff5ce272c0e474f4d9df0f.zip
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.
Diffstat (limited to 'lib/parsetools')
-rw-r--r--lib/parsetools/include/leexinc.hrl4
1 files changed, 2 insertions, 2 deletions
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)