Error message X# vs VO

This forum is meant for questions and discussions about the X# language and tools
Post Reply
ic2
Posts: 1858
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

Error message X# vs VO

Post 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
User avatar
Chris
Posts: 4913
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Error message X# vs VO

Post 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.

.
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
ic2
Posts: 1858
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

Error message X# vs VO

Post 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
User avatar
Chris
Posts: 4913
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Error message X# vs VO

Post by Chris »

Yeah, agreed with that!

.
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
Post Reply