Re: Parsing user-defined types

EML <[email protected]>
Newsgroups gmane.comp.parsers.bison.general
Message-ID <[email protected]>
Hi Akim -

On 08/05/2019 20:54, Akim Demaille wrote:

> Flex is hardly concerned with this: once it matched the rule
> for "identifier", it is *your* action which is in charge whether
> to return a "type identifier" or "variable identifier" etc.
> 

I'm not sure that we're taking about the same thing. Sometimes, to make 
the grammar manageable, the lexer has to *dynamically* return 'typename' 
instead of 'identifier'. Only semantic analysis can determine what is a 
user-defined type (say 'foo'), so the lexer must be told at runtime that 
'foo' is a 'typename' and not an 'identifier'.

> See also the so-called lexical tie-in in the doc.
>
Thanks - that information is also in the old O'Reilly book, but I'm 
afraid that it's not enough for this problem.

_______________________________________________
[email protected] https://lists.gnu.org/mailman/listinfo/help-bison
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.