/* $Header:eparser.y 12.0$ */
/* $ACIS:eparser.y 12.0$ */
/* $Source: /ibm/acis/usr/src/ibm/lib/tools/RCS/eparser.y,v $ */

%token	ENV_NAME
	START_FIELDS
	END_FIELDS
	SEPERATOR
	GETS
	IDENT
	INTEGER
	STRING
	BOGUS
%start Environment
%%
Environment	:	START_FIELDS FieldList END_FIELDS {return(TRUE);}
		|	error				  {return(FALSE);}
		;

FieldList	:	FieldList SEPERATOR Field
		|	Field
		;

Field		:	FieldSpec GETS INTEGER
			{
			    env_AddInt(current_env,fieldname,argint);
			}
		|	FieldSpec GETS STRING
			{
			    env_AddString(current_env,fieldname,argstring);
			}
		|	FieldSpec GETS IDENT
			{
			    env_AddEnum(current_env,fieldname,argstring);
			}
		|	FieldSpec
			{
			    env_AddSet(current_env,fieldname);
			}
		|
		;
FieldSpec	:	IDENT
			{
			    strcpy(fieldname,argstring);
			}
%%
