help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: improving yysyntax_error()


From: Christian Schoenebeck
Subject: Re: improving yysyntax_error()
Date: Thu, 21 Jun 2007 22:51:20 +0200
User-agent: KMail/1.9.5

Es geschah am Thursday, 21. June 2007 22:15 als Hans Aberg schrieb:
> > How it "should" be implemented is the wrong question, or at least
> > addressed to
> > the wrong person, since I'm not familiar enough with the bison
> > implementation
> > yet. That was actually my main reason to write to this list, to
> > probably get
> > suggestions how this could fit into the current implementation of
> > bison.
>
> So until somebody figure that out, it won't happen.

I see, it's the same problem as you write below, regarding auto completion.

> As I wrote in my reply, one can already have token character
> sequences 'c_1'...'c_k' in the rules. If 'c_1...c_k' is interpreted
> as 'c_1'...'c_k', then if the grammar file is written in UTF-8, the
> parser will identify the UTF-8 multibyte sequence. So if the lexer
> feeds that to the parser, one will get an identification. But the
> error messages will currently only write out the leading byte.

Ok, misapprehension. Never mind about that.

> > With "intergrated type completion support" I mean a convenient way
> > for parser
> > developers (or actually interpreter developers) to let the user
> > "complete"
> > the current input upon the current parser state, in case there is
> > only one
> > possible shift transition, that is for highly redundant languages.
>
> This has been discussed here. One really need LR(1) for that, because
> LALR(1) compacts the states in way that the error tokens may not
> appear until some reductions have been performed (And so causing the
> same problem if one wants to find the completion tokens directly from
> the states).

And were exactly is the problem about that? I mean one just has to traverse 
the possible transitions "virtually", including reductions to retrieve the 
error tokens then. Is it the bad runtime effeciency or am I missing something 
important? Seems there is no public archive of this list, so you cannot point 
me to the respective thread, can you?

CU
Christian




reply via email to

[Prev in Thread] Current Thread [Next in Thread]