-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #378 from melt-umn/develop
Silver 0.4.3 release
- Loading branch information
Showing
119 changed files
with
2,000 additions
and
2,460 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,19 @@ | ||
grammar silver:definition:concrete_syntax; | ||
|
||
synthesized attribute syntaxAst :: [SyntaxDcl]; | ||
synthesized attribute parserSpecs :: [ParserSpec]; | ||
monoid attribute syntaxAst :: [SyntaxDcl] with [], ++; | ||
monoid attribute parserSpecs :: [ParserSpec] with [], ++; | ||
|
||
attribute syntaxAst, parserSpecs occurs on Root, AGDcls, AGDcl; | ||
|
||
aspect production root | ||
top::Root ::= gdcl::GrammarDcl ms::ModuleStmts ims::ImportStmts ags::AGDcls | ||
{ | ||
top.syntaxAst = ags.syntaxAst; | ||
top.parserSpecs = ags.parserSpecs; | ||
} | ||
|
||
aspect production nilAGDcls | ||
top::AGDcls ::= | ||
{ | ||
top.syntaxAst = []; | ||
top.parserSpecs = []; | ||
} | ||
aspect production consAGDcls | ||
top::AGDcls ::= h::AGDcl t::AGDcls | ||
{ | ||
top.syntaxAst = h.syntaxAst ++ t.syntaxAst; | ||
top.parserSpecs = h.parserSpecs ++ t.parserSpecs; | ||
} | ||
propagate syntaxAst, parserSpecs on Root, AGDcls; | ||
|
||
aspect default production | ||
top::AGDcl ::= | ||
{ | ||
top.syntaxAst = []; | ||
top.parserSpecs = []; | ||
propagate syntaxAst, parserSpecs; | ||
} | ||
|
||
aspect production appendAGDcl | ||
top::AGDcl ::= ag1::AGDcl ag2::AGDcl | ||
{ | ||
top.syntaxAst = ag1.syntaxAst ++ ag2.syntaxAst; | ||
top.parserSpecs = ag1.parserSpecs ++ ag2.parserSpecs; | ||
propagate syntaxAst, parserSpecs; | ||
} | ||
|
Oops, something went wrong.