This commit is contained in:
Michael Zhang 2023-01-01 12:46:40 -06:00
parent 5217761cc1
commit 33b94e4bd5
Signed by: michael
GPG Key ID: BDA47A31A3C8EE6B
5 changed files with 20 additions and 5 deletions

View File

@ -16,17 +16,17 @@
};
flakePkgs = rec {
ablego = pkgs.callPackage ./. {
ableGo = pkgs.callPackage ./. {
inherit (melt.legacyPackages.${system}) mkSilverBin;
};
};
in rec {
defaultPackage = packages.ablego;
defaultPackage = packages.ableGo;
packages = flake-utils.lib.flattenTree flakePkgs;
devShell = pkgs.mkShell {
inputsFrom = with packages; [ ablego ];
inputsFrom = with packages; [ ableGo ];
packages = with pkgs; [ go ];
};
});

View File

@ -0,0 +1,3 @@
grammar io:mzhang:ableGo:AbstractSyntax:Host;
nonterminal Decl;

View File

@ -0,0 +1,8 @@
grammar io:mzhang:ableGo:AbstractSyntax:Host;
nonterminal Root;
abstract production root
top::Root ::= d::GlobalDecls
{
}

View File

@ -0,0 +1 @@
imports io:mzhang:ableGo:AbstractSyntax:Host as ast;

View File

@ -1,5 +1,8 @@
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]>;