/********************
	 The Geometer's Sketchpad
	 (C) 1989-1998 by Key Curriculum Press, Inc.
	 All rights reserved.																				

	uic_cons.dat
 
	Original Author:		Nick Jackiw
	Creation Date:			29 December 1997
	Most Recent:			$Author$
	Edit Date:				$Date$
	
	Overview:
	uic_cons.h defines all of the Sketchpad-specific constant data and symbolic
	identifiers that define the command specifiers parsed by the UI Command's
	UIC_ConstructObjects_actionProc(). In English: this file defines a database
	(table) that describes the various construction actions required to execute
	an object-constructing menu command on the current selection.
	
	This file should only be #included by uic_actn.c. It is >not< a header
	file, in that it declares constant data, and is not set up for multiple inclusion!

	$History:  $
	$NoKeyWords: $
		
*******************/

/* 
	Currently, all platforms and builds use byte-size storage for specifier tokens.
	On desktop platforms with no particular memory constraints, we might want to
	someday expand this to a larger unit, if the host processor can access larger
	units more efficiently than bytes.
	
	N.B. This value should always be unsigned!
*/

#define gObjConstructionSpecifier_UNIT unsigned char

static const gObjConstructionSpecifier_UNIT gObjConstructionCommandSpecifiers[]=
/*
	Specifiers for all commands that use UIC_ConstructObjects_actionProc(). To parse a particular
	specifier, invoke UIC_ConstructObjects_actionProc() with an actionArg value corresponding
	to the specifier's zero-based offset in this data table:
*/

