what
This commit is contained in:
parent
5217761cc1
commit
33b94e4bd5
5 changed files with 20 additions and 5 deletions
|
@ -16,17 +16,17 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
flakePkgs = rec {
|
flakePkgs = rec {
|
||||||
ablego = pkgs.callPackage ./. {
|
ableGo = pkgs.callPackage ./. {
|
||||||
inherit (melt.legacyPackages.${system}) mkSilverBin;
|
inherit (melt.legacyPackages.${system}) mkSilverBin;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in rec {
|
in rec {
|
||||||
defaultPackage = packages.ablego;
|
defaultPackage = packages.ableGo;
|
||||||
|
|
||||||
packages = flake-utils.lib.flattenTree flakePkgs;
|
packages = flake-utils.lib.flattenTree flakePkgs;
|
||||||
|
|
||||||
devShell = pkgs.mkShell {
|
devShell = pkgs.mkShell {
|
||||||
inputsFrom = with packages; [ ablego ];
|
inputsFrom = with packages; [ ableGo ];
|
||||||
packages = with pkgs; [ go ];
|
packages = with pkgs; [ go ];
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
3
grammars/io.mzhang.ableGo/AbstractSyntax/Host/Decl.sv
Normal file
3
grammars/io.mzhang.ableGo/AbstractSyntax/Host/Decl.sv
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
grammar io:mzhang:ableGo:AbstractSyntax:Host;
|
||||||
|
|
||||||
|
nonterminal Decl;
|
8
grammars/io.mzhang.ableGo/AbstractSyntax/Host/Root.sv
Normal file
8
grammars/io.mzhang.ableGo/AbstractSyntax/Host/Root.sv
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
grammar io:mzhang:ableGo:AbstractSyntax:Host;
|
||||||
|
|
||||||
|
nonterminal Root;
|
||||||
|
|
||||||
|
abstract production root
|
||||||
|
top::Root ::= d::GlobalDecls
|
||||||
|
{
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
imports io:mzhang:ableGo:AbstractSyntax:Host as ast;
|
|
@ -1,5 +1,8 @@
|
||||||
grammar io:mzhang:ableGo:ConcreteSyntax;
|
grammar io:mzhang:ableGo:ConcreteSyntax;
|
||||||
|
|
||||||
nonterminal Root;
|
nonterminal Root with ast<ast:Root>;
|
||||||
|
|
||||||
concrete productions top::Root {}
|
concrete productions top :: Root
|
||||||
|
| tu :: TranslationUnit_c { top.ast = ast:root(ast:foldGlobalDecl(tu.ast)); }
|
||||||
|
|
||||||
|
closed nonterminal TranslationUnit_c with ast<[ast:Decl]>;
|
||||||
|
|
Loading…
Reference in a new issue