 Codes for Parsing Input Lines

 A line is initially analysed as a set of strings. 
 Each component string is described by three parameters:
    StringText   -  the actual String
    StringType   -  The type of string.
    String value -  A value associated with the stringtype

In the case of a keyword the value is set tp the position of 
the word in the relevant dictionary. For example, amove is assigned
StringType  20 and StringValue 1. For keywords such as end which 
appear in more than one dictionary, the selection of a particular 
dictionary depends on the setting of flags. 
Numbers, constants, expressions etc. which have a specific numeric 
value are evaluated and their numerical value is held in 
StringValue.

A list of these StringTypes used in GLE99 follows
The dictionaries are listed at the end of this document. 

  StringType                Description
     1          A Maths command as used in Mathpad
                Its StringValue identifies the command position 
                in the list of commands.
     2          Unused
     3          A variable identifier. Its StringValue is the 
                current value assigned to the variable.
     4          A constant
     5          A number. Its StringValue is the actual number.
     6          An expression or function. The StringValue is the
                value obtained by evaluating the expression.
     7          A comment 
     8          A Continuation flag

All the above are used in MathPad. The following have been added 
for use in GLE99

     9          A String Variable
    10          A Text String
    11          A Line label. Its StringValue is an index 
                of its location in the list of lable records.
    12          A quoted string
    13          A formatting code (Colon followed by a digit)
    14          A String Expression. Its StringText is the string
                evaluated by the expression.  
    15-19       Reserved for possible maths functions.
    20          A GLE graphics command. Its StringValue is the 
                command number
    21          A GLE line Parameter. The StringValue identifies 
                the parameter.
    22          A GLE box parameter.
    23          A GLE Circle or Ellipse Parameter
    24          A colour
    25          A fill style
    26          A font name
    27          A font parameter
    28          A Marker parameter
    29          A Gle Setting.
    30          A GLE block parameter
    31          A GLE loop parameter
    32          A GLE subroutine call
    33          A Misc. GLE Graphics Parameter

Values from 40 - 59 are reserved for graphs

    40          A Graph command
    41          A Graph Parameter
    42          An Axis parameter
    43          A dataset parameter
    44          A dataset label
    45          A dataset column number
    46          A special dataset symbol

    50          A polar plot parameter
    51          An angleaxis parameter

Values from 60 -99 are reserved for keys, 
surface plots etc.

