From: "Hal E. Fulton" Date: 2002-10-13T01:37:10+09:00 Subject: Re: Confusion on Keywords ----- Original Message ----- From: "Bill Tj" Newsgroups: comp.lang.ruby To: "ruby-talk ML" Sent: Friday, October 11, 2002 11:33 PM Subject: Re: Confusion on Keywords > If "identifier" is used > as in the "C: A Reference Manual" book, definitely it is not a single > identifier. My confusion stems from the fact that, I think, in some > other language like C, keywords have very high precedence during > lexing and parsing. Therefore, when we get to the level where we know > that "anObject.class" is three tokens, it surprised me that back then, > after we know that the second token signifies a method call, the lexer > still treats the third token as a possible keyword instead of just an > arbitrary string token, and this back then necessitated the invention > of the method "type". I think I understand you now. I don't understand the intimate details of how Ruby is parsed, though. It has been ages since I wrote a real parser, and then it was not as sophisticated as Ruby's. I like to treat Ruby's parser the way I treat electricity: I flip a switch, and it works, and I am glad someone else understands it. Of course, that's a huge admission from someone who calls himself a programmer. :) Hal