[antlr-interest] "An Introduction to ANTLR" presentation slides

Andy Tripp antlr at jazillian.com
Mon Mar 3 16:23:24 PST 2008


Gerald B. Rosenberg wrote:
> At 03:02 PM 3/3/2008, Andy Tripp wrote:
>> Ask a person what is the meaning of the letters 'c', 'a', and 't' 
>> (presumably in that order and surrounded by
>> non-letters), and they'll tell you the meaning is the word "cat". A 
>> lexer does the same: produces
>> a meaningful output that represents the meaning of the input. 
>
> Wlihe hmuans drevie ipmpilcit udnretsnadnig lragely from the smenatcis 
> of snentcee srtcutrues, mchaines, pratciuclarly smiple lxeers, are 
> rsetirtced to rcegoniznig, but not udnretsnadnig, srtcutrue.
Whether a person "understands" that 'c' 'a' 't' "means" cat, but a lexer 
does not "understand", is a metaphysical question.
As someone once said "whether computers can think is no more interesting 
than whether submarines can swim".

>
> Yes, in a snese, it is all smenatcis.  But, in the snese of use in 
> froaml cmoptuer sceicne dsicuorse, to euqtae 'c' 'a' 't' to "cat" is 
> srtutcrue, to euqtae 'c' 'a' 't' to "feline" is smenatcis.
My point was that there's more to "meaning" than semantics...they're not 
synonymous.
You say 'c' 'a' 't' to "cat" is "structure" - please, don't introduce 
new terms in the middle of the conversation. You said before that
"cat" is "syntax". And my response is "yes, you could consider it to be 
the 'syntax' for the parser, but
it's also the output of the lexer." And I'd say the lexer is "assigning 
meaning" to it's input. So I still
think  "there is no meaning unless you have semantic analysis" is wrong.

As for "formal computer science discourse", that's not the context here. 
Clearly, most
people here are just programmer types. I love Noem Chomsky as much as 
the next guy, but right now let's
use Andrew Tanenbaum's terminology :)


More information about the antlr-interest mailing list