Csup cvsmode build discussion

Bob Bishop rb at gid.co.uk
Wed Jan 16 06:39:28 PST 2008


Hi,

On 16 Jan 2008, at 13:32, Ulf Lilleengen wrote:

> On Wed, Jan 16, 2008 at 11:08:20AM +0000, Bob Bishop wrote:
>> [...]
>> Why do you want prefixing? And precisely what do you want to do with
>> parameters?
>>
> Prefixing is needed since csup already have a configuration parser  
> written in
> lex/yacc and therefore needed to avoid conflicts.

You can alternatively avoid conflicts by putting both grammars in the  
same file, with an entry rule which refers to one or other of the two  
grammars' real entries based on a defined token. You then arrange for  
the lexer to supply the appropriate value of the switch token each  
time the parser is started up.

> Parameters is nice if one
> were to modify the parser to take extra arguments, I don't have a  
> concrete
> example for it yet, but it's nonetheless a requirement for  
> reentrancy. [etc]

You may be able to do this using a variation on the above trick.

> -- 
> Ulf Lilleengen
>


--
Bob Bishop          +44 (0)118 940 1243
rb at gid.co.uk fax +44 (0)118 940 1295






More information about the freebsd-hackers mailing list