1#
2# File: ndcg.dcg
3# Defines the datastructures used by the current version of dcg
4# i.e. Applying dcg to ndcg.dcg should yield two files ndcg.[ch]
5# which apart from some small changes should equal dcg_code.[ch]
6#
7# CVS ID: "$Id: ndcg.dcg,v 1.2 2002/11/01 12:44:31 marcs Exp $"
8#
9def =	 ( lhs:		string;				# base name of type
10	   -nrlsts:	int;				# nr of needed list levels
11	   -implsts:	int;				# nr of imported list levels
12	   Primitive 					# Standard type
13	 | Enum		elems:[string]			# Enumeration type
14	 | Record	fixed:[field] variant:[vfield]	# Record
15	 ;
16	 );
17
18stat =	 ( Use	utype:[type]				# Use statement
19	 | Import imp:string;
20	 );
21
22field =  ( fname: string;				# Fixed field
23	   ftype: type;
24	   ftrav: int;
25	 );
26
27vfield = ( cons: string;				# Variant field
28	   parts: [field];
29	 );
30
31type =	 ( Tname tname:string |				# Type name
32	   Tlist etyp:type ;				# List of type
33	 );
34
35? [def], [stat];
36