please have a look at below stripped down version of my code. It throws error c504 : The expression has type 'syntax_t_nt::grammarSymbol{::unsigned, ::unsigned}', which is incompatible with the type 'syntax_t_nt::grammarSymbol{@Terminal, @Nonterminal}' in VIP 8.0.0. How can I circumvent the problem?
Code: Select all
interface syntax_t_nt{@Terminal, @Nonterminal}
domains
grammarSymbol =
t(@Terminal T);
nt(@Nonterminal Nt).
grammarString = grammarSymbol*.
end interface syntax_t_nt
%======
interface cfg{@Terminal, @Nonterminal}
open syntax_t_nt{@Terminal, @Nonterminal}
predicates
isNullable : (grammarString GrmStrg) determ.
end interface cfg
%======
interface cfgSupportSite{@Terminal, @Nonterminal}
predicates from cfg{@Terminal, @Nonterminal}
isNullable/1
end interface cfgSupportSite
%======
class unsignedCfg : cfg{unsigned, unsigned}
end class unsignedCfg
%---
implement unsignedCfg
open syntax_t_nt{unsigned, unsigned}
supports cfgSupportSite{unsigned, unsigned}
clauses
isNullable([nt(Nt) | RestGrmStrg]) :- %the error refers to nt(Nt) in this line
doSomethingWithAnUnsigned(Nt),
isNullable(RestGrmStrg).
isNullable([]).
predicates
doSomethingWithAnUnsigned : (unsigned).
clauses
doSomethingWithAnUnsigned(_).
end implement unsignedCfg
%======
implement main
clauses
run() :-
_ = unsignedCfg::new().
end implement main