info-gnuprologjava
[Top][All Lists]
Advanced

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

[Info-gnuprologjava] Infix expressions with user-defined operators


From: Carlos-Manuel LÓPEZ-ENRÍQUEZ
Subject: [Info-gnuprologjava] Infix expressions with user-defined operators
Date: Mon, 15 Apr 2013 21:00:20 -0500

G'day,

I used gnu-prolog to create a program. For syntax purposes I defined an operator '::' (i.e, op(350,xfy,::)) in order to make infix expressions such as A=a::b::c

Now I want to use gnu prolog for java (0.2.6) and I defined the same operator in my environment:

environment.getOperatorSet().add(350,SPECIFIER.XFY,"::");

Nevertheless, the infix syntax A=a::b::c is not allowed and I have to use  B=..[::,b,c], A=..[::,a,B]. 

All my code has infix expressions (e.g., head(A::B::C):- ...   ) and I want to avoid massive and dangerous modifications and keep my code readable. 

Is there a way in gnu prolog for java to enable infix _expression_ with user-defined operators?

Thanks in advance!

--
Carlos

reply via email to

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