List test

I thought these are macros. So maybe I didn't understand what you meant by macros. Can you explain more?

Shijiao

-----Original Message-----
From: "Grigore Rosu" <notifications@github.com>
Sent: ‎1/‎1/‎2015 16:02
To: "kframework/java-semantics" <java-semantics@noreply.github.com>
Cc: "laurayuwen" <laurayuwen@gmail.com>
Subject: Re: [java-semantics] List test (#19)

In src/common/list-syntax.k:
> +
> +syntax KItem ::= toKListWrap(K) [function]
> +                | toKListWrap(K, KListWrap) [function]
> +
> +rule toKListWrap(UL) => toKListWrap(UL,[.KList])
> +
> +rule toKListWrap(Label:KLabel(Hd,,Tl), [L:KList]) => toKListWrap(Tl, [L,,Hd])
> +
> +rule toKListWrap('.List`{""`}(.KList), KL:KListWrap) => KL
> +rule toKListWrap('.List`{"`,"`}(.KList), KL:KListWrap) => KL
> +rule toKListWrap('.List`{"."`}(.KList), KL:KListWrap) => KL
> +rule toKListWrap('.List`{"&"`}(.KList), KL:KListWrap) => KL
> +
> +
> +//AnnoClassModList "class" Id  TypeParams? Super? Interfaces? -> ClassDecHead {cons("ClassDecHead")}
> +rule    'ClassDecHead(('AnnoClassModList(A) => toKListWrap('AnnoClassModList(A))),,_) [anywhere]
Can't we make these macros instead of anywhere rules?
—
Reply to this email directly or view it on GitHub.=