bison-patches
[Top][All Lists]
Advanced

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

Re: RFC: custom error messages


From: Christian Schoenebeck
Subject: Re: RFC: custom error messages
Date: Sat, 18 Jan 2020 14:41:35 +0100

On Freitag, 17. Januar 2020 08:54:47 CET Akim Demaille wrote:
> >> Please, do not use "rule" when you mean "nonterminal symbol".  It
> >> seems to confuse some people.
> > 
> > I knew I'll get that ticking-off. :) "nonterminal symbol" is too long for
> > always using it, and most people know the semantic of "rule" in the
> > context of grammars. Invent a better, non ambiguous short term as
> > alternative then. ;-)
> There must be some confusion here: yes, most people know what a rule
> is, and it's definitely not the same as a nonterminal symbol.
> 
> exp: exp '+' '0' | '0'
> 
> There is one nonterminal (exp), two terminals ('+' and '0') and two
> rules ("exp: exp '+' '0'" and "exp: '0'").
> 
> There are synonyms:
> - token, terminal, terminal symbol, letter
> - variable, nonterminal, nonterminal symbol
> - rule, production, production rule
> 
> but in no universe "exp" is a rule.  It's a symbol.  Make it an NT
> if you want it to be short, but don't call it a "rule".

No confusion. Of course I understand you, especially if there are several 
rules producing a certain non-terminal etc., and I will try to avoid that in 
your environment, but TBH I still find that picky, sorry. :)

There is always fuzziness in human language. People who ever got in touch with 
formal language theory usually know all the semantical details that you just 
described. But if I'd try to always use very exact terms in every aspect & 
context of my daily human language, that'll be extremely inefficient:

-function- -> function name
-Linux- -> GNU/Linux
-he- -> (s)he
-shock- -> psychological trauma [vs. anaphylactic shock]
-weed- [bot.] -> [non existent]
-linear- [math.] -> _affine_ (-linear) transformation
...

Best regards,
Christian Schoenebeck





reply via email to

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