No, you understand the point correctly. c2ast is much of the work, and
its error reports would already be a big advance on many of the error
reports from production compiler.
Even more can be added. Pinpointing location is already a big advance,
but does not necessarily find where the user stopped doing what he
*intended*. In the general case this is impossible of course, but
you can help out by finding the last correct statement, the end of the
last correct block/function, the first unclosed quote mark/curly
brace/parenthesis etc.
Then you can add productions which capture common errors -- "error
production". Things like
for (a=0; a++)
where one of the clauses is missing.
But basically we already have a big start. I need to start remembering
to call c2ast when GCC gives me a mysterious error.
-- jeffrey
On 02/20/2014 12:12 PM, Durand Jean-Damien wrote:
Was reading this idea about diagnostic compiler and C language
<https://groups.google.com/forum/#%21searchin/marpa-parser/fruit/marpa-parser/CXcLmksuQhw/KurF_p01HE0J>.
Running c2ast or cscan will do it, with a customized user-friendly
output rewriten as:
it failed here
----------^
or did I misunderstood the point.
Le jeudi 20 février 2014 10:21:06 UTC+1, Jeffrey Kegler a écrit :
I just re-read the linked page
<http://savage.net.au/Perl-modules/html/marpa.papers/chapter2.html>,
the current version is very, very good. -- jeffrey
On 02/19/2014 02:03 PM, Ron Savage wrote:
Thursday last week I started a new job, working from home, so I
won't play with this for a few days. But then I'll mindlessly
change the default in all grammars, and run all the tests.
Also, we need to come up with a short(ish) description of the
above, to suit:
http://savage.net.au/Perl-modules/html/marpa.papers/chapter2.html
<http://savage.net.au/Perl-modules/html/marpa.papers/chapter2.html>
--
You received this message because you are subscribed to the
Google Groups "marpa parser" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to [email protected] <javascript:>.
For more options, visit https://groups.google.com/groups/opt_out
<https://groups.google.com/groups/opt_out>.
--
You received this message because you are subscribed to the Google
Groups "marpa parser" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "marpa
parser" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.