Sensory Grammar (yacc-style)
AUTHOR: Dr. Gerd Döben-Henisch
FIRST DATE: December 28, 1995
DATE of LAST CHANGE: December 28, 1995
%union {
long int longint;
unsigned long int ulongint;
char string[250];
};
%token LB
%token RB
%token SENS
%token SENS1
%token SENS2
%token SMELL
%token TASTE
%token TOUCH
%token HEARL
%token HEARN
%token BODY_REGION
%token DIRECTION
%token INTENSITY
%token VOICEDATA
%token NOISEDATA
%token SMELLDATA
%token TASTEDATA
%token TOUCHDATA
%token POS
%token SUCCESS
%token GO
%token MOVE
%token TURNBODY
%token SAY
%token TAKE
%token PUT
%token PAIRING
%token EAT
%token WHOWASIT
%token LOGOUT
%token WTOKEN
%token SSTOKEN
%token STOKEN
%token SITOKEN
%token ETOKEN
%token CTOKEN
%token ZERO
%token ULONG
%token LONG
%%
sensdata: /* empty */
|
SENS LB sens_arg RB
|
SENS1 LB sens1_arg RB
|
SENS2 LB sens2_arg RB
;
sens_arg: sens_stmt
|
sens_arg sens_stmt
;
sens_stmt: HEARN LB reg_intens_arg hearn_arg RB
|
SMELL LB reg_intens_arg smell_arg RB
|
TASTE LB reg_intens_arg taste_arg RB
|
TOUCH LB reg_intens_arg touch_arg RB
;
reg_intens_arg: BODY_REGION sarg INTENSITY int
;
hearn_arg: DIRECTION int NOISEDATA sarg
;
smell_arg: DIRECTION int SMELLDATA int4
;
taste_arg: TASTEDATA sarg
;
touch_arg: TOUCHDATA LB narg_pure RB POS int3
;
sens1_arg: success_arg
|
success_arg hearl_arg
|
success_arg sens_arg
|
success_arg hearl_arg sens_arg
;
sens2_arg: hearl_arg
|
hearl_arg sens_arg
;
hearl_arg: hearl_stmt
|
hearl_arg hearl_stmt
;
hearl_stmt: HEARL LB voice_arg RB
;
voice_arg: reg_intens_arg DIRECTION int VOICEDATA LB speech_act RB WHOWASIT sarg
;
speech_act: utterance
|
utterance ETOKEN
|
ETOKEN
;
utterance: word
|
utterance word
|
utterance CTOKEN word
;
word: STOKEN
|
SSTOKEN
|
WTOKEN
;
success_arg: SUCCESS LB success_stmt RB
;
success_stmt: GO int3
|
MOVE int3
|
TURNBODY int3
|
SAY int3
|
TAKE int3
|
PUT int3
|
PAIRING int3
|
EAT int3
|
LOGOUT LB ZERO RB
;
/***************************************************
* LEXICON
***************************************************/
narg_pure: STOKEN SITOKEN
;
sarg: LB STOKEN RB
|
LB SITOKEN RB
;
int: LB LONG RB
;
int3: LB LONG LONG LONG RB
;
int4: LB LONG LONG LONG LONG RB
;
Comments are welcomed to kip-ml@inm.de
Daimlerstrasse 32, 60314 Frankfurt am Main, Deutschland. Tel +49- (0)69-941963-0, Tel-Gerd: +49- (0)69-941963-10