Boost logo

Boost :

From: David Abrahams (abrahams_at_[hidden])
Date: 2001-05-27 11:51:13


----- Original Message -----
From: "John Max Skaller" <skaller_at_[hidden]>

> The main problem I see (due to ignorance) is how
> to specify the semantic rules. For a grammar, there
> the notation
>
> $n
>
> refers to the attributes of the n'th symbol. What do you do with
>
> Symbol*
> or
> Symbol?

People often handle this problem by allowing different semantic actions to
be embedded at various points in the RHS. In my opinion, that approach tends
to complicate the RHS to an extent that undermines any simplicity gained in
the expression of grammar using EBNF. It also hugely complicates the
description of the meta-language. You're much better off sticking to strict
BNF rules, since they tend to enforce a reasonable amount of factorization.

-Dave


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk