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

Parsing - where does it all begin?



Hi all

I've been reading the DRM to get to sleep at night. Pg 145 in Chap. 10
(Macros) says:

"A constituent, operand, or leaf that is a macro call expands the
macro" ... "brackets the expansion in begin ... end" ... "then
reparses it as a statement.".

Looking at the BNF (Appendix A) for statement:

statement:
    BEGIN-WORD body-fragment(opt) end-clause

Presumably the BEGIN-WORD in this case is the 'begin' inserted by the
macro expansion, and the macro expansion itself gets reparsed as a
body-fragment.

So, when do you get to actually parse real dylan code like 'if'
statements, expressions (function calls), etc.

Thanks
Roland