{
	/* <0> Perpendicular: 1 point x n straights */
	UIC_ConstructGrammar_Promote_ID, PointKind,
	UIC_ConstructGrammar_IterateGenus_ID, Straight_Genus, Perpend_C,
	
	/* <5> Perpendicular: n point x 1 straights */
	UIC_ConstructGrammar_Promote_ID, PointKind,
	UIC_ConstructGrammar_IterateKind_ID, PointKind, Perpend_C,
	
	/* <10> Midpoint: n segments */
	UIC_ConstructGrammar_IterateKind_ID, StraightKind, Midpoint_C,
	
	/* <13> Circle: 2 points only */
	UIC_ConstructGrammar_Construct_ID, Circle_C,
	
	/* <15> CircleRadius: 1 point x n distances */
	UIC_ConstructGrammar_Promote_ID, PointKind,
	UIC_ConstructGrammar_IterateGenus_ID, AbstractDistance_MultiGenus, CircleRadius_C,
	
	/* <20> CircleRadius: n points x 1 distances */
	UIC_ConstructGrammar_Promote_ID, PointKind,
	UIC_ConstructGrammar_IterateKind_ID, PointKind, CircleRadius_C,
	
	/* <25> Parallel: 1 point x n straights */
	UIC_ConstructGrammar_Promote_ID, PointKind,
	UIC_ConstructGrammar_IterateGenus_ID, Straight_Genus, Parallel_C,
	
	/* <30> Parallel: n point x 1 straights */
	UIC_ConstructGrammar_Promote_ID, PointKind,
	UIC_ConstructGrammar_IterateKind_ID, PointKind, Parallel_C,
	
	/* <35> Angle Bisector: 3 points */
	UIC_ConstructGrammar_Construct_ID, Bisector_C,
	
	/* <37> Polygon Interior:n points */
	UIC_ConstructGrammar_Construct_ID, Polygon_C,
	
	/* <39> Intersect: 2 straights */
	UIC_ConstructGrammar_Construct_ID, InterLL_C,
	
	/* <41> Circle Interior(s): n circles */
	UIC_ConstructGrammar_IterateKind_ID, CircleKind, CircleInterior_C,
	
	/* <44> Measure Length: n segments */
	UIC_ConstructGrammar_IterateKind_ID, StraightKind, LengthM_C,
	
	/* <47> Measure Straight Distance: 1 point & n straights */
	UIC_ConstructGrammar_Promote_ID, PointKind,
	UIC_ConstructGrammar_IterateKind_ID, StraightKind, gLineDistanceM_C,

	/* <52> Measure Straight Distance: n points & 1 straight */
	UIC_ConstructGrammar_Promote_ID, PointKind,
	UIC_ConstructGrammar_IterateKind_ID, PointKind, gLineDistanceM_C,


	/* <57> Measure Perimeter: n polygons */
	UIC_ConstructGrammar_IterateGenus_ID, AbstractPerimeter_MultiGenus, PerimeterM_C,

	/* <60> Measure Circumference: n circles or circle interiors */
/*	UIC_ConstructGrammar_IterateAll_ID, CircumferenceM_C,*/
	UIC_ConstructGrammar_IterateGenus_ID, Object_Genus, CircumferenceM_C,

	/* <63> Measure Angle: 3 points */
	UIC_ConstructGrammar_Construct_ID, Angle3PointsMeasure_C,
	
	/* <65> Measure Area: n interiors */
	UIC_ConstructGrammar_IterateGenus_ID, Object_Genus, AreaM_C,

	/* <68> Measure Arc Angle: arc, arc interior */
	UIC_ConstructGrammar_IterateGenus_ID, Object_Genus, ArcAngle3PointsMeasure_C,
	
	/* <71> Measure Arc Angle: circle + 2 or 3 points */
	UIC_ConstructGrammar_Promote_ID, CircleKind,	/* put the circle first */
	UIC_ConstructGrammar_Construct_ID, ArcAngle3PointsMeasure_C,
	
	/* <75> Measure Arc Length: arc, arc interior */
	UIC_ConstructGrammar_IterateGenus_ID, Object_Genus, ArcLengthM_C,
	
	/* <78> Measure Arc Length: circle + 2 or 3 points */
	UIC_ConstructGrammar_Promote_ID, CircleKind,	/* put the circle first */
	UIC_ConstructGrammar_Construct_ID, ArcLengthM_C,
	
	/* <82> Measure Geometric Slope: n straight objects */
	UIC_ConstructGrammar_IterateGenus_ID, Object_Genus, GeometricSlopeM_C,
	
	/* <85> Measure Radius: n curved objects */
	UIC_ConstructGrammar_IterateGenus_ID, Object_Genus, RadiusM_C,
	
	/* <88> Measure Ratio: two segments, or three collinear points */
	UIC_ConstructGrammar_Construct_ID, RatioM_C,
	
	/* <90> Measure Abscissa: n points, to which we must add a coordinateSystem
	   before constructing in (point, coordSys) pairs */
	UIC_ConstructGrammar_GetMarkedCoordSys_ID, 
	UIC_ConstructGrammar_Promote_ID, PointKind,
	UIC_ConstructGrammar_IterateKind_ID, PointKind,
	AbscissaM_C,
	
	/* <96> Measure Ordinate: n points, to which we must add a coordinateSystem
	   before dispatching in (point, coordSys) pairs */
	UIC_ConstructGrammar_GetMarkedCoordSys_ID,
	UIC_ConstructGrammar_Promote_ID, PointKind,
	UIC_ConstructGrammar_IterateKind_ID, PointKind,
	OrdinateM_C,
	
	/* <102> Measure Point Distance:  2 points */
	UIC_ConstructGrammar_Construct_ID, DistanceM_C,
	
	/* <104> Measure Rectangular Coordinates: >0 points */
	UIC_ConstructGrammar_GetMarkedCoordSys_ID, 
	UIC_ConstructGrammar_IterateKind_ID, PointKind, RectCoordinateM_C,
	
	/* <108> Plot as (x, y): Marked Coordinate System either doesn't exist or is square */
	UIC_ConstructGrammar_GetMarkedCoordSysWithMeasuredDefaultExtents_ID,
	UIC_ConstructGrammar_Construct_ID, PlotMarkedXMarkedY_C,
	
	/* <111> Plot as (r, Theta): Marked Coordinate System either doesn't exist or is square */
	UIC_ConstructGrammar_GetMarkedCoordSysWithMeasuredDefaultExtents_ID,
	UIC_ConstructGrammar_Construct_ID, PlotMarkedRhoMarkedTheta_C,
	
	/* <114> Measure Polar Coordinates: >0 points */
	UIC_ConstructGrammar_GetMarkedCoordSys_ID, 
	UIC_ConstructGrammar_IterateKind_ID, PointKind, PolarCoordinateM_C,
	
	/* <118> Plot Existing Functions: >0 functions, to which we must add a coordinateSystem
	   before constructing in (function, coordSys) pairs */
	UIC_ConstructGrammar_GetMarkedCoordSys_ID,
	UIC_ConstructGrammar_IterateGenus_ID, Function_Genus, FunctionPlot_C,
	
	/* <122> ArcOnCircle: 1 circle & 2 points */
	UIC_ConstructGrammar_Promote_ID, CircleKind,
	UIC_ConstructGrammar_Construct_ID, ArcOnCircle_C,

	/* <126> ArcAroundPoint: 3 points (center, initial point, final point) */
	UIC_ConstructGrammar_Construct_ID, ArcAroundPoint_C,

	/* <128> Arc3Points: 3 point arc */
	UIC_ConstructGrammar_Construct_ID, Arc3Points_C,

	/* <130> ArcSector */
	UIC_ConstructGrammar_IterateKind_ID, ArcKind, ArcSector_C,
	
	/* <133> ArcSegment*/
	UIC_ConstructGrammar_IterateKind_ID, ArcKind, ArcSegment_C,
	
	/* <136> Coordinate Distance */
	UIC_ConstructGrammar_GetMarkedCoordSys_ID,
	UIC_ConstructGrammar_Construct_ID, CoordinateDistanceM_C,

	/* <139> Measure Analytic Slope: n straight objects + 1 automarked coordSys */
	UIC_ConstructGrammar_GetMarkedCoordSys_ID,
	UIC_ConstructGrammar_IterateGenus_ID, Straight_Genus, AnalyticSlopeM_C,
	
	/* <143> TerminalIteratePoints: n single-mapped point iteratedImages */
	UIC_ConstructGrammar_IterateKind_ID, IterateImageKind, TerminalIterationPoint_C,
	
	/* <146> New Table: n unimeasures or multimeasures */
	UIC_ConstructGrammar_Construct_ID, UserTabulation_C, 

	/* <148> First Intersection: 1 ray & 1 polygon */
	UIC_ConstructGrammar_Promote_ID, StraightKind,
	UIC_ConstructGrammar_Construct_ID, InterRayPolgon_C,

	/* <152> Value of Point: >=1 point & 1 path variant */
	UIC_ConstructGrammar_Promote_ID, PointKind,
	UIC_ConstructGrammar_IterateKind_ID, PointKind, ValueOfPointOnPathM_C,

	/* <157> Plot Value on Path: >=1 scalar & 1 path variant */
	UIC_ConstructGrammar_Promote_Genus, UniMeasure_Genus,	/* measure or an expression, */
	UIC_ConstructGrammar_IterateGenusForValuePlotting_ID, UniMeasure_Genus,PlotMarkedValueOnPath_C,
	
	/* <162> Plot Value on Paths: 1 scalar & >1 path variant */
	UIC_ConstructGrammar_Promote_Genus, UniMeasure_Genus,	/* scalar could a measure or an expression, */
	UIC_ConstructGrammar_IterateGenusForValuePlotting_ID, Path_Genus,PlotMarkedValueOnPath_C,
	
	/* <167> Measure Angle: 2 (segment or ray)s and an optional point */
	UIC_ConstructGrammar_Remove_Genus, Point_Genus,
	UIC_ConstructGrammar_BranchOn2RayOrSegEquivalentTo3Pt, 63,

	/* <171> Bisect Angle: 2 (segment or ray)s and an optional point */
	UIC_ConstructGrammar_Remove_Genus, Point_Genus,
	UIC_ConstructGrammar_BranchOn2RayOrSegEquivalentTo3Pt, 35,	
	
	/* <175> Measure Angle: 1 or more anglemarkers */
	UIC_ConstructGrammar_IterateKind_ID, AngleMarkerKind, AngleMarkerMeasure_C,
	
	/* <178> Measure Polar Distance: n points, to which we must add a coordinateSystem
	   before constructing in (point, coordSys) pairs */
	UIC_ConstructGrammar_GetMarkedCoordSys_ID, 
	UIC_ConstructGrammar_Promote_ID, PointKind,
	UIC_ConstructGrammar_IterateKind_ID, PointKind,
	PolarDistanceM_C,
	
	/* <184> Measure Polar Direction: n points, to which we must add a coordinateSystem
	   before dispatching in (point, coordSys) pairs */
	UIC_ConstructGrammar_GetMarkedCoordSys_ID,
	UIC_ConstructGrammar_Promote_ID, PointKind,
	UIC_ConstructGrammar_IterateKind_ID, PointKind,
	PolarDirectionM_C,
	


	/* 
		WARNING: As you add new specifiers OR IF YOU CHANGE THE DEFINITION OF ANY PREVIOUS
		SPECIFIER in such a way that its variant size changes, be sure to update the
		values in uic_sel.dat, and any UIC_ConstructGrammar_Branch* statements here in uic_cons.dat!
	*/

};
