mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-26 02:01:03 +00:00
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1916 72102866-910b-0410-8b05-ffd578937521
67 lines
748 B
Text
67 lines
748 B
Text
|
|
%{
|
|
#include <Foundation/NSObject.h>
|
|
#include <Foundation/NSString.h>
|
|
#include <Foundation/NSDictionary.h>
|
|
static NSMutableDictionary *properties;
|
|
|
|
%}
|
|
|
|
|
|
%token <obj> QUOTED LABEL
|
|
%token SEMICOLEN EQUALS ERROR
|
|
|
|
%union {
|
|
id obj;
|
|
}
|
|
|
|
%type <obj> value
|
|
|
|
%%
|
|
|
|
file: asignments
|
|
{
|
|
return 1;
|
|
}
|
|
| error
|
|
{
|
|
return 0;
|
|
}
|
|
| ERROR
|
|
{
|
|
return 0;
|
|
};
|
|
|
|
|
|
asignments: asignment
|
|
| asignments asignment
|
|
;
|
|
|
|
asignment: value EQUALS value SEMICOLEN
|
|
{
|
|
[(NSMutableDictionary *)properties setObject: $3 forKey: (NSString *) $1];
|
|
}
|
|
;
|
|
|
|
value: LABEL
|
|
{
|
|
$$ = $1;
|
|
}
|
|
| QUOTED
|
|
{
|
|
$$ = $1;
|
|
};
|
|
|
|
%%
|
|
|
|
int sferror(char *s)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
void
|
|
sfSetDict(NSMutableDictionary *aDict)
|
|
{
|
|
properties = aDict;
|
|
}
|
|
|