[mercury-users] DCG and get_token_list

S�rgio Rafael Trindade Marques l16447 at alunos.uevora.pt
Sun Mar 28 05:39:38 AEST 2004


Hi,
I'm implementing a prolog compiler at the university,
I've used lexer__get_token_list to get the token and implmented in
DCG a grammer I had for my subset of prolog.
I don't know how to consume the tokens, can someone help me?
I also need to build a tree, in prolog would simply be:

head( h(C1,C2) ) --> c1(C1) , c2(C2)
c1(C) --> [I], {integer(I), C=I}
...

How do I do this in mercury?

Thanks in advance.

Sergio


--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list