Kast in k

I created this diff for use in managing the discussion on the KORE syntax. We may choose to close it rather than merge it, I just need a place to put comments.
Yes, using a potentially quadratic amount of syntax. I guess this is good
enough for now, but we need to be aware that we might have to change it if
the performance becomes too degraded in cases where the polynomial
explosion is prohibitive

On Fri, Oct 10, 2014 at 3:41 PM, Grigore Rosu <notifications@github.com>
wrote:

> In samples/kast/kore.k:
>
> > +  syntax KRequireList  ::= ""                         [ klabel(#emptyKRequireList), onlyLabel]
> > +
> > +  syntax KModule       ::= "module" KModuleName KAttributesDeclaration KImportList KSentenceList "endmodule" [ klabel(#KModule), hook(org.kframework.kore.outer.Module) ]
> > +  syntax KModuleList   ::= KModule KModuleList        														 [ klabel(#KModuleList), assoc, comm, unit(#emptyKModuleList) ]
> > +  syntax KModuleList   ::= ""                         														 [ klabel(#emptyKModuleList), onlyLabel]
> > +
> > +  syntax KImport       ::= "imports" KModuleName    [ klabel(#KImport), hook(org.kframework.kore.outer.Import) ]
> > +  syntax KImportList   ::= KImport KImportList      [ klabel(#KImportList), assoc, comm, unit(#emptyKImportList) ]
> > +  syntax KImportList   ::= ""                       [ klabel(#emptyKImportList), onlyLabel]
> > +
> > +  syntax KSentenceList ::= KSentence KSentenceList      [ klabel(#KSentenceList), assoc, comm, unit(#kemptyKSentenceList) ]
> > +  syntax KSentenceList ::= ""                           [ klabel(#emptyKSentenceList), onlyLabel]
> > +
> > +  syntax KSentence ::= "syntax" KSort                             KAttributesDeclaration   [ klabel(#KSyntaxSort), hook(org.kframework.kore.outer.SyntaxSort) ]
> > +  syntax KSentence ::= "syntax" KSort "::=" KProduction           KAttributesDeclaration   [ klabel(#KSyntaxProduction), hook(org.kframework.kore.outer.SyntaxProduction) ] ]
> > +  syntax KSentence ::= "syntax" "priority" KString ">" KString    KAttributesDeclaration   [ klabel(#KSyntaxPriority), hook(org.kframework.kore.outer.SyntaxPriority) ]
>
> priorities form a partial order, and we can define any partial order one
> pair at a time.
>
> @radumereuta <https://github.com/radumereuta> How about assoc
> declarations, what would a good, minimal KORE syntax for them be?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/kframework/k/pull/1057/files#r18729603>.
>