xsharp.eu • Error message X# vs VO
Page 1 of 1

Error message X# vs VO

Posted: Tue Dec 14, 2021 1:30 pm
by ic2
Consider this:

Instead of

Code: Select all

AAdd(aError,"Some string")
I typed

Code: Select all

AAdd(aError("Some string")
(I added the capitalization of AAdd, X# doesn't do that unfortunately)

If I make the same mistake in VO, I get 2 clear errors on the same line so I know immediately what I've done wrong:
entity AERROR is unknown: 51121
bad function call: 51138

In X# I get:
Error XS9002 Parser: unexpected CRLF, are you missing a token ?

so I've no idea what is actually wrong.

Would it be possible to improve compiler errors more towards the level we are used to in VO?

Dick

Error message X# vs VO

Posted: Tue Dec 14, 2021 4:05 pm
by Chris
Hi Dick,

Yes, it's on the list to improve such error messages. The difference between VO and X# is that VO uses a hand written parser, while X# uses a rules based one. The disadvantage of VO's one is that in a lot of cases it allows to compile things that should not be allowed to compile in the first place and do not make sense. The main disadvantage of X#'s one is exactly that, it's not easy to make it report good enough parser error messages. But Robert and Nikos are working on that.

.

Error message X# vs VO

Posted: Tue Dec 14, 2021 4:51 pm
by ic2
Hello Chris,

Good to know. It's probably not the most urgent thing to do but gradually closing the gap between VO and X# on the whole is important.

I can imagine that a tighter compiler is more important than clear errors, but unfortunately unhelpful errors are more visible for a programmer than absent compiler errors which should have been there. :unsure:

DIck

Error message X# vs VO

Posted: Tue Dec 14, 2021 6:50 pm
by Chris
Yeah, agreed with that!

.