remove long-unused parser file

This commit is contained in:
Lephenixnoir 2021-03-16 17:30:53 +01:00
parent cd52f5efd6
commit 41fbdb144e
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
1 changed files with 0 additions and 52 deletions

View File

@ -1,52 +0,0 @@
%{
#include <fxos/errors.h>
#include <fxos/util.h>
#include <fxos/load.h>
#include <fxos/vspace.h>
/* The target description to be filled */
FxOS::TargetDescription t;
using BindingDescription = std::pair<FxOS::MemoryRegion,std::string>;
struct ValueType
{
BindingDescription binding;
FxOS::MemoryRegion region;
};
%}
/* Tokens */
%token <char *> NAME
%token <uint32_t> ADDRESS
%token <uint32_t> SIZE
%token <char *> PATH
%define api.value.type {ValueType}
%type<binding> binding
%type<region> 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); }
%%