/***************************************/

/*
 *		'D' parser module
 * Version	0.0.0.0 GPL (alpha)
 * Copyright	C.R.Chafer 2002/6/11
 * Author	C.R.Chafer
 * Contact	c.chafer@herts.ac.uk
 * License	GPL v2 (www.fsf.org)
 *		(contact me for versions
 *		 under other licenses)
 *
 */

/***************************************/

/*
 * Notes:	This is not to be assumed
 *		definitive - see
 *		http://www.digitalmars.com
 *		for definitive D spec
 */
	
/***************************************/
%{

#include "d.h"
#define YYERROR_VERBOSE

%}

%union {
	U32	i;	/* integer */
	F64	f;	/* float / imaginary */
	CH*	s;	/* string / symbol */
	/* more ... */
}

%token	<s>	_S _V		/* string, variable */
%token	<f>	_F _J		/* float, imaginary */
%token	<i>	_I
%token		_EOF		/* end of file */
%token		_this _super _assert _null _true _false _cast
%token		_new _delete _throw
%token		_void _byte _ubyte _short _ushort _int _uint
%token		_long _ulong _cent _ucent _float _double _extended
%token		_bit _char _wchar _imaginary _complex
%token		_if _else _while _for _do _switch _case
%token		_default _break _continue _synchronized
%token		_return _goto _try _catch _finally _with
%token		_struct _class _interface _union _enum
%token		_import _static _final _const _typedef
%token		_alias _override _abstract _debug _version
%token		_deprecated _in _out _inout _align _extern
%token		_private _protected _public _export
%token		_body _invariant _asm _delegate
%token		_DIVE _DOT2 _DOT3 _ANDE _ANDB _IORE _IORB
%token		_SUBE _DEC _ADDE _INC _LEQ _SHL _SHLE
%token		_GLS _GLSE _GEQ _SHRE _SARE _SHR _SAR
%token		_NEQU _NEQUR _NEQUV _NGLS _NGLSE _NLES
%token		_NLEQ _NGRT _NGEQ _EQU _EQUR _MULE _MODE
%token		_XORE _CAT

%%

/**************************************************************************/

d	:	_EOF			{ return FALSE	;}
	;

/**************************************************************************/

%%

int main( an, av )
	int an
;	char**av
;{	if( an<2 ) printError( "Input file not specified", av[0], 0 )
 ;	setInput( av[1] )
 ;	initialise()
 ;	while( yyparse() )
 ;	finialise()
 ;	return EXIT_SUCCESS
;}


