From 41fbdb144e55d805574ed8cc3c81a9ffc7ea50d2 Mon Sep 17 00:00:00 2001 From: Lephenixnoir Date: Tue, 16 Mar 2021 17:30:53 +0100 Subject: [PATCH] remove long-unused parser file --- lib/load-target.y | 52 ----------------------------------------------- 1 file changed, 52 deletions(-) delete mode 100644 lib/load-target.y diff --git a/lib/load-target.y b/lib/load-target.y deleted file mode 100644 index defe67a..0000000 --- a/lib/load-target.y +++ /dev/null @@ -1,52 +0,0 @@ -%{ - -#include -#include -#include -#include - -/* The target description to be filled */ -FxOS::TargetDescription t; - -using BindingDescription = std::pair; - -struct ValueType -{ - BindingDescription binding; - FxOS::MemoryRegion region; -}; - -%} - -/* Tokens */ -%token NAME -%token ADDRESS -%token SIZE -%token PATH - -%define api.value.type {ValueType} - -%type binding -%type region - -%% - -main: - init target {} -init: - %empty { t = FxOS::TargetDescription(); } - -target: - %empty {} - | binding target { t.bindings.push_back($1); } - -binding: - region ':' PATH { $$ = std::make_pair($1, std::string($3)); - free($3); } - -region: - NAME { $$ = FxOS::MemoryRegion($1); free($1); } - | ADDRESS { $$ = FxOS::MemoryRegion("anon", $1, $1, true); } - | ADDRESS '(' SIZE ')' { $$ = FxOS::MemoryRegion("anon", $1, $1+$3, true); } - -%%