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
[EMAIL PROTECTED] fax +44 (0)118 940 1295




_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to