﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
2096	Lexer message could be clearer	Malte Lenz	Martin Sjölund	"This (incorrect) model gives a confusing error message:

{{{
model linearOscillator
equation
  when a && b && c then
  end when;
end linearOscillator;
}}}

{{{
[39] 09:07:12 Syntax error(s) in model afd
afd(3): Lexer failed to recognize '&& b && c t' afd(3): Lexer failed to recognize '& b && c th' afd(3): Lexer failed to recognize '&& c then ' afd(3): Lexer failed to recognize '& c then '
}}}

It seems to try different scopes of parsing, and then just accumulates the messages in a confusing way without line breaks.

In an ideal world, this would say something like
{{{
""Please use \""and\"" for the logical and function on line 3, not \""&&\"".""
}}}

but something like this is probably more likely/possible:

{{{
afd(3): Lexer failed to recognize '&& b && c t'
afd(3): Lexer failed to recognize '& b && c th'
afd(3): Lexer failed to recognize '&& c then '
afd(3): Lexer failed to recognize '& c then '
afd(3): There seems to be a syntax error on line 3.
}}}

So, basically adding line breaks in the error message, and telling the user with a clear wording where it finally gave up would be helpful.

"	enhancement	closed	normal	1.9.0	Parser	trunk	invalid		
