On Wed, 2007-07-25 at 21:19 +1000, skaller wrote:
> ./umk gramdoc 

There is now a statement

        page pagename = nt1, nt2, nt3;

which puts the descriptions of nonterminals nt1, nt2 and nt3
on a single page. The index page now contains two indicies ..
the 'topic' index has entries like 'addition', 'logic'
'bitwise' and 'regular_expressions' which are pages of grouped
non-terminals.

I'm considering 'tree structure' for the pages too: for example
in the page description:

sproduct := 
expressions         | s_term * sproduct_list
expressions         | s_term

 sproduct_list := 
expressions         | s_term ( * s_term)*


the sproduct_list is entirely a 'local' nonterminal,
used ONLY in the sproduct production.

The actual grammar here is just

        sproduct := s_term (* s_term)*

but it is split up as shown for historical reasons.
In this case, the sproduct_list should probably be
indented to show it is local to sproduct.

It actually makes some sense to add a new feature to
the grammar like:

        let syntax sproduct_list := ... in
                sproduct := ..

or 

        sproduct := .. where sproduct_list ...

For the same reason, dssl's probably need 'private'
nonterminals.

Finally, I split up some lists like:

        s1 = ...
        s1 = ...
        s1 = some ...
        s1 = ...

into 
        s1 = mysome
        mysome = some ...
        s1 = ...
        ...


to force some productions into a separate group. This is the opposite
of the 'page' command. However it has real semantics:

* it causes merges to be done on the new branch mysome first,
  before the merging on s1, so it is NOT equivalent

* it also causes extra (useless) reductions to be performed

Priorities could fix the latter. The former effect may or may
not actually be desirable!

-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to