bison-patches
[Top][All Lists]
Advanced

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

Re: too many warnings from Bison CVS for Pike


From: Paul Eggert
Subject: Re: too many warnings from Bison CVS for Pike
Date: Wed, 01 Mar 2006 01:13:09 -0800
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

"Joel E. Denny" <address@hidden> writes:

> I like the conciseness of:
>
>   bison_spec(): definition_section() rules_section() user_subroutines() {
>     $bison_spec = new Node();
>     $bison_spec->addNode( $definition_section );
>     $bison_spec->addNode( $rules_section );
>     $bison_spec->addNode( $user_subroutines );
>   }

How about if we support something like this:

  bison_spec: definition_section rules_section user_subroutines {$%};

where "$%" expands to all the "$$ = new...;" stuff.  That's more
concise yet.  Obviously this is just a sketch and more detail would
need to be added, but I hope you get the idea.

I suspect lots of parser-generators do this sort of thing; one that
springs to mind (because we use it locally) is JTB
<http://compilers.cs.ucla.edu/jtb/>.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]