The dictionaries used to identify keywords are found in 
Unit GLETools. They are:

   Markers:mrkrs=('circle','triangle','square','diamond','fcircle',
                  'ftriangle','fsquare','fdiamond','dot','cross',
                  'club','heart','star','snake','dag',
                  'ddag','asterisk','oplus','ominus','otimes',
                  'odot','trianglez','squarez','diamondz','wcircle',
                  'wtriangle','wsquare','wdiamond','sqdot','dmddot',
                  'plus');
   colors:clrs=('black','white','darkred','red','lightred',
               'darkgreen','green','lightgreen','darkblue','blue',
               'lightblue','darkbrown','brown','lightbrown','yellow',
               'darkgrey','midgrey','grey','silver','lightgrey',
               'maroon','olive','purple','fuschia','lime',
               'aqua','primrose','parchment','peach','offwhite',
               'lavender','bluetint','greentint','pink','clear',
               'colr0','colr1','colr2','colr3','colr4',
               'colr5','colr6','colr7','colr8','clr9');
   Graphics:grphcs=('aline','amove','arc','arcto','begin',
               'bezier','bigfile','box','circle','closepath',
               'curve','define','dfont','ellipse','pixelspercm',
               'end','windoworigin','fclose','fill','fopen',
               'fillto','fillover','grestore','gsave','icon',
               'x4x','include','input','join','let',
               'marker','move','narc','newpath','x5x',
               'piechart','apolygon','rpolygon','rbezier','print',
               'region','x7x','reverse','rline','rmove',
               'save','set','size','square','x8x',
               'text','x9x','use','xwhilex','write',
               'xaxis','x2axis','yaxis','y2axis' );
    Graphs:grphs=('bar','data','end','fill','fullsize',
               'hscale','setkey','let','nobox','size',
               'title','vscale','xaxis','x2axis','yaxis',
               'y2axis','zaxis','z2axis','showdataat','fromrow',
               'torow','steprowby','fromcol','tocol','stepcolby');
    {There should be nocommon graph and axis parameters}
    AxisPars:xpars=('color','font','format','hei','length',
               'linewidth','linecolor','linestyle','dticks','dsubticks',
               'dmidticks','dgrid','dsubgrid','dmidgrid','tickstart',
               'subtickstart','midtickstart','gridstart','subgridstart',
                        'midgridstart',
               'nticks','nmidticks','nsubticks','ngrids','nmidgrids',
               'nsubgrids','max','min','dist','side',
               'ticks','midticks','subticks','grid','midgrid',
               'subgrid','angle','title','log','linear',
               'negate','nofirst','nolast','on','off',
               'labels','midlabels','names','places','start',
               'end','shift','offset','midplaces','prob'
               ,'float','fix');
    {There should be no common graph and plot parameters}
    PlotPars:pltpars=('autoscale','line','marker','err','errwidth',
                      'errup','errdown','from','herr','herrwidth',
                      'herrleft','herrright','key','linestyle','linewidth',
                      'linecolor','border','size','XmkrlinecolorX',
                      'fillcolor',
                      'nomiss','smooth','smoothm','xmin','xmax',
                      'ymin','ymax','xaxis','yaxis','x2axis',
                      'y2axis','on','off','use');
    {these parameters may be same as axis and plot parameters   }
    GraphPars:grphprs=('linestyle','linewidth','color','xxxx','xxxx',
                        'xxxx','pos','hei','offset','from',
                        'xtox','xstepx','font','dist','on',
                        'grid','log','min','max','dpoints',
                        'length','xxxxx','xxxxx');
   DataOps:symbols=['*','+','-','/','<','>','^','_','|'];
   keys:kys=('offset','position','text','linestyle','marker',
             'msize','mscale','color','hei','fill',
             'nobox');
   Beginnings:bgn=('origin','rotate','scale','translate','graph',
                   'box','clip','key','path','table',
                   'text','fill','add','nobox','name',
                   'stroke','width','xaxis','x2axis','yaxis',
                   'y2axis','zaxis','z2axis');
   { use codes  25 on for FOr loop, REPEAT, WHILE, and IF structures}
   Boxes:bxs=('fill','justify','nobox','name');
   JustTo:jst=('left','centre','right','tl','tc','tr',
        'lc','cc','rc','bl','bc','rc');
   Lines:lns=('arrow','start','end','both','none');
   Settings:stngs=('cap','but','round','square','fontcolor',
      'dashlen','fillstyle','fillcolor','font','fontlinewidth',
      'hei','join','mitre','round','bevel',
      'just','linewidth','linestyle','linecolor','arrowstyle',
      'arrowlinecolor','arrowfillcolor','arrowsize','roman','froman',
      'wroman','greek','fgreek','wgreek','norman',
      'fnorman','wnorman','saxon','fsaxon','wsaxon',
      'fill2color','fillbcolor','color');
  {MathPad commands used for evaluating expressions }
   MPComs:cmds=('now','settings','=','diagnostics','clear',
                'degrees','radians','fix','float','x1x',
                'for','to','step','next','repeat',
                'until','while','endwhile','goto','x2x',
                'if','elseif','else','endif','return',
                'sub');
 {MP functions}
    MPfns:fns=('now(','abdate(','date(','left$(',
      'right$(','seg$(','num$(','num1$(','chr$(',       { '1' to '9'}
      'abs(','atn(','cos(','exp(','fix(','int(','len(',
      'log(','log10(','not(','pos(','rnd(','sgn(','sin(',
      'sqr(','sqrt(','tan(','val(','acos(','asin(','atn2(',
      'cosh(','sinh(','tanh(','acosh(','asinh(',        {'A' to 'Z'}
      'atanh(','erf(','erfc(','si(','ci(','gamma(',
      'lgamma(','fact(','bjn(','bkn(','bin(','byn(',
      'bico(','frc(','frs(','xxx','xxx','xxx','xxx','xxx',
      'xxx','xxx','xxx','xg(','yg(','xxx');             {'a' to 'z'}
  {MP variables}
    Letters:Symbols=['a','b','c','d','e','f','g','h','i','j','k',
    'l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','$'];
  {Standard terminators}
    Stop1:Symbols=[' ',';'];
  {Extended terminators}
    Stop2:Symbols=[' ',',',';','('];
    Stop3:Symbols=[',',';',')'];
  {Maths operators}
    MathOps:Symbols=['+','-','~','*','/','^'];
    LogOps:Symbols=['>','<','=','|','&','','',''];
    Digits:Symbols=['0','1','2','3','4','5','6','7','8','9'];
    AddOps:Symbols=['+','-'];
    Constants:constnts=('pie','rad','deg','exp','loge',
                        'ln10','NtoDB','xx1','xx2','yx1',
                        'yx2','zx1','zx2');

This list may be ammended during subsequent development of the 
program.

    D. Ingram
       11:46 19/11/98
