From: matz@... (Yukihiro Matsumoto) Date: 2001-06-12T14:26:41+09:00 Subject: [ruby-talk:16432] Re: Inital Q's on Ruby grammar Hi, In message "[ruby-talk:16431] Inital Q's on Ruby grammar" on 01/06/12, Robert Feldt writes: |* Can you give a regexp for tDXSTRING? If not can you give a context-free |grammar? If not can you describe what you want? ;-) tD* are something with #{} inside of it, so tDSTRING is a tSTRING with #{} inside, tDXSTGRING is a tXSTRING (means ``) with #{}, tDREGEXP is a REGEXP with #{}. Syntax are same despite of existence of #{}. String syntax is kida hard to describe by regexp, just like in other languages. String have several syntax ("", '', %Q!!, etc.), but they are resolved in the lexer. They are treated uniformly in the parser. |* What different types of string tokens are there? Which one covers "here |documents"? Strings are: tSTRING tDSTRING tXSTRING tDXSTRING Regexps are: tREGEXP tDREGEXP matz.