remove long-unused parser file
This commit is contained in:
parent
cd52f5efd6
commit
41fbdb144e
|
@ -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); }
|
||||
|
||||
%%
|
Loading…
Reference in New Issue