|grammar help email@example.com (Peter Haynes) (2000-04-05)|
|Grammar help firstname.lastname@example.org (Randy Beckwith) (2002-06-28)|
|Re: Grammar help email@example.com (2002-07-02)|
|Re: Grammar help firstname.lastname@example.org (Casse Hugues) (2002-07-15)|
|Date:||2 Jul 2002 01:04:29 -0400|
|Posted-Date:||02 Jul 2002 01:04:29 EDT|
On Fri, 28 Jun 2002 22:11:25 UTC, "Randy Beckwith"
> Hello, all.
> I'm trying to write a simple grammar that will eventually be used with
> Bison but have run into a snag. Basically, I'm trying to get at a list
> of rules:
> rules_list := rule | rule rules_list
> That's the easy part. <g> Now a rule can be based on CallerID,
> CalledID, Date or ExcludeDate. There can be 0 or 1 CallerID, 0 or 1
> CalledID, 0 or more Date and 0 or more ExcludeDate. I can do the the
> "0 or 1's" and the "0 or more's" but can't figure out how to get them
> all together.
Hopefully they must appear in that order.
Is the token "AND" required?
If it is not part of the language, it is slightly easier.
Also is there a key word that preceeds of the 4 components?
rule := rule-component | rule-component "AND" rule
This makes the single callerId and calledId requirements symantic
Otherwise you must enumerate the prefix combinations
and then add the dates list similar the the production above.
Return to the
Search the comp.compilers archives again.