Debugging Bison/Yacc Grammars

Inevitably when you write Bison/Yacc grammars you will run into a grammatical errors. In this case the grammar was my LBNF grammar (Fortran.cf, Fortran.y, Fortran.l) for Fortran and I'm running the terminal.for module from the old Galaxy program through my 'go' script (current files: debugging.7z). Here's the terminal output from my script run. Interspersed with the output from my echo statements are the outputs from the various programs run (including Bison/Yacc):

alan@Midnight$ ./go terminal.for  -d
--- Arguments ---
fpgm='terminal.for'
flag='-d'
extn='for'
fn='terminal'
--- Clean up ---
--- Compiling LBNF grammar with BNFC ---

148 rules accepted

no change to file ./Absyn.h
no change to file ./Absyn.c
writing file ./Fortran.l (saving old file as ./Fortran.l.bak)
writing file ./Fortran.y (saving old file as ./Fortran.y.bak)
writing file ./Parser.h (saving old file as ./Parser.h.bak)
no change to file ./Skeleton.h
no change to file ./Skeleton.c
no change to file ./Printer.h
no change to file ./Printer.c
no change to file ./Test.c
writing file ./Makefile (saving old file as ./Makefile.bak)
--- Cleaning symbols ---
--- Turning on Debug in Makefile ---
--- Makefile ---
    5c5
    < FLEX_OPTS = -PFortran --debug
    ---
    > FLEX_OPTS = -PFortran
    8c8
    < BISON_OPTS = -t -pFortran --debug -r all -g
    ---
    > BISON_OPTS = -t -pFortran
--- Fixup generated BNF Lexical Analyser ---
--- Show differences: Fortran.l ---
    34c34,35
    < "\n"       { ++yy_mylinenumber; return T_NEWLINE; };
    ---
    > "
    > "        return T_NEWLINE;
    91c92,93
    < [ \t\r]+        /* ignore white space. */;
    ---
    > \n ++yy_mylinenumber ;
    > [ \t\r\n\f]        /* ignore white space. */;
--- Making ---
flex -PFortran --debug -oLexer.c Fortran.l
gcc -g -W -Wall -c Lexer.c
Lexer.c:2053:16: warning: ‘input’ defined but not used [-Wunused-function]
     static int input  (void)
                ^~~~~
Lexer.c:2002:17: warning: ‘yyunput’ defined but not used [-Wunused-function]
     static void yyunput (int c, char * yy_bp )
                 ^~~~~~~
bison -t -pFortran --debug -r all -g Fortran.y -o Parser.c
Fortran.y: warning: 2 shift/reduce conflicts [-Wconflicts-sr]
Fortran.y: warning: 12 reduce/reduce conflicts [-Wconflicts-rr]
gcc -g -W -Wall -c Parser.c
gcc -g -W -Wall -c Test.c
Linking TestFortran...
gcc -g -W -Wall Absyn.o Lexer.o Parser.o Printer.o Test.o -o TestFortran
=========================================
--- Cleaning of input Fortran program ---
Counts:
  Comments:         45
  Continuations:     0
--- Compiling input Fortran program ---
--- Output in TestFortran.out ---
--(end of buffer or a NUL)
--accepting rule at line 86 ("// ESCAPE CHARACTER
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//*********  TERMINAL CONTROL ROUTINES  **************
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//  A TERMINAL WITH CURSOR POSITIONING AND CLEAR SCREEN IS REQUIRED
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//  MODIFY GTCHAR, TPOS, AND CLEAR FOR YOUR TERMINAL(S)
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//****************************************************
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//  BY WILLIAM WOOD, SEPTEMBER 1980
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("// Modified by Stuart Renes, WeCo, July 20th, 1981
")
--accepting rule at line 86 ("// to add Vt52 support and make ADM-3A /FT1 type.
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("// Added ADDS 520/580 support on August 14th, 1981 as
")
--accepting rule at line 86 ("// /FT2 type.
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//   TPOS - PUT CHARS IN BUF TO POSITION CURSOR AT IROW, ICOL
")
--accepting rule at line 86 ("// WPW 9/19/80
")
--accepting rule at line 91 ("      ")
--accepting rule at line 82 ("SUBROUTINE")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("TPOS")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("IROW")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("ICOL")
--accepting rule at line 37 (")")
")accepting rule at line 91 ("
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("      ")
--accepting rule at line 61 ("COMMON")
--accepting rule at line 42 ("/")
--accepting rule at line 87 ("CURSOR")
--accepting rule at line 42 ("/")
--accepting rule at line 87 ("TTYPE")
")accepting rule at line 91 ("
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("      ")
--accepting rule at line 74 ("INTEGER")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("TTYPE")
")accepting rule at line 91 ("
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("      ")
--accepting rule at line 57 ("BYTE")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("ADMV")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("2")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("VT100V")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("2")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("vt52v")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("2")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("addsv")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("2")
--accepting rule at line 37 (")")
")accepting rule at line 91 ("
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("      ")
--accepting rule at line 77 ("PARAMETER")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("ADM3A")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("1")
")accepting rule at line 91 ("
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("      ")
--accepting rule at line 77 ("PARAMETER")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("VT100")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("2")
")accepting rule at line 91 ("
--accepting rule at line 34 ("
")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("parameter")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("vt52")
error: line 28: syntax error at vt52
alan@Midnight$

The important part for this post are the lines:

bison -t -pFortran --debug -r all -g Fortran.y -o Parser.c
Fortran.y: warning: 2 shift/reduce conflicts [-Wconflicts-sr]
Fortran.y: warning: 12 reduce/reduce conflicts [-Wconflicts-rr]

This tells us there are two types of errors occuring shift/reduce and reduce/reduce which prevents Bison/Yacc from creating a parser. There can be other types of errors, such as gramatical errors, which will only be discovered by thorough testing.

Understanding the errors

To understand exactly what shift/reduce and reduce/reduce errors a compiler course which includes the theory of LR parsers would be handy. However, the quick explanation is that as Bison/Yacc tries to find a complete rule in your grammar it shifts (lexical and rule) tokens onto the stack until it finds the last token in the rule then Bison/Yacc reduces (removes) all the tokens on the stack corresponding to that rule and replaces them with a single token of that rule type. Essentially it is building the AST (Abstract Synatx Tree) representation of the program being compiled.

To solve these types of errors we look at the Parser.output file which contains the output of the run of Bison/Yacc. This file contains a number of sections:

  • Error list
  • Abbreviated grammar
  • Terminal (leaf) nodes in the AST
  • Non-Terminal (internal) nodes in the AST
  • The generated grammar states.

The Error list just lists all the shift/reduce and reduce/reduce errors that need to be fixed before a working parser is generated. The Abbreviated grammar shows the raw grammar without any adornments that go along with the grammar (like your C-code). This abbreviated grammar is usually easier to read once the parser file becomes filled in.

The Terminal (leaf) node list gives a cross reference to the rules in the Abbreviated grammar where that terminal node appears. The first number in each line, in brackets (), is the token ID of the token (the lexer and parser use this number to communicate the token).

The Non-Terminal node list again has a node ID in brackets() and then lists all the grammar rules that contain that node on either the right-hand-side(output) or the left-hand-side(input).

The Generated grammar states are created corresponding to a NFA (Non-deterministic Finite Atomaton) which is like a DFA (Deterministic FA) but will take into account the Bison/Yacc grammar doesn't always have a terminal token at each location. For instance in the following grammar line when the parser tries to parse a 'statement' it has three (in this case) statements that it can follow. In a DFA it needs a terminal-token (e.g. 'a','b','c', ... , '(', ')' etc to make a decision on which rule to follow. What a NFA does is just follows all the possibilities until it finds a terminal token :

statement := dimension_statement | for_statement | assignment_statement

The gist of this is that the generated states in the Parser.output file will look very dissimilar to any one of your rules (usually). They will be, instead, a collection of your rules. Here is the generated state 2 from my grammar:

State 2

    1 Program: ListLblStm .  [$end]
    3 ListLblStm: ListLblStm . LblStm T_NEWLINE
    4 LblStm: . Labeled_stm
    5       | . Simple_stm
    6       | . %empty  [T_NEWLINE]
    7 Labeled_stm: . _INTEGER_ Simple_stm
    8 Simple_stm: . T_IMPL Type_Spec Type_Qual T_LPAREN T_NAME T_MINUS T_NAME T_RPAREN
    9           | . T_PARM ListNameValue
   10           | . T_DIMS ListNameDim
   11           | . Type_Spec Type_Qual ListNameDim
   12           | . Type_Spec ListNameDim
   13           | . T_DATA ListDataSeg
   14           | . T_COMM T_DIV T_NAME T_DIV ListName
   15           | . T_WRITE T_LPAREN ListAssignName T_RPAREN
   16           | . T_WRITE T_LPAREN ListAssignName T_RPAREN ListNameOrArray
   17           | . T_FMT T_LPAREN ListFmtSpecs T_RPAREN
   18           | . T_READ T_LPAREN ListAssignName T_RPAREN ListNameOrArray
   19           | . T_READ T_EQUALS LExp
   20           | . T_IF T_LPAREN LExp T_RPAREN IfThenPart
   21           | . T_NAME T_EQUALS LExp
   22           | . T_NAME T_LPAREN ListLExp T_RPAREN T_EQUALS LExp
   23           | . T_CALL T_NAME T_LPAREN ListSpecLExp T_RPAREN
   24           | . T_CALL T_NAME
   25           | . T_GO T_TO _INTEGER_
   26           | . T_OPEN T_LPAREN ListAssignName T_RPAREN
   27           | . T_CLOSE T_LPAREN ListAssignName T_RPAREN
   28           | . T_DO _INTEGER_ DoRangePart
   29           | . T_STOP
   30           | . T_STOP T_SQSTR
   31           | . T_END
   32           | . T_SUBR T_NAME T_LPAREN ListSpecLExp T_RPAREN
   33           | . T_SUBR T_NAME
   34           | . T_FUNC T_NAME T_LPAREN ListSpecLExp T_RPAREN
   35           | . T_FUNC T_NAME
   36           | . T_CONT
   37           | . T_RTN
   38           | . T_EQU T_LPAREN T_NAME T_COMMA NameOrArrRef T_RPAREN
  143 Type_Spec: . T_INT
  144          | . T_REAL
  145          | . T_DBL
  146          | . T_CHAR
  147          | . T_BYTE
  148          | . T_LOGI

    T_BYTE     shift, and go to state 4
    T_CALL     shift, and go to state 5
    T_CHAR     shift, and go to state 6
    T_CLOSE    shift, and go to state 7
    T_COMM     shift, and go to state 8
    T_CONT     shift, and go to state 9
    T_DATA     shift, and go to state 10
    T_DIMS     shift, and go to state 11
    T_DO       shift, and go to state 12
    T_DBL      shift, and go to state 13
    T_END      shift, and go to state 14
    T_EQU      shift, and go to state 15
    T_FMT      shift, and go to state 16
    T_FUNC     shift, and go to state 17
    T_GO       shift, and go to state 18
    T_IF       shift, and go to state 19
    T_IMPL     shift, and go to state 20
    T_INT      shift, and go to state 21
    T_LOGI     shift, and go to state 22
    T_OPEN     shift, and go to state 23
    T_PARM     shift, and go to state 24
    T_READ     shift, and go to state 25
    T_REAL     shift, and go to state 26
    T_RTN      shift, and go to state 27
    T_STOP     shift, and go to state 28
    T_SUBR     shift, and go to state 29
    T_WRITE    shift, and go to state 30
    T_NAME     shift, and go to state 31
    _INTEGER_  shift, and go to state 32

    T_NEWLINE  reduce using rule 6 (LblStm)
    $default   reduce using rule 1 (Program)

    LblStm       go to state 33
    Labeled_stm  go to state 34
    Simple_stm   go to state 35
    Type_Spec    go to state 36

In the numbered lines at the top corresponding to our grammar the period '.' corresponds to the location in all those rules that is the current position of parsing. Thus in lines 8-32 we are in the Simple_stm: part of our grammar waiting to get the first token of a new statement. If we get a T_WRITE token then two rules (15,16) will correspond. If we then go down to the next section which shows what we do when we get various tokens we see that a T_WRITE leads us to state 30 where we will process the next tokens from a write statement (e.g "WRITE(1, 13) (ISCORE(I), I = 1, 8)" ).

Shift/Reduce and Reduce/Reduce errors

So now lets look at the two types of errors shift/reduce and reduce/reduce errors in my program and go through the debugging process.

The shift/reduce error then is when Bison/Yacc can't decide whether to shift the next token onto the stack (for instance when we are in the middle of a statement) or remove a set of tokens and replace them with a single token (like when a statement has been completely parsed). Here is the top of my Parser.output file:

Terminals unused in grammar

   _ERROR_


State 174 conflicts: 1 shift/reduce
State 178 conflicts: 3 reduce/reduce
State 226 conflicts: 3 reduce/reduce
State 227 conflicts: 3 reduce/reduce
State 228 conflicts: 1 shift/reduce, 3 reduce/reduce

Error "State 174 conflicts: 1 shift/reduce"

First lets look at the "State 174 conflicts: 1 shift/reduce" error. Going down to "State 174" in this file we find:

State 174

   90 LExp: . LExp T_OR LExp2
   91     | . LExp T_AND LExp2
   92     | . LExp2
   93 LExp2: . LExp2 T_EQ LExp3
   94      | . LExp2 T_NE LExp3
   95      | . LExp3
   96 LExp3: . LExp3 T_LT LExp4
   97      | . LExp3 T_GT LExp4
   98      | . LExp3 T_LE LExp4
   99      | . LExp3 T_GE LExp4
  100      | . LExp4
  101 LExp4: . LExp4 T_PLUS LExp5
  102      | . LExp4 T_MINUS LExp5
  103      | . LExp5
  104 LExp5: . LExp5 T_MULT LExp6
  105      | . LExp5 T_DIV LExp6
  106      | . LExp6
  107 LExp6: . Unary_operator LExp7
  108      | . LExp7
  109 LExp8: . LExp5 T_POW LExp8
  110      | . LExp8 T_LPAREN T_RPAREN
  110      | LExp8 T_LPAREN . T_RPAREN
  111      | . LExp8 T_LPAREN ListSpecLExp T_RPAREN
  111      | LExp8 T_LPAREN . ListSpecLExp T_RPAREN
  112      | . LExp9
  113 LExp9: . TIntVar RangePart
  114      | . T_SQSTR
  115      | . LExp10
  118 TIntVar: . _INTEGER_
  119        | . T_TRUE
  120        | . T_FALSE
  121        | . T_NAME
  122        | . T_READ
  125 LExp7: . LExp8
  126 LExp10: . LExp11
  127 LExp11: . T_LPAREN LExp T_RPAREN
  128 Unary_operator: . T_PLUS
  129               | . T_MINUS
  130               | . T_NOT
  131 ListSpecLExp: . SpecLExp
  132             | . SpecLExp T_COMMA ListSpecLExp
  133 SpecLExp: . %empty  [T_RPAREN, T_COMMA]
  134         | . LExp

    T_LPAREN   shift, and go to state 93
    T_MINUS    shift, and go to state 94
    T_RPAREN   shift, and go to state 229
    T_PLUS     shift, and go to state 95
    T_TRUE     shift, and go to state 96
    T_FALSE    shift, and go to state 97
    T_NOT      shift, and go to state 98
    T_READ     shift, and go to state 99
    T_NAME     shift, and go to state 100
    T_SQSTR    shift, and go to state 101
    _INTEGER_  shift, and go to state 102

    T_RPAREN  [reduce using rule 133 (SpecLExp)]
    $default  reduce using rule 133 (SpecLExp)

    LExp            go to state 129
    LExp2           go to state 104
    LExp3           go to state 105
    LExp4           go to state 106
    LExp5           go to state 107
    LExp6           go to state 108
    LExp8           go to state 109
    LExp9           go to state 110
    TIntVar         go to state 111
    LExp7           go to state 112
    LExp10          go to state 113
    LExp11          go to state 114
    Unary_operator  go to state 115
    ListSpecLExp    go to state 230
    SpecLExp        go to state 131

The second section were Bison/Yacc show the SHIFTs and REDUCEs it wants to do you can see two lines that define the problem:

    T_RPAREN   shift, and go to state 229
              ...
    T_RPAREN  [reduce using rule 133 (SpecLExp)]

The parser wants to both SHIFT and REDUCE at this state when it gets a T_RPAREN or ')'. So now we have to go through our grammar (at the top of this state) to determine where we see a period '.' followed directly by a T_RPAREN. There are two places (grammar lines 110 and 133). In line 110 :

  110      | LExp8 T_LPAREN . T_RPAREN
  133 SpecLExp: . %empty  [T_RPAREN, T_COMMA]

This is a good time to go back to our original grammar (Fortran.cf) and look a the code corresponding to these two rules:

Epower.      LExp8 ::= LExp5 "**" LExp8;
Efunk.       LExp8 ::= LExp8 "(" ")";
Efunkpar.    LExp8 ::= LExp8 "(" [SpecLExp] ")";
...
(:[]).   [SpecLExp] ::= SpecLExp ;
(:).     [SpecLExp] ::= SpecLExp "," [SpecLExp];

SpLExpNil. SpecLExp ::= ;
SpLExpNot. SpecLExp ::= LExp;

You will notice that the Efunk. and Efunkpar. rules are almost identical except the second one has a list of SpecLExp tokens. Going further down the grammar file we notice that the SpecLExp can be either NILL (SpLExpNil.) or an LExp (SpLExpNot.). This essentially means there is two ways to have an empty function call in this grammar so the parser doesn't know if it should shift a "SpecLExp" token onto the stack or to reduce the LExp8 "(" ")" token sequence into a LExp8 token.

The solution, that I decided upon (there may be many ways to change the grammar to fix this problem) was to eliminate the 110 rule (Ffunk.). So I did that and recompiled and the "State 174" error disappeared (NOTE: The state names may change over compiles).

Error "State 178 conflicts: 3 reduce/reduce"

The solution to reduce/reduce errors is similar. In this case state 178 shows us:

State 178

  107 LExp6: Unary_operator LExp7 .  [T_NEWLINE, T_MINUS, T_RPAREN, T_MULT, T_COMMA, T_PLUS, T_DIV, T_OR, T_AND, T_EQ, T_NE, T_LT, T_GT, T_LE, T_GE, T_POW]
  108      | LExp7 .  [T_MULT, T_DIV, T_POW]

    T_MULT    reduce using rule 107 (LExp6)
    T_MULT    [reduce using rule 108 (LExp6)]
    T_DIV     reduce using rule 107 (LExp6)
    T_DIV     [reduce using rule 108 (LExp6)]
    T_POW     reduce using rule 107 (LExp6)
    T_POW     [reduce using rule 108 (LExp6)]
    $default  reduce using rule 107 (LExp6)

You will note here that the terminals T_MULT, T_DIV, and T_POW are all mentioned on two REDUCE lines each. These are the 3 reduce/reduce errors for this state. Looking at the BNFC grammar file (Fortran.cf) again we see what the problem is:

Elor.        LExp  ::= LExp ".OR." LExp2;
Eland.       LExp  ::= LExp ".AND." LExp2;
Eeq.         LExp2 ::= LExp2 ".EQ." LExp3;
Eneq.        LExp2 ::= LExp2 ".NE." LExp3;
Elthen.      LExp3 ::= LExp3 ".LT." LExp4;
Egrthen.     LExp3 ::= LExp3 ".GT." LExp4;
Ele.         LExp3 ::= LExp3 ".LE." LExp4;
Ege.         LExp3 ::= LExp3 ".GE." LExp4;
Eplus.       LExp4 ::= LExp4 "+" LExp5;
Eminus.      LExp4 ::= LExp4 "-" LExp5;
Etimes.      LExp5 ::= LExp5 "*" LExp6;
Ediv.        LExp5 ::= LExp5 "/" LExp6;
Epreop.      LExp6 ::= Unary_operator LExp7;
Epower.      LExp8 ::= LExp5 "**" LExp8;
Efunkpar.    LExp8 ::= LExp8 "(" [SpecLExp] ")";
Evar.        LExp9 ::= TIntVar RangePart ;
Estr.        LExp9 ::= SQString ;

ERangeNull. RangePart ::= ;
ERange.     RangePart ::= ":" TIntVar ;

ETInt.       TIntVar ::= Integer;
ETTrue.      TIntVar ::= ".TRUE.";
ETFalse.     TIntVar ::= ".FALSE.";
ETNameVar.   TIntVar ::= Name;
ETRead.      TIntVar ::= "READ";

(:[]).   [LExp] ::= LExp ;
(:).     [LExp] ::= LExp "," [LExp];

_. LExp   ::= LExp2 ;
_. LExp2  ::= LExp3 ;
_. LExp3  ::= LExp4 ;
_. LExp4  ::= LExp5 ;
_. LExp5  ::= LExp6 ;
_. LExp6  ::= LExp7 ;
_. LExp7  ::= LExp8 ;
_. LExp8  ::= LExp9 ;
_. LExp9  ::= LExp10 ;
_. LExp10 ::= LExp11 ;
_. LExp11 ::= "(" LExp ")" ;

OUnaryPlus.   Unary_operator ::= "+" ;
OUnaryMinus.  Unary_operator ::= "-" ;
OUnaryNot.    Unary_operator ::= ".NOT." ;

The chunk at the top of this listing shows the problem (the unary operators '+', '-' and '.NOT.' are the simple reason that this causes a problem in the lines "LExp? ::= LExp5 {*|/|** } ... " where Bison/Yacc doesn't know whether to reduce as a Epreop. token or as a LExp7 token. The overarching problem is not the unary operator it is me being lazy about thinking how logical and arithmetic expressions should be expressed in the grammar ... instead I just mushed everything together.

What this version of the grammar will do is create another type of error (for instance a coding error where logical expression like ".NOT. 6" is valid. This type of error would have to be detected with tests. For now I will just remove the unary operators and will fix the Logical/Arithmetic grammar error later.

Recompiling we see that removing the unary operator does fix the reduce/reduce error but also flags a number of tokens as unused:

Nonterminals useless in grammar

   Unary_operator

Terminals unused in grammar

   _ERROR_
   T_NOT

Rules useless in grammar

  143 Unary_operator: T_PLUS
  144               | T_MINUS
  145               | T_NOT

The rest of the error correction process is similar. In fact, looking at the remaining reduce/reduce and shift/reduce errors points to the same chunk of grammar. Therefore it appears my next job is to correct my grammar laziness.

So until I fix my grammar...

Create a gold bitmap font

In this post I'll take you through the process of producing a gold colored font similar to what I've used in my own apps.

First the alphabet:

We need a string of characters separated by one or more spaces (I used 4 in the example below to properly separate the characters) to use in Gimp to create the font string.

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

As in my other post I'll just create a truncated alphabet for simplicity.

Using Gimp to create an alphabet image:

Open up Gimp and create a blank image of size 500 x 20,000. You might have to experiment here to get an image large enough for your complete alphabet. MENU/File/New… and set the image size and press OK.

Now we need to color the background black using the Bucket-Fill tool from the Gimp toolbox.

Next, switch the Gimp Foreground/Background colors around so we get white as the foreground color (use the curved double arrow near the black/white color boxes on the Gimp toolbox.

Select the 'Text' tool from the Gimp toolbox and choose the font you want to use, font size etc. I chose 'Tiranti Solid LET' 200 pixels for this example. I turned on Bold to give the character strokes some width. Finally I flattened the image (MENU/Image/Flatten Image).

This is approximately what you should have now (I've adjusted the image size for this post):

White letters on a black background.

Create the bump-map:

Next we blur the letters slightly (MENU/Filters/Blur/Gaussian Blur, size=5). This will help to give the letters a 3D shape later.

Now we want to create a bump-map for the letters to generate a 3D shape: MENU/Select/By Colour, now click on the black background. MENU/Select/Invert

Go to the Layers dialog (MENU/Windows/Dockable-Dialogs/Layers) click on the "Create a new layer" button at the bottom left, select Transparency, name the layer bump-map and click OK. Next click the eye-symbol on the Background layer to hide it.

Select BlendTool on the Gimp toolbox (square with L-R black to white gradient) and set, Mode:Normal, Opacity:100%, Gradient: FG to BG (RGB), Shape: Linear. Now drag out the line from the very top of the image to the very bottom in a completely vertical line. If you don't make the line vertical the gradient will be tilted. Your letters will now have a gradient from top to bottom.

Get rid of the select (MENU/Select/None), and apply the bump-map (MENU/Filters/Map/Bump Map). In the dialog set Bump Map:background image, Map Type: Sinusoidal (this is nice), and then press OK. Your lettering should appear 3D.

Make Letters Metalic:

Next we want to make the letters appear shiny like they were made from metal (MENU/Colors/Curves…). Pull out the curves so they look something like:

Metallic color curve preset for metallic look.

You can save this curve by clicking on the green+. Press OK. The lettering should appear much like the following (if you zoom in -- use mouse wheel):

Letters given a metallic look by adjusting the Color Curves.

Apply the Gold Color:

First we need to set a fore-ground color. Click on the foreground color blot(white block on Gimp toolbox) and set a yellow color: fff556 and press OK. In the Layers dialog make sure the visible layer (letters) is selected and apply that color to the image (MENU/Colors/Map/Gradient Map). This gives the object a nice gold color. NOTE: You can choose other colors and produce metallic lettering to suit your needs.

Letters colored with Gradient Map

A drop-shadow can now be added. Select the letters as we did above (MENU/Select/By Color, now click on the black background. MENU/Select/Invert) and generate a drop-shadow (MENU/Filters/Light and Shadow/Drop Shadow, Opacity: 85%) and press OK. Un-select the characters (Shift-Ctrl-A). This gives each character a nice drop shadow something like the following:

Drop-Shadow added.

We can now delete the background layer (the red circle with cross in Gimp layers dialog), merge the visible layers (MENU/Image/Merge Visible Layers) and Save (Ctrl-S) and Export (Ctrl-E, uncheck the "Save Background Color" checkbox and save as PNG file) our work.

Gold letter alphabet with drop shadow.

Next:

Next we have to take our linear alphabet image, that we just created, and split each letter out into individual images.

Split Linear Font File

An image of the linear alphabet isn't going to do us much good so we need to split it down into individual letters.

Splitting Into Individual Letters:

To split this long image of the alphabet into individual characters I created a 'bash'(linux) script. It uses the Image-Magick 'convert' program to do two things. First convert will compress the MxN image into a Mx1 (single pixel column) image and then report on the colors of the pixels in this image. The characters will be non-empty and the space around them will be empty (Color #00000000 RGBA). We just use the transition from one to the other to determine where the vertical extents of all the letters are and then use 'convert' to strip the excess non-character stuff off the top and bottom of the original image.

Then we do the same, compress the vertical dimension and strip out the characters from the trimmed image above. The individual characters are then saved in a directory by the name of the Alphabet strip image.

Here is the chopimage script that I use:

#!/bin/bash

#
# Script file to chop an image of a string of characters into individual letters
# based on the uniform transparent background colour (=#00000000 none) between the letters.
#
# This script performs by taking the image and first using 'convert' to smoosh (a technical term)
# it down to a vertical image 1 pixel wide, then reporting on each of the pixels.  An AWK command
# is used to look for a transition from 'none',or 'graya(0,0)'(the background) to something
# that isn't 'none' or 'graya(0,0)':
#
#   ...
#   0,4: (0,0,0,0)  #00000000  none
#   0,5: (0,0,0,0)  #00000000  none
#   0,6: (0,0,0,0)  #00000000  none
#   0,7: (0,0,0,0)  #00000000  none
#   0,8: (3.63098e-09,1.45239e-08,0,5.62604e-15)  #00000000  srgba(0,0,0,8.58478e-20)
#   0,9: (16191,64764,0,0.469211)  #3FFC0000  srgba(63,252,0,7.15971e-06)
#   0,10: (16191,64764,0,9.36611)  #3FFC0000  srgba(63,252,0,0.000142918)
#   0,11: (16191,64764,0,35.3837)  #3FFC0000  srgba(63,252,0,0.000539921)
#   0,12: (16191,64764,0,96.4829)  #3FFC0000  srgba(63,252,0,0.00147223)
#   ...
# Or
#   ...
#   41,0: (0,0)  #00000000  graya(0,0)
#   42,0: (0,0)  #00000000  graya(0,0)
#   43,0: (0,0)  #00000000  graya(0,0)
#   44,0: (0,0)  #00000000  graya(0,0)
#   45,0: (0,0)  #00000000  graya(0,0)
#   46,0: (2.8607e-05,1.72444e-13)  #00000000  graya(0,2.63133e-18)
#   47,0: (49575.3,21.5728)  #C1C1C100  graya(193,0.000329179)
#   48,0: (49937.1,429.378)  #C2C2C202  graya(194,0.00655189)
#   49,0: (51556.9,1516.96)  #C9C9C906  graya(201,0.0231474)
#   ...
#
# Awk then reports the line numbers which we use to determine where to cut the image (to get
# rid of most of the background. We again do this with 'convert'
#
# Next we do the same thing, smooshing the image down to a 1-pixel high image and using the
# resulting list (like above -- except for columns instead of rows) to tell us were to cut
# the letters out.  We store these in a directory with the file name of the original image.
#
# The reported transitions from the background ('none') to otherwise is why we need expand the
# image in GIMP to make sure there is a boundary of blank space around the images (it will get
# trimmed off anyway).
#
# See article:
#   https://stackoverflow.com/questions/33636849/imagemagick-split-image-by-background-color
#
# USAGE:
#   chopimage <in-file.png> {"<out-file-fmt>" {<blank-width>}}
#
# Example:
#   chopimage RoyalsGold.png "Letters_%03.png"
#
# NOTE: <blank-width> defaults to 50 pixels
#
# (Script created by alan on 12/Jun/2018 21:56:51)
#
pgm=chopimage
tmp=/tmp/${pgm}_
bin=/home/alan/bin
log=${bin}/data/${pgm}.$(uname -n).log

# Get our command line arguments making sure we have the original PNG file.
cmpimg=${1}
fmt=${2:-"CharImage_%03d.png"} # Default for format string
blank=${3:-50}                 # Default for blank width in pixels
if [ "$cmpimg" == "" ]; then
    echo "USAGE: chopimage <compound-image> {<out-imgname-format>}"
    exit
fi

# Strip the extension of the in-file-name and use that as output directory
dirnam=${cmpimg%.*}

# Display the working parameters
echo "cmpimg='$cmpimg'"
echo "fmt='$fmt'"
echo "blank='$blank'"
echo "dirnam='$dirnam'"

# Get the actual size of the image.
imgsz=$( file "$cmpimg" | sed "s/^.* \([0-9][0-9]*\) x \([0-9][0-9]*\),.*$/\1,\2/g" )
echo "imgsz='$imgsz'"
iszx=$( echo "$imgsz" | awk -F, '{ print $1 }' )
iszy=$( echo "$imgsz" | awk -F, '{ print $2 }' )
#echo "isz(x,y)=($iszx,$iszy)"

# Determine how much blank space we have on the top and bottom of the PNG.  NOTE: We can't
# do this for individual characters like 'W' and '_' because our PLIST --> FNT conversion
# program isn't smart enough to orient different height characters verticaly.
# NOTE: This requires there to be blank space on the top AND bottom across the image, therefore,
#       make sure your image has blank(transparent) areas on top and bottom.
echo "Finding top/bottom empty space"
convert ${cmpimg} -resize 1x! txt: >${tmp}tb1
cat ${tmp}tb1 \
    | awk 'inside && /#00000000/{inside=0;print;next} !inside && ! /#00000000/{inside=1;print}' \
    >${tmp}tb

# Get the line numbers of the top of the character and the bottom
echo "Getting y1,y2"
y1=$( head -3 ${tmp}tb | tail -1 | sed "s/^0,\([0-9][0-9]*\): .*$/\1/g" )
y2=$( tail -1 ${tmp}tb | sed "s/^0,\([0-9][0-9]*\): .*$/\1/g" )
echo "y1='$y1'"
echo "y2='$y2'"

# Add a little bit of padding (1 pixel top and bottom)
y1=$(( $y1 - 1 ))
szy=$(( $y2 - $y1 +2 ))
#echo "y1='$y1'"
#echo "szy='$szy'"

# Now actually do the vertical trimming
echo "Trimming top and bottom"
convert "${cmpimg}" -crop x${szy}+0+${y1} "${tmp}.png"

# Now we can do the same procedure with the horizontal divisions (except there are more of them).
# NOTE: This requires there to be blank space on the Left AND Right sides of the image, therefore,
#       make sure your image has blank(transparent) areas on the sides.
echo "Finding inter-letter spacing"
convert "${tmp}.png" -resize x1! txt: >${tmp}bnd1
cat ${tmp}bnd1 \
    | awk 'inside && /#00000000/{inside=0;print;next} !inside && ! /#00000000/{inside=1;print}' \
    >${tmp}bnd

# Create the output directory
mkdir -p "${dirnam}" 2>/dev/null


imgno=1    # Counter for output image number.
gotblank=0 # Flag indicating whether we've created the blank character yet.
lastx2=0   # Counter to get inter-character spacing for blank character.

# Now do the actual cutting off of characters
cat ${tmp}bnd |\
while read line1
do
    # Look for the LHS record for the current character
    echo "$line1" | grep "rgba(\|graya([1-9]" >/dev/null
    if [ $? -eq 0 ]; then
        # We've found it so read in the next record which will be the RHS-record.
        read line2
        echo "--------------------------"
        echo "line1='$line1'"
        echo "line2='$line2'"

        # Calculate the pixel extents of the current character.
        x1=$( echo "$line1" | sed "s/,.*$//g" )
        x2=$( echo "$line2" | sed "s/,.*$//g" )

        # Check to see if we have processed the blank character yet.
        if [ $gotblank -eq 0 ]; then
            # Find the distance from the RHS of the last character to the LHS of the current char.
            dlx2x1=$(( $x1 - $lastx2 ))

            # If it is big enough for a blank then produce the file.
            if [ $dlx2x1 -ge $blank ]; then
                echo "Producing blank character, $blank pixels wide"
                # Generate the output file name and create a blank.png from this space
                fname=$( printf $fmt $imgno )
                convert "${tmp}.png" -crop ${blank}x+${lastx2}+0 "${dirnam}/${fname}"
                # Increment our image number.
                imgno=$(( $imgno + 1 ))
                gotblank=1
            fi
        else
            echo "Already got blank"
        fi
        lastx2=$x2

        # Display the coordinates of the character to output.
        echo "x1,x2='$x1,$x2'"
        #x1p=$(( $x1 - 1 ))

        # Determine the character x-metrics.
        x1p=$x1
        szx=$(( $x2 - $x1 ))
       
        # Create the character file name and extract the bitmap to the given file.
        fname=$( printf $fmt $imgno )
        convert "${tmp}.png" -crop ${szx}x+${x1p}+0 "${dirnam}/${fname}"
        echo "Producing character: $fname"

        # On to the next image ...
        imgno=$(( $imgno + 1 ))
    fi
done

#
# end of 'chopimage' script file.
#

Just run the program with the image name and if you want a different width for your space character (default=50 pixels) then specify this too. My PNG file was called GradientBevel.png, I wanted 40pixel wide spaces and I wanted the output image files to be named "LetterImage_%03d.png" so my command was:

chopimage GradientBevel.png "LetterImage_%03d.png" 40

This produced the following output:

alan@Midnight$ chopimage GradientBevel.png "LetterImage_%03d.png" 40
cmpimg='GradientBevel.png'
fmt='LetterImage_%03d.png'
blank='40'
dirnam='GradientBevel'
imgsz='1453,103'
Finding top/bottom empty space
Getting y1,y2
y1='27'
y2='89'
Trimming top and bottom
Finding inter-letter spacing
--------------------------
line1='16,0: (65535,65535,65535,0.98363)  #FFFFFF00  srgba(255,255,255,1.50092e-05)'
line2='70,0: (1.61668e-09,1.61668e-09,1.61668e-09,1.85662e-15)  #00000000  srgba(0,0,0,2.83302e-20)'
x1,x2='16,70'
Producing character: LetterImage_001.png
--------------------------
line1='76,0: (65535,65535,65535,17.1694)  #FFFFFF00  srgba(255,255,255,0.000261989)'
line2='122,0: (2.10696e-08,2.10696e-08,2.10696e-08,1.41067e-14)  #00000000  srgba(0,0,0,2.15254e-19)'
x1,x2='76,122'
Producing character: LetterImage_002.png
--------------------------
line1='129,0: (65535,65535,65535,4.98295)  #FFFFFF00  srgba(255,255,255,7.60349e-05)'
line2='176,0: (4.59765e-08,4.59765e-08,4.59765e-08,3.01553e-14)  #00000000  srgba(0,0,0,4.6014e-19)'
x1,x2='129,176'
Producing character: LetterImage_003.png
--------------------------
line1='185,0: (65535,65535,65535,17.1694)  #FFFFFF00  srgba(255,255,255,0.000261989)'
line2='235,0: (4.08064e-08,4.08064e-08,4.08064e-08,2.64424e-14)  #00000000  srgba(0,0,0,4.03485e-19)'
x1,x2='185,235'
Producing character: LetterImage_004.png
--------------------------
line1='244,0: (65535,65535,65535,17.1694)  #FFFFFF00  srgba(255,255,255,0.000261989)'
line2='286,0: (1.99955e-08,1.99955e-08,1.99955e-08,-1.33887e-14)  #00000000  srgba(0,0,0,-2.04299e-19)'
x1,x2='244,286'
Producing character: LetterImage_005.png
--------------------------
line1='295,0: (65535,65535,65535,17.1694)  #FFFFFF00  srgba(255,255,255,0.000261989)'
line2='336,0: (1.86687e-08,1.86687e-08,1.86687e-08,-1.25011e-14)  #00000000  srgba(0,0,0,-1.90755e-19)'
x1,x2='295,336'
Producing character: LetterImage_006.png
--------------------------
line1='344,0: (65535,65535,65535,4.98295)  #FFFFFF00  srgba(255,255,255,7.60349e-05)'
line2='395,0: (5.95701e-08,5.95701e-08,5.95701e-08,-3.61643e-14)  #00000000  srgba(0,0,0,-5.51831e-19)'
x1,x2='344,395'
Producing character: LetterImage_007.png
--------------------------
line1='404,0: (65535,65535,65535,17.1694)  #FFFFFF00  srgba(255,255,255,0.000261989)'
line2='453,0: (1.19024e-07,1.19024e-07,1.19024e-07,-7.01002e-14)  #00000000  srgba(0,0,0,-1.06966e-18)'
x1,x2='404,453'
Producing character: LetterImage_008.png
--------------------------
line1='463,0: (65535,65535,65535,17.1694)  #FFFFFF00  srgba(255,255,255,0.000261989)'
line2='488,0: (1.19024e-07,1.19024e-07,1.19024e-07,-7.01002e-14)  #00000000  srgba(0,0,0,-1.06966e-18)'
x1,x2='463,488'
Producing character: LetterImage_009.png
--------------------------
line1='492,0: (65535,65535,65535,3.12778)  #FFFFFF00  srgba(255,255,255,4.77269e-05)'
line2='524,0: (1.28439e-07,1.28439e-07,1.28439e-07,-7.54638e-14)  #00000000  srgba(0,0,0,-1.1515e-18)'
x1,x2='492,524'
Producing character: LetterImage_010.png
--------------------------
line1='535,0: (65535,65535,65535,17.1694)  #FFFFFF00  srgba(255,255,255,0.000261989)'
line2='587,0: (1.61668e-09,1.61668e-09,1.61668e-09,-1.85662e-15)  #00000000  srgba(0,0,0,-2.83302e-20)'
x1,x2='535,587'
Producing character: LetterImage_011.png
--------------------------
line1='591,0: (65535,65535,65535,17.1694)  #FFFFFF00  srgba(255,255,255,0.000261989)'
line2='633,0: (1.99955e-08,1.99955e-08,1.99955e-08,-1.33887e-14)  #00000000  srgba(0,0,0,-2.04299e-19)'
x1,x2='591,633'
Producing character: LetterImage_012.png
--------------------------
line1='640,0: (65535,65535,65535,17.1694)  #FFFFFF00  srgba(255,255,255,0.000261989)'
line2='697,0: (1.19024e-07,1.19024e-07,1.19024e-07,-7.01002e-14)  #00000000  srgba(0,0,0,-1.06966e-18)'
x1,x2='640,697'
Producing character: LetterImage_013.png
--------------------------
line1='707,0: (65535,65535,65535,17.1694)  #FFFFFF00  srgba(255,255,255,0.000261989)'
line2='756,0: (1.19024e-07,1.19024e-07,1.19024e-07,-7.01002e-14)  #00000000  srgba(0,0,0,-1.06966e-18)'
x1,x2='707,756'
Producing character: LetterImage_014.png
--------------------------
line1='764,0: (65535,65535,65535,4.98295)  #FFFFFF00  srgba(255,255,255,7.60349e-05)'
line2='817,0: (4.78058e-08,4.78058e-08,4.78058e-08,-3.04409e-14)  #00000000  srgba(0,0,0,-4.64499e-19)'
x1,x2='764,817'
Producing character: LetterImage_015.png
--------------------------
line1='826,0: (65535,65535,65535,17.1694)  #FFFFFF00  srgba(255,255,255,0.000261989)'
line2='872,0: (2.50286e-08,2.50286e-08,2.50286e-08,-1.68538e-14)  #00000000  srgba(0,0,0,-2.57173e-19)'
x1,x2='826,872'
Producing character: LetterImage_016.png
--------------------------
line1='878,0: (65535,65535,65535,4.98295)  #FFFFFF00  srgba(255,255,255,7.60349e-05)'
line2='931,0: (4.78058e-08,4.78058e-08,4.78058e-08,-3.04409e-14)  #00000000  srgba(0,0,0,-4.64499e-19)'
x1,x2='878,931'
Producing character: LetterImage_017.png
--------------------------
line1='940,0: (65535,65535,65535,17.1694)  #FFFFFF00  srgba(255,255,255,0.000261989)'
line2='989,0: (1.61668e-09,1.61668e-09,1.61668e-09,-1.85662e-15)  #00000000  srgba(0,0,0,-2.83302e-20)'
x1,x2='940,989'
Producing character: LetterImage_018.png
--------------------------
line1='995,0: (65535,65535,65535,7.3013)  #FFFFFF00  srgba(255,255,255,0.000111411)'
line2='1040,0: (7.78376e-08,7.78376e-08,7.78376e-08,-2.84178e-14)  #00000000  srgba(0,0,0,-4.33628e-19)'
x1,x2='995,1040'
Producing character: LetterImage_019.png
--------------------------
line1='1045,0: (65535,65535,65535,2.85368)  #FFFFFF00  srgba(255,255,255,4.35443e-05)'
line2='1094,0: (7.46746e-08,7.46746e-08,7.46746e-08,-2.50023e-14)  #00000000  srgba(0,0,0,-3.8151e-19)'
x1,x2='1045,1094'
Producing character: LetterImage_020.png
--------------------------
line1='1100,0: (65535,65535,65535,12.1229)  #FFFFFF00  srgba(255,255,255,0.000184983)'
line2='1147,0: (3.82292e-07,3.82292e-07,3.82292e-07,-1.13423e-13)  #00000000  srgba(0,0,0,-1.73072e-18)'
x1,x2='1100,1147'
Producing character: LetterImage_021.png
--------------------------
line1='1154,0: (65535,65535,65535,0.772458)  #FFFFFF00  srgba(255,255,255,1.17869e-05)'
line2='1208,0: (5.96768e-09,5.96768e-09,5.96768e-09,-3.42669e-15)  #00000000  srgba(0,0,0,-5.2288e-20)'
x1,x2='1154,1208'
Producing character: LetterImage_022.png
--------------------------
line1='1211,0: (65535,65535,65535,0.772458)  #FFFFFF00  srgba(255,255,255,1.17869e-05)'
line2='1279,0: (2.72452e-08,2.72452e-08,2.72452e-08,-1.21862e-14)  #00000000  srgba(0,0,0,-1.8595e-19)'
x1,x2='1211,1279'
Producing character: LetterImage_023.png
--------------------------
line1='1283,0: (65535,65535,65535,0.98363)  #FFFFFF00  srgba(255,255,255,1.50092e-05)'
line2='1335,0: (6.46671e-09,6.46671e-09,6.46671e-09,-3.71324e-15)  #00000000  srgba(0,0,0,-5.66605e-20)'
x1,x2='1283,1335'
Producing character: LetterImage_024.png
--------------------------
line1='1338,0: (65535,65535,65535,2.69423)  #FFFFFF00  srgba(255,255,255,4.11113e-05)'
line2='1390,0: (5.96768e-09,5.96768e-09,5.96768e-09,-3.42669e-15)  #00000000  srgba(0,0,0,-5.2288e-20)'
x1,x2='1338,1390'
Producing character: LetterImage_025.png
--------------------------
line1='1393,0: (65535,65535,65535,6.36067)  #FFFFFF00  srgba(255,255,255,9.70577e-05)'
line2='1440,0: (1.41726e-07,1.41726e-07,1.41726e-07,-4.80423e-14)  #00000000  srgba(0,0,0,-7.33078e-19)'
x1,x2='1393,1440'
Producing character: LetterImage_026.png

This left me with a directory full of letter images. Note: if some of your letters are packed together into one image increase the spacing between these letters in the alphabet string above and redo all the intervening work. These are the letter images in one of my font directories:

Individual letter images after 'chopimage'.

You may notice looking at your individual character files that there seems to be a lot of space surrounding certain letters. This may be due to an included underscore (or some similar character) that forces a vertical trimming that isn't optimal for all characters. However, this will make it easier to position the characters in Cocos2d-x.

Problems:

I've tripped across a few problems. Here are their solution/explanations:

  • Whitespace on individual letters seems excessive. This may be due to one or more characters in the alphabet extending beyond the average characters boundaries. For instance I found an underscore '_' character cause all my letters to have excess white-space at the bottom. Eventually I'll make my PList->Fnt translation program smart enough to adjust the position of the letters based on their actual extent ... but until then.
  • Multiple letters in individual letter files. This is due to two sequential letters coming too close together in the image (because of glow/drop-shadow or kerning) and can be solved by putting more blanks between characters in the alphabet string.
  • No results at all. I've found this is because there is not enough color #00000000 (empty) boundary around the letters. In gimp just increase the canvas size (and center the image) and this should fix the problem.

Next:

OK, now that we've split them all apart we have to put them all back together into a sprite sheet.

Bitmap Fonts in Cocos2d-x

This article describes the process of creating a bitmap'd font, using the GIMP image editor, the image-magick suite, and some home-brewed C-code. It also describes how to use the font in the Cocos2d-x/Android-Studio development environment.

For this project you will need:

  • Bash (Sorry, moved from MSWindows to Ubuntu and have never looked back - script might be translatable to MSDOS),
  • GIMP image editor (for creating the bitmap font strip),
  • Image-magick suite (splits font strip from Gimp into individual images),
  • A C++ compiler (g++, or clang are good - for compiling my code snippet),
  • TexturePacker (free version, to glue all letters into sprite sheet),
  • A Cocos2d-x project (to include your sprite-sheet into a game/app), and,
  • the Android Studio IDE (to compile the Cocos2d-x project).

I actually wrote this post some time ago but since then my OS has had to be re-imaged and surprise, surprise, that's where MySQL saves its database - fortunately my development environment was all on the /home partition. I've, in the interim, learned how to move my MySQL database to a safe location so hopefully that won't happen again. I've also gotten smarter and installed a WordPress plugin to back my system up off-site (including the MySQL database).

Now, if I can remember what I wrote before...

Let me know how this works for you. I'll try to help if you are having problems, time permitting.

If you have a bitmap font of which you are particularly proud let me know and I will link it on the example post above. Good luck!

Creating a Bitmap Font

The goal of this post is to demonstrate how to generate a bitmap font in a PNG file with a PLIST xml descriptor file for use in Cocos2d-x programs. I'll describe a no-cost method suitable for a beginning or hobby game programmer but useful across the spectrum. My system is an Ubuntu/linux system and the tools I'll use are Gimp, Image-Magick and the free version of TexturePacker

Gimp is a powerfull image editor much like Photoshop (perhaps with a little less chrome -- but very usable). The second package that you need is Image-Magick. Image-Magick has a utility that will allow us to carve the letter images out of a very long image. The last program TexturePacker has a free version that will create a sprite-sheet with all the characters and a related PLIST file that will tell cocos2d-x how to extract each letter from the sprite-sheet. Once you've gotten these programs installed we can continue.

Font:

Next you will require a font. You can just use a system font to experiment with but if you want something fancier then you'll have to look around. If you Google "Free Font" you get lots of sites giving these away. Just be careful to check out the license if you plan to publish your game or use the font in a commercial setting. Install the new fonts on your system so they can be used by Gimp. Here are a sample of "free font" sites:

There are two methods to produce a fancy bitmap font using Gimp. The first is using the built-in generator, the second is to use Gimp's powerful image manipulation functions manually to produce exactly what we are looking for.

Method 1:

Lets experiment. Start up Gimp and click on MENU/File/Create/Logos pick one of the types from the list: 3D Outline, Alien Glow, Alien Neon, Basic II, Basic I, ..., Textured. Select a logo type that has a uniform background colour because we will be removing this later and the program needs a uniform colour to determine where the letter breaks are. Type in a string in the Text field, set the Font and Font size to suit your needs and adjust any of the other parameters you desire. Then press the OK button.

Here are some examples with the Text field and font size (50) changed:

3D Outline
Bovination
Neon

This will produce an image with a fixed string in the font you want with the characteristics you want. You will need to use a selection that produces characters with a background that is completely uniform (which we will cut out of our image later).

Creating Image String:

To produce a bitmap font we will need to produce individual letters for all the letters we want to use in our program. It is probably a good idea to produce the entire ASCII printable set then you won't have to worry about changing requirements for your program. However, I'll just use the capital letters (with a space between each) to illustrate:

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

Now create your font image with that string. Note that the Image-Magick convert program I'll use later on uses the uniform background colour to determine where to cut the image so if your font image has glow around it or a drop-shadow you may have to space your letters more than one space-character apart.

We generate a horizontal string of characters for two reasons. First it makes splitting them apart easier and second it allows us to uniformly apply image effects that change the characters from top to bottom (for instance a gradient). In another article about producing Gold colored letters this will be important.

This is font size 50 of the Gradient Bevel selection

What you should look for here is a vertical line of uniform background colour between all the letters -- the software will use this to separate the letters. Don't worry about getting too much blank space between your characters -- this will be removed later automatically.

Prepairing Image String:

Still in Gimp we need to do four things: add a transparency layer, subtract the background, resize the image and save everything. First adjust the size of the image using your mouse roller or changing the percentage on the bottom left of the window.

To subtract the background we first have to flatten the image (it may have multiple layers): MENU/Image/Flatten Image, then we have to add a transparency channel to the image: MENU/Layer/Transparency/Add Alpha Channel. If you already have an alpha channel this option will be greyed out.

Next subtract the background by choosing the "Select by Color" tool from the toolbox. You may want to modify the behavior of this tool in the Tool Options (select Feather Edges and adjust the radius and adjust the threshold for the color selector). Then use Ctrl-X (cut) to subtract the background (you should then see the transparency checkerboard between all the characters). If you want to adjust your choices then just backout the cut and selection with a couple of Ctrl-Z's.

When you are happy with the background subtraction we should add a boundary around the image (to make sure there transparent pixels on all sides) by increasing the canvas size: MENU/Image/Canvas Size... , increase the width and height by about 20 pixels and Center the image, and press the Resize button.

Now just save your project (Ctrl-S) and export the image to a PNG file (Ctrl-E).

Method 2:

In this method I'll do the work that was done in Method 1 but do it manually which will give much more control over creating the font. There are many formulas for creating decorated fonts on the web but I'll go over one on producing gold lettering which I've used for my own projects.

Next:

OK, now that we've created a image of our entire alphabet we need to split it apart into individual letters. Or, to see how to produce a gold Bit-Mapped Font go here.

After a hiatus …

Well it took me a while but I managed to get Hexing up on the Google Play Store again. Who would have thought just adding a privacy statement could have been such an ordeal.

It all started way back when ...

Trippy Feet:

Well, I should mention first that in the following recollection I probably tripped over my own feet more than anything else. However, this process also taught me to be careful about updating software when not required and paying attention to the important emails.

The journey started back in November 2018 when I noticed that Hexing wasn't accessible through the Google Play Store. Checking my account there I came across a banner error message informing me that the Play Store had removed my program because it didn't have a privacy statement which was now required by various countries including the EU. So my first lesson is 1) Check the Play Store regularly to make sure everything is running smoothly there. I guess a reminder is a task for Google Calendar.

Upon checking my email client I found the email from Google telling me that they would be doing this. Apparently redirecting my emails into a sub-directory and then ignoring them wasn't a good strategy for email overload. So there's got to be a better solution to dealing with all the emails from friends and family and automated servers and the important automated mail servers. That's my second lesson. Not sure I've solved that one yet ... especially now that I've added Google Calendar notices to the list.

Holy Flood Batman:

Next problem was that between Android-Studio, Cocos2d-x, and Firebase everybody decided to change everything between when I last worked on Hexing and now. Not that I don't appreciate the improvements but ... Holy flood Batman! I guess this lesson is that if I had recompiled Hexing semi-regularly I would have had a smaller plate of changes to deal with and it wouldn't have been such a problem.theyNext problem was that between Android-Studio, Cocos2d-x, and Firebase everybody decided to change everything between when I last worked on Hexing and now. Not that I don't appreciate the improvements but ... Holy flood Batman! I guess this lesson is that if I had recompiled Hexing semi-regularly I would have had a smaller plate of changes to deal with and it wouldn't have been such a problem.

So what were the problems ...

Well the first was that I now required a privacy statement. Hmmm, a tad out of my wheelhouse and since I'm not making any money with my programs yet (actually as it turns out it seems I'm paying money to have people play my programs ... I hope they really enjoy them ... well at least one of us does). This suggests that paying a lawyer to produce a privacy statement was a little extravagant. So I did what many others probably do and basically searched the net for other privacy statements and cut and pasted until I had something reasonable, without spelling errors, and that seemed to cover the whole spectrum of things that Hexing users might want to know about. One problem solved.

AsciiDoc:

So, I have the text of a privacy statement but what do I write it in? Scratch Word ... that was a no-go ever since I left the MS Windows world permanently for linux (Ubuntu -- my relief was palpable). There are lots of tools on linux. I contemplated Latex but thought this was a little over the top and since I had being playing with AsciiDoc lately and it had the professional look I wanted I decided to use it. Great!! The document, when auto translated to HTML, looked just like I wanted it to. Now where to put it.

I thought about installing it in Hexing so it would be with the program whenever needed but the maintenance problem of updating it as I updated Hexing and the problem of how to display it from an in-memory resource and the waste of space bothered me so I figured I'd put it up on the internet and just have a button in Hexing to open it up. Turns out that Cocos2d-x has just the call for this and it was a one-liner except for the button code -- which was quite simple too. Another problem solved.

Web Presence:

But I needed a web presence so I could put my privacy statement up. This required me to find a web service somewhere (but again$$$), or a free web service (but I didn't like the lack of control). So I just decided to use my personal machine which is on 24-7. So now it was time to install another host on my Apache server. Fortunately, this was relatively easy compared to the old days ... which made my cry and pull my hair out. Only problem was that my Apache server went away when my machine crashed and I had to re-image the OS. And this not being my first time down this road I had kept notes on what I needed to do (thanks GNote). But of course there was a catch, everything had changed, so I had to re-learn and plod through all the web pages (which are massively interlinked so even though you are hopeful when you start because there is a clear starting position there is no ending page because they are so highly interlinked that you don't know if you've even read the page you are on now ... better read it!

Be Safe MySQL:

Anyway I finally got the Apache server running, my old (hand crafted) web pages back (which was nice) and a place to put all the web pages for Non-Aligned Games that I intend to do in the future. Oh, wait a minute I had a web site for Non-Aligned games before I had to re-image the OS. Now where did I store those pages? Arrrggghhhh! MySQL used in WordPress, on linux, stores the databases on the OS partition -- which goes away when you re-image your OS (thank goodness I wasn't still using MS Windows). At least I was smart enough to move the /home directory off onto it's own partition. So now I needed to figure out how to move a MySQL database area to a safe place (like on my /home partition) for when I bork my OS again. Finally figured that out and recorded the process on GNote and now I could re-install WordPress

Learn WordPress:

WordPress is really nice and for the most part free (some WordPress third party developers add lots of really professional addons for WordPress that they charge for). However, I didn't know anything about WordPress. OK, so I'm going to learn some WordPress. I was starting to wonder if I could still call myself a game programmer.

There was a learning curve with WordPress but once you pick the theme you want to settle on, from the thousands of free themes out there, you can get down to creating your web site. The problem with WordPress themes are is that they only roughly show you what your web site is going to look like. Adding graphics, and logos and text to your chosen theme can make it look completely different than the preview. Once you do get over most of the learning curve then it is pretty easy to do things. That might be partially you know what your limits are now.

AsciiDoc on WordPress:

So now I have a WordPress web site hosted on my own machine and a seed of a web presence. Now for that AsciiDoc privacy statement. WordPress has some plugins that mention AsciiDoc I'll just add one of those plugins and get it to suck up my privacy_policy.adoc and poof my privacy policy is up live. But, nothing is ever simple. These plugins didn't work the way I wanted them to so I eventually just made an external link to my HTML version and left it at that. Not optimal but at lease I don't have to maintain more than one version of the policy.

What was I doing again ... oh yeah something to do with a game ...

Game Mods:

Next was installing the buttons into the game which would display the privacy statement for the game and the Non-Aligned web site which I could announce my progress and new games etc. I started up Android-Studio as usual and it mentioned that there was some sort of update. As usual I just clicked the install button and off it went. That was a mistake. I think there is some corollary to Murphy's law for computer science that states that you shouldn't upgrade software while it is working.

BNFC Quirks

BNFC is a great tool but it has some quirks that have slowed down the process of building a front-end for my fortran2c translator. However, the code generation, especially if you haven't built a compiler before moves you quite a distance forward. Here's what I've found so far...

Position dependent code:

First, in the lexical analyzer (the part that converts from a character stream to a token stream) BNFC is fairly inflexible. In the case of Fortran and other older languages there are position dependent tokens. Some examples come to mind: The comment, the continuation line, label-numbers and the sequence column. These are illustrated in the file segment (Maze.for) below:

C
C   MAZE DESCRIPTION
C
  180   WRITE(6,190) HEIGHT,WIDTH,DEPTH
  190   FORMAT('0',' YOUR MAZE HAS A HEIGHT OF',I5,/,
    1  '             AND A WIDTH OF',I5,/,
    1  '            WITH A DEPTH OF',I5,//,
    2  '  THE DIRECTION COMMANDS FOR MAZE ARE SINGLE LETTERS',/,
    2  '    N(ORTH), U(P),    OR 8 IS UP',/,
    2  '    E(AST) , R(IGHT), OR 6 IS RIGHT',/,
    2  '    S(OUTH), D(OWN),  OR 2 IS DOWN',/,
    2  '    W(EST) , L(EFT),  OR 4 IS LEFT',/,
    2  '    I(N)   ,          OR 9 IS IN TO SCREEN',/,
    2  '    O(UT)  ,          OR 7 IS OUT OF SCREEN',/,

Comments start with a "C" in column one and go to the end-of-line. Continuation lines start at the beginning with a tab or 5 spaces, have a continuation mark (usually 0-9 or '+') then a space and the body of the continuation. Labels are numbers preceded with spaces and ending at column 5.

Unfortunately I don't have a example of code with a sequence column. These were basically 8-digit numbers in columns 73-80. Code including the above continuation/label-number preface to statements was from column 1 to 72 with 73-80 being left over for the sequence number. I believe this sequence number was a holdover from the old punched card days when people would do a 52-card pickup with a program deck (which usually went far beyond 52 cards) and needed a way to sort it back into a program (by machine).

All these things need Flex code that allows for multiple states (i.e. <prefix>, <seqno>, <statement>) which doesn't seem to be a possibility in BNFC.

What I ended up doing was writing a small state-machine program (in C) that converted comments to C-like '//' comments and just joined continuation lines into one long line (since we aren't working on 80-column punch cards anymore). The code below can be compiled with the command (I'm running Ubuntu/linux with the GNU gcc compiler):

g++ -std=c++11 -g fixup.c -o fixup

/*
 * Program to do some preprocessing on a Fortran file to deal with:
 *     "\nC" ==> "\n//"                   -- Comments, and
 *     "[ \t]*\n     [0-9+][ \t]*" ==> "" -- Continuation lines
 *     "[ \t]*\n\t[0-9+][ \t]*"    ==> "" -- Continuation lines
 *
 */


#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
   
#define BUF_SZ 1000

#define DEBUG false

char buf[BUF_SZ];
int bufidx=-1;
int state=0;

int CntComments=0;
int CntContinue=0;

void save(int chr){
    buf[++bufidx]=(char)chr;

    if(bufidx==BUF_SZ){
        fprintf(stderr,"ERROR: Buffer Overflow\n");
        exit(1);
    }
}

void unsave(){
    buf[bufidx--]=0;

    if(bufidx<-1){
        fprintf(stderr,"ERROR: Buffer Underflow\n");
        exit(2);
    }
}

void reset(){
    memset(buf,0,BUF_SZ);
    bufidx=-1;
    state=0;
}

void purge(){
    printf("%s",buf);
    reset();
}


void asaprintf( const char * format, ... )
{
    va_list args;
    va_start (args, format);
    if(DEBUG) vprintf (format, args);
    va_end (args);
}

void newstate(int ns){
    state=ns;
    //asaprintf("<%d>",state);
}


int main(int argc,char* argv[]){

    int chr=0;
    int idx=0;

    reset();

    state=2; // Start in state 2 because first line in file may be a comment

    while((chr=getchar())!=EOF){
        asaprintf("%6d) state=%d chr='%c'(0x%02x)\n",idx++,state,chr,chr);
        save(chr);
        if(chr==0){
            reset();
        }else{
            switch(state){
                case 0:
                    switch(chr){
                        case ' ': break;
                        case '\t': break;
                        case '\n': newstate(2); break;
                        default: purge(); break;
                    };
                    break;

                case 2:
                    switch(chr){
                        case ' ': newstate(6); break;
                        case 'C': case 'c':
                            unsave(); purge(); printf("//"); CntComments++; break;
                        case '\t': newstate(10); break;
                        default: purge(); break;
                    };
                    break;
           
                case 6:
                    switch(chr){
                        case ' ': newstate(7); break;
                        default: purge(); break;
                    };
                    break;
           
                case 7:
                    switch(chr){
                        case ' ': newstate(8); break;
                        default: purge(); break;
                    };
                    break;
           
                case 8:
                    switch(chr){
                        case ' ': newstate(9); break;
                        default: purge(); break;
                    };
                    break;
           
                case 9:
                    switch(chr){
                        case ' ': newstate(10); break;
                        default: purge(); break;
                    };
                    break;
           
                case 10:
                    switch(chr){
                        case '0':
                        case '1':
                        case '2':
                        case '3':
                        case '4':
                        case '5':
                        case '6':
                        case '7':
                        case '8':
                        case '9':
                        case '+':
                            newstate(11); break;
                        default: purge(); break;
                    };
                    break;
           
                case 11:
                    switch(chr){
                        case ' ': break;
                        case '\t': break;
                        default: reset(); putchar(chr); CntContinue++; break;
                    };
                    break;
           
            }
        }
    }
    printf("\n");

    fprintf(stderr, "Counts:\n");
    fprintf(stderr, "  Comments:      %5d\n",CntComments);
    fprintf(stderr, "  Continuations: %5d\n",CntContinue);
    return(0);
}

The Maze.for program then became (Maze_pp.for):

//
//  MAZE -  USES A VT100 TO WANDER AROUND.
//      THE VT100 MUST HAVE ADVANCED VIDEO OPTION.
//      ANSI VT100 ESCAPE SEQUENCES ARE USED.
//
//  WRITTEN BY DON MCLEAN
//  OF THE MACNEAL-SCHWENDLER CORP.
//
//  THE PURPOSE OF THIS PROGRAM WAS TO
//      1. LEARN SOMETHING ABOUT THE VT100 GRAPHICS.
//      2. KEEP MY KIDS BUSY ON WEEKENDS. WHILE I TRIED
//         TO GET SOMETHING ELSE DONE.
//
//  USE OF THIS PROGRAM FOR ANY PURPOSE OTHER THAN FUN
//  IS PROHIBITED.
//
    IMPLICIT INTEGER*4 (A-Z)
//
//  MAZE DIMENSIONS
//  HMAX AND WMAX SHOULD NOT BE LARGER THAN 22 AND 80 RESP.
//
    PARAMETER HMAX=22, WMAX=80, DMAX=4
//
    DIMENSION SLEEP(2)
//
//  DIMENSION IS HMAX*WMAX*DMAX
    INTEGER*2  EXIT(HMAX*WMAX*DMAX), MAT(HMAX*WMAX*DMAX)
    INTEGER*2  LCOUNT(DMAX)
//
    BYTE CLEAR(2)
//
    CHARACTER*200 INPUT
//
    COMMON /MAZECM/ STARTH,STARTW,STARTD,ENDH,ENDW,ENDD,NOBELL
//
//  CLEAR IS A VT100 RESET
//
    DATA CLEAR / 27, 'c' /
//
//  START - SEE IF AN OLD GAME IS TO BE USED.
//
    WRITE(6,10)
   10   FORMAT(' WELCOME TO MAZE')
//
   20   WRITE(6,30)
   30   FORMAT(' ARE YOU GOING TO PLAY A SAVED GAME? ',$)
    READ(5,40) NC,INPUT
   40   FORMAT(Q,A)
    IF(INDEX(INPUT(1:NC),'Y').NE.0) GO TO 120
    SAVE = 0
//
//  INPUT DIMENSION OF MAZE
//
   50   WRITE(6,60) HMAX
   60   FORMAT(' PLEASE INPUT HEIGHT OF MAZE - DEFAULT = ',I2,' ',$)
    READ(5,40) NC,INPUT
    READ(INPUT,70,ERR=50) HEIGHT
   70   FORMAT(BNI2)
    IF(HEIGHT.EQ.0) HEIGHT=HMAX
    IF(HEIGHT.LT.2) HEIGHT=2
    IF(HEIGHT.GT.HMAX) HEIGHT=HMAX
   80   WRITE(6,90) WMAX
   90   FORMAT(' PLEASE INPUT WIDTH  OF MAZE - DEFAULT = ',I2,' ',$)
    READ(5,40) NC,INPUT
    READ(INPUT,70,ERR=80) WIDTH
    IF(WIDTH.EQ.0) WIDTH = WMAX
    IF(WIDTH.LT.2) WIDTH=2
    IF(WIDTH.GT.WMAX) WIDTH=WMAX
  100   WRITE(6,110)
  110   FORMAT(' PLEASE INPUT DEPTH  OF MAZE - DEFAULT =  1 ',$)
    READ(5,40) NC,INPUT
    READ(INPUT,70,ERR=100) DEPTH
    IF(DEPTH.LE.0) DEPTH = 1
    IF(DEPTH.GT.DMAX) DEPTH = DMAX
    NTERMS = HEIGHT * WIDTH * DEPTH
...

Symbols:

The next problem that encountered were the symbols in the BNFC lexer/parser, _SYMB_43, for example. Yuck! I would have been shot at a code review for that. Here's what the lexer looked like (Fortran.l.bkp):

/* -*- c -*- This FLex file was machine-generated by the BNF converter */
%option noyywrap
%{
#define yylval Fortranlval
#define YY_BUFFER_APPEND Fortran_BUFFER_APPEND
#define YY_BUFFER_RESET Fortran_BUFFER_RESET
#define initialize_lexer Fortran_initialize_lexer
#include <string.h>
#include "Parser.h"
#define YY_BUFFER_LENGTH 4096
extern int yy_mylinenumber ;
char YY_PARSED_STRING[YY_BUFFER_LENGTH];
void YY_BUFFER_APPEND(char *s)
{
  strcat(YY_PARSED_STRING, s); //Do something better here!
}
void YY_BUFFER_RESET(void)
{
  int x;
  for(x = 0; x < YY_BUFFER_LENGTH; x++)
    YY_PARSED_STRING[x] = 0;
}

%}

LETTER [a-zA-Z]
CAPITAL [A-Z]
SMALL [a-z]
DIGIT [0-9]
IDENT [a-zA-Z0-9'_]
%START YYINITIAL COMMENT CHAR CHARESC CHAREND STRING ESCAPED
%%

<YYINITIAL>"
"        return _SYMB_0;
<YYINITIAL>"("           return _SYMB_1;
<YYINITIAL>"-"           return _SYMB_2;
<YYINITIAL>")"           return _SYMB_3;
<YYINITIAL>"*"           return _SYMB_4;
<YYINITIAL>","           return _SYMB_5;
<YYINITIAL>"="           return _SYMB_6;
<YYINITIAL>"+"           return _SYMB_7;
<YYINITIAL>"/"           return _SYMB_8;
<YYINITIAL>"$"           return _SYMB_9;
<YYINITIAL>".OR."        return _SYMB_10;
<YYINITIAL>".AND."           return _SYMB_11;
<YYINITIAL>".EQ."        return _SYMB_12;
<YYINITIAL>".NE."        return _SYMB_13;
<YYINITIAL>".LT."        return _SYMB_14;
<YYINITIAL>".GT."        return _SYMB_15;
<YYINITIAL>".LE."        return _SYMB_16;
<YYINITIAL>".GE."        return _SYMB_17;
<YYINITIAL>"**"          return _SYMB_18;
<YYINITIAL>":"           return _SYMB_19;
<YYINITIAL>".TRUE."          return _SYMB_20;
<YYINITIAL>".FALSE."         return _SYMB_21;
<YYINITIAL>".NOT."           return _SYMB_22;
<YYINITIAL>"BYTE"        return _SYMB_23;
<YYINITIAL>"CALL"        return _SYMB_24;
<YYINITIAL>"CHARACTER"           return _SYMB_25;
<YYINITIAL>"CLOSE"           return _SYMB_26;
<YYINITIAL>"COMMON"          return _SYMB_27;
<YYINITIAL>"CONTINUE"        return _SYMB_28;
<YYINITIAL>"DATA"        return _SYMB_29;
<YYINITIAL>"DIMENSION"           return _SYMB_30;
<YYINITIAL>"DO"          return _SYMB_31;
<YYINITIAL>"DOUBLE"          return _SYMB_32;
<YYINITIAL>"END"         return _SYMB_33;
<YYINITIAL>"EQUIVALENCE"         return _SYMB_34;
<YYINITIAL>"FORMAT"          return _SYMB_35;
<YYINITIAL>"FUNCTION"        return _SYMB_36;
<YYINITIAL>"GO"          return _SYMB_37;
<YYINITIAL>"IF"          return _SYMB_38;
<YYINITIAL>"IMPLICIT"        return _SYMB_39;
<YYINITIAL>"INTEGER"         return _SYMB_40;
<YYINITIAL>"LOGICAL"         return _SYMB_41;
<YYINITIAL>"OPEN"        return _SYMB_42;
<YYINITIAL>"PARAMETER"           return _SYMB_43;
<YYINITIAL>"READ"        return _SYMB_44;
<YYINITIAL>"REAL"        return _SYMB_45;
<YYINITIAL>"RETURN"          return _SYMB_46;
<YYINITIAL>"STOP"        return _SYMB_47;
<YYINITIAL>"SUBROUTINE"          return _SYMB_48;
<YYINITIAL>"TO"          return _SYMB_49;
<YYINITIAL>"WRITE"           return _SYMB_50;

<YYINITIAL>"//"[^\n]*\n     ++yy_mylinenumber;   /* BNFC single-line comment */;
<YYINITIAL>\%*{CAPITAL}({CAPITAL}|{DIGIT}|\$|\_)*        yylval.string_ = strdup(yytext); return _SYMB_51;
<YYINITIAL>'.+'          yylval.string_ = strdup(yytext); return _SYMB_52;
<YYINITIAL>{DIGIT}+\.{DIGIT}+((e|E)\-?{DIGIT}+)?(f|F)|{DIGIT}+(e|E)\-?{DIGIT}+(f|F)          yylval.string_ = strdup(yytext); return _SYMB_53;
<YYINITIAL>{DIGIT}+          yylval.int_ = atoi(yytext); return _INTEGER_;
\n ++yy_mylinenumber ;
<YYINITIAL>[ \t\r\n\f]           /* ignore white space. */;
<YYINITIAL>.         return _ERROR_;
%%
void initialize_lexer(FILE *inp) { yyrestart(inp); BEGIN YYINITIAL; }

The parser(Fortran.y.bkp) was worse ... I wish they had some way of converting these symbols to something more human readable:

%start Program
%%
Program : ListLblStm { $$ = make_Progr(reverseListLblStm($1)); YY_RESULT_Program_= $$; }
;
ListLblStm : /* empty */ { $$ = 0;  }
  | ListLblStm LblStm _SYMB_0 { $$ = make_ListLblStm($2, $1);  }
;
LblStm : Labeled_stm { $$ = make_SLabel($1); YY_RESULT_LblStm_= $$; }
  | Simple_stm { $$ = make_SSimple($1); YY_RESULT_LblStm_= $$; }
  | /* empty */ { $$ = make_SNill(); YY_RESULT_LblStm_= $$; }
;
Labeled_stm : _INTEGER_ Simple_stm { $$ = make_SLabelOne($1, $2);  }
;
Simple_stm : _SYMB_39 Type_Spec Type_Qual _SYMB_1 _SYMB_51 _SYMB_2 _SYMB_51 _SYMB_3 { $$ = make_SImplicit($2, $3, $5, $7);  }
  | _SYMB_43 ListNameValue { $$ = make_SParameter($2);  }
  | _SYMB_30 ListNameDim { $$ = make_SDiment($2);  }
  | Type_Spec Type_Qual ListNameDim { $$ = make_SDeclQual($1, $2, $3);  }
  | Type_Spec ListNameDim { $$ = make_SDecl($1, $2);  }
  | _SYMB_29 ListDataSeg { $$ = make_SData($2);  }
  | _SYMB_27 _SYMB_8 _SYMB_51 _SYMB_8 ListName { $$ = make_SCommon($3, $5);  }
  | _SYMB_50 _SYMB_1 ListAssignName _SYMB_3 { $$ = make_SWrtEmp($3);  }
  | _SYMB_50 _SYMB_1 ListAssignName _SYMB_3 ListNameOrArray { $$ = make_SWrite($3, $5);  }
  | _SYMB_35 _SYMB_1 ListFmtSpecs _SYMB_3 { $$ = make_SFormat($3);  }
  | _SYMB_44 _SYMB_1 ListAssignName _SYMB_3 ListNameOrArray { $$ = make_SRead($3, $5);  }
  | _SYMB_44 _SYMB_6 LExp { $$ = make_SAsignRead($3);  }
  | _SYMB_38 _SYMB_1 LExp _SYMB_3 IfThenPart { $$ = make_SIf($3, $5);  }
  | _SYMB_51 _SYMB_6 LExp { $$ = make_SAssign($1, $3);  }
  | _SYMB_51 _SYMB_1 ListLExp _SYMB_3 _SYMB_6 LExp { $$ = make_SAsnArr($1, $3, $6);  }
  | _SYMB_24 _SYMB_51 _SYMB_1 ListSpecLExp _SYMB_3 { $$ = make_SFunCall($2, $4);  }
  | _SYMB_24 _SYMB_51 { $$ = make_SFunCallNil($2);  }
  | _SYMB_37 _SYMB_49 _INTEGER_ { $$ = make_SGoto($3);  }
  | _SYMB_42 _SYMB_1 ListAssignName _SYMB_3 { $$ = make_SOpen($3);  }
  | _SYMB_26 _SYMB_1 ListAssignName _SYMB_3 { $$ = make_SClose($3);  }
  | _SYMB_31 _INTEGER_ DoRangePart { $$ = make_SDo($2, $3);  }
  | _SYMB_47 { $$ = make_SStop();  }
  | _SYMB_47 _SYMB_52 { $$ = make_SStopMsg($2);  }
  | _SYMB_33 { $$ = make_SEnd();  }
  | _SYMB_48 _SYMB_51 _SYMB_1 ListSpecLExp _SYMB_3 { $$ = make_SSubr($2, $4);  }
  | _SYMB_48 _SYMB_51 { $$ = make_SSubrNil($2);  }
  | _SYMB_36 _SYMB_51 _SYMB_1 ListSpecLExp _SYMB_3 { $$ = make_SFunct($2, $4);  }
  | _SYMB_36 _SYMB_51 { $$ = make_SFunctNil($2);  }
  | _SYMB_28 { $$ = make_SContinue();  }
  | _SYMB_46 { $$ = make_SReturn();  }
  | _SYMB_34 _SYMB_1 _SYMB_51 _SYMB_5 NameOrArrRef _SYMB_3 { $$ = make_SEquiv($3, $5);  }
;
Type_Qual : _SYMB_4 _INTEGER_ { $$ = make_QType($2);  }
;
ListNameValue : NameValue { $$ = make_ListNameValue($1, 0);  }
  | NameValue _SYMB_5 ListNameValue { $$ = make_ListNameValue($1, $3);  }
;
NameValue : _SYMB_51 _SYMB_6 _INTEGER_ { $$ = make_NVPair($1, $3);  }
;
ListNameDim : NameDim { $$ = make_ListNameDim($1, 0);  }
  | NameDim _SYMB_5 ListNameDim { $$ = make_ListNameDim($1, $3);  }
;
NameDim : _SYMB_51 _SYMB_1 ListDExp _SYMB_3 { $$ = make_PNameDim($1, $3);  }
  | _SYMB_51 { $$ = make_PNameDim2($1);  }
;
ListDExp : DExp { $$ = make_ListDExp($1, 0);  }
  | DExp _SYMB_5 ListDExp { $$ = make_ListDExp($1, $3);  }
;
DExp : DExp _SYMB_7 DExp1 { $$ = make_EDplus($1, $3);  }
  | DExp _SYMB_2 DExp1 { $$ = make_EDminus($1, $3);  }
  | DExp1 { $$ = $1;  }
;
DExp1 : DExp1 _SYMB_4 DExp2 { $$ = make_EDtimes($1, $3);  }
  | DExp1 _SYMB_8 DExp2 { $$ = make_EDdiv($1, $3);  }
  | DExp2 { $$ = $1;  }
;
DExp2 : _SYMB_1 DExp _SYMB_3 { $$ = $2;  }
  | _INTEGER_ { $$ = make_EDInt($1);  }
  | _SYMB_51 { $$ = make_EDName($1);  }
;
ListDataSeg : DataSeg { $$ = make_ListDataSeg($1, 0);  }
  | DataSeg _SYMB_5 ListDataSeg { $$ = make_ListDataSeg($1, $3);  }
;
DataSeg : ListVars _SYMB_8 ListDataVal _SYMB_8 { $$ = make_PDSeg($1, $3);  }
;
ListVars : Vars { $$ = make_ListVars($1, 0);  }
  | Vars _SYMB_5 ListVars { $$ = make_ListVars($1, $3);  }
;
Vars : _SYMB_51 { $$ = make_PVars($1);  }
;
ListDataVal : DataVal { $$ = make_ListDataVal($1, 0);  }
  | DataVal _SYMB_5 ListDataVal { $$ = make_ListDataVal($1, $3);  }
;
DataVal : _SYMB_7 DataValType { $$ = make_PDValPls($2);  }
  | _SYMB_2 DataValType { $$ = make_PDValNeg($2);  }
  | DataValType { $$ = make_PDValNil($1);  }
;
DataValType : _INTEGER_ { $$ = make_PDVInt($1);  }
  | _SYMB_53 { $$ = make_PDVFloat($1);  }
  | _SYMB_52 { $$ = make_PDVChar($1);  }
;
ListName : _SYMB_51 { $$ = make_ListName($1, 0);  }
  | _SYMB_51 _SYMB_5 ListName { $$ = make_ListName($1, $3);  }
;
ListFmtSpecs : FmtSpecs { $$ = make_ListFmtSpecs($1, 0);  }
  | FmtSpecs _SYMB_5 ListFmtSpecs { $$ = make_ListFmtSpecs($1, $3);  }
;
FmtSpecs : _SYMB_52 { $$ = make_FSString($1);  }
  | _SYMB_51 { $$ = make_FSName($1);  }
  | _SYMB_9 { $$ = make_FSINNL();  }
  | _SYMB_8 { $$ = make_FSSlash();  }
;
ListNameOrArray : NameOrArray { $$ = make_ListNameOrArray($1, 0);  }
  | NameOrArray _SYMB_5 ListNameOrArray { $$ = make_ListNameOrArray($1, $3);  }
;
NameOrArray : _SYMB_51 { $$ = make_PNALName($1);  }
  | _SYMB_1 _SYMB_51 _SYMB_1 ListName _SYMB_3 _SYMB_5 DoRangePart _SYMB_3 { $$ = make_PNALArry($2, $4, $7);  }
;
IfThenPart : _SYMB_37 _SYMB_49 _INTEGER_ { $$ = make_PIfGoto($3);  }
  | _SYMB_51 _SYMB_6 LExp { $$ = make_PIfAsgn($1, $3);  }
  | _SYMB_51 _SYMB_1 ListLExp _SYMB_3 _SYMB_6 LExp { $$ = make_PIFAsnArr($1, $3, $6);  }
  | _SYMB_46 { $$ = make_PIfRetn();  }
  | _SYMB_24 _SYMB_51 _SYMB_1 ListSpecLExp _SYMB_3 { $$ = make_PIfCall($2, $4);  }
  | _SYMB_24 _SYMB_51 { $$ = make_PIfCallNil($2);  }
;
LExp : LExp _SYMB_10 LExp2 { $$ = make_Elor($1, $3);  }
  | LExp _SYMB_11 LExp2 { $$ = make_Eland($1, $3);  }
  | LExp2 { $$ = $1;  }
;
LExp2 : LExp2 _SYMB_12 LExp3 { $$ = make_Eeq($1, $3);  }
  | LExp2 _SYMB_13 LExp3 { $$ = make_Eneq($1, $3);  }
  | LExp3 { $$ = $1;  }
;
LExp3 : LExp3 _SYMB_14 LExp4 { $$ = make_Elthen($1, $3);  }
  | LExp3 _SYMB_15 LExp4 { $$ = make_Egrthen($1, $3);  }
  | LExp3 _SYMB_16 LExp4 { $$ = make_Ele($1, $3);  }
  | LExp3 _SYMB_17 LExp4 { $$ = make_Ege($1, $3);  }
  | LExp4 { $$ = $1;  }
;
LExp4 : LExp4 _SYMB_7 LExp5 { $$ = make_Eplus($1, $3);  }
  | LExp4 _SYMB_2 LExp5 { $$ = make_Eminus($1, $3);  }
  | LExp5 { $$ = $1;  }
;
LExp5 : LExp5 _SYMB_4 LExp6 { $$ = make_Etimes($1, $3);  }
  | LExp5 _SYMB_8 LExp6 { $$ = make_Ediv($1, $3);  }
  | LExp6 { $$ = $1;  }
;
LExp6 : Unary_operator LExp8 { $$ = make_Epreop($1, $2);  }
  | LExp8 { $$ = $1;  }
;
LExp8 : LExp5 _SYMB_18 LExp8 { $$ = make_Epower($1, $3);  }
  | LExp8 _SYMB_1 _SYMB_3 { $$ = make_Efunk($1);  }
  | LExp8 _SYMB_1 ListSpecLExp _SYMB_3 { $$ = make_Efunkpar($1, $3);  }
  | LExp9 { $$ = $1;  }
;
LExp9 : TIntVar RangePart { $$ = make_Evar($1, $2);  }
  | _SYMB_52 { $$ = make_Estr($1);  }
  | LExp10 { $$ = $1;  }
;
RangePart : /* empty */ { $$ = make_ERangeNull();  }
  | _SYMB_19 TIntVar { $$ = make_ERange($2);  }
;
TIntVar : _INTEGER_ { $$ = make_ETInt($1);  }
  | _SYMB_20 { $$ = make_ETTrue();  }
  | _SYMB_21 { $$ = make_ETFalse();  }
  | _SYMB_51 { $$ = make_ETNameVar($1);  }
  | _SYMB_44 { $$ = make_ETRead();  }
;
ListLExp : LExp { $$ = make_ListLExp($1, 0);  }
  | LExp _SYMB_5 ListLExp { $$ = make_ListLExp($1, $3);  }
;
LExp10 : LExp11 { $$ = $1;  }
;
LExp11 : _SYMB_1 LExp _SYMB_3 { $$ = $2;  }
;
Unary_operator : _SYMB_7 { $$ = make_OUnaryPlus();  }
  | _SYMB_2 { $$ = make_OUnaryMinus();  }
  | _SYMB_22 { $$ = make_OUnaryNot();  }
;
ListSpecLExp : SpecLExp { $$ = make_ListSpecLExp($1, 0);  }
  | SpecLExp _SYMB_5 ListSpecLExp { $$ = make_ListSpecLExp($1, $3);  }
;
SpecLExp : LExp { $$ = make_SpLExpNot($1);  }
;
ListAssignName : AssignName { $$ = make_ListAssignName($1, 0);  }
  | AssignName _SYMB_5 ListAssignName { $$ = make_ListAssignName($1, $3);  }
;
AssignName : _SYMB_51 { $$ = make_PAsgnNm($1);  }
  | _INTEGER_ { $$ = make_PAsgnInt($1);  }
  | _SYMB_51 _SYMB_6 LExp { $$ = make_PAssign($1, $3);  }
;
DoRangePart : _SYMB_51 _SYMB_6 LExp _SYMB_5 LExp { $$ = make_PDoRange($1, $3, $5);  }
;
NameOrArrRef : _SYMB_51 { $$ = make_PNOAName($1);  }
  | _SYMB_51 _SYMB_1 ListLExp _SYMB_3 { $$ = make_PNOAArr($1, $3);  }
;
Type_Spec : _SYMB_40 { $$ = make_TInt();  }
  | _SYMB_45 { $$ = make_TFloat();  }
  | _SYMB_32 { $$ = make_TDouble();  }
  | _SYMB_25 { $$ = make_TChar();  }
  | _SYMB_23 { $$ = make_TByte();  }
  | _SYMB_41 { $$ = make_TLogi();  }
;

Fortunately, linux helps with that. I built a little script file that changes these cryptic symbols for something a little more tolerable:

# Clean up the symbols in both the parser and lexor
sed -f symbols Fortran.y &gt;Fortran.yy
cp Fortran.y Fortran.y.bkp
cp Fortran.yy Fortran.y

sed -f symbols Fortran.l &gt;Fortran.ll
cp Fortran.l Fortran.l.bkp
cp Fortran.ll Fortran.l

... and the associated 'symbols' file. NOTE the order of the 'symbols' commands. The _SYMB_1 was changed after the _SYMB_1? symbols otherwise the sed editor would have changed partial symbols:

s/_SYMB_10/T_OR/g
s/_SYMB_11/T_AND/g
s/_SYMB_12/T_EQ/g
s/_SYMB_13/T_NE/g
s/_SYMB_14/T_LT/g
s/_SYMB_15/T_GT/g
s/_SYMB_16/T_LE/g
s/_SYMB_17/T_GE/g
s/_SYMB_18/T_POW/g
s/_SYMB_19/T_COLON/g
s/_SYMB_20/T_TRUE/g
s/_SYMB_21/T_FALSE/g
s/_SYMB_22/T_NOT/g
s/_SYMB_23/T_BYTE/g
s/_SYMB_24/T_CALL/g
s/_SYMB_25/T_CHAR/g
s/_SYMB_26/T_CLOSE/g
s/_SYMB_27/T_COMM/g
s/_SYMB_28/T_CONT/g
s/_SYMB_29/T_DATA/g
s/_SYMB_30/T_DIMS/g
s/_SYMB_31/T_DO/g
s/_SYMB_32/T_DBL/g
s/_SYMB_33/T_END/g
s/_SYMB_34/T_EQU/g
s/_SYMB_35/T_FMT/g
s/_SYMB_36/T_FUNC/g
s/_SYMB_37/T_GO/g
s/_SYMB_38/T_IF/g
s/_SYMB_39/T_IMPL/g
s/_SYMB_40/T_INT/g
s/_SYMB_41/T_LOGI/g
s/_SYMB_42/T_OPEN/g
s/_SYMB_43/T_PARM/g
s/_SYMB_44/T_READ/g
s/_SYMB_45/T_REAL/g
s/_SYMB_46/T_RTN/g
s/_SYMB_47/T_STOP/g
s/_SYMB_48/T_SUBR/g
s/_SYMB_49/T_TO/g
s/_SYMB_50/T_WRITE/g
s/_SYMB_51/T_NAME/g
s/_SYMB_52/T_SQSTR/g
s/_SYMB_53/T_CFLT/g

s/_SYMB_0/T_NEWLINE/g
s/_SYMB_1/T_LPAREN/g
s/_SYMB_2/T_MINUS/g
s/_SYMB_3/T_RPAREN/g
s/_SYMB_4/T_MULT/g
s/_SYMB_5/T_COMMA/g
s/_SYMB_6/T_EQUALS/g
s/_SYMB_7/T_PLUS/g
s/_SYMB_8/T_DIV/g
s/_SYMB_9/T_DOLLAR/g

Makefile:

The Makefile was also a problem (Makefile.old). It is auto generated by BNFC which is great but it had no way to turn on parser debugging which is rather important when creating a frontend from scratch. Bison will often complain about shift/reduce and reduce/reduce errors and you need Bison's output file to debug these. So my next little bit of bash script dealt with that ... it just rewrites the Makefile with the appropriate flags set.

if [ "$flag" == "-d" ]; then
    # ----
    # Modify the Makefile to add debug flags so output is more verbose.
    cp Makefile Makefile.old
    cat Makefile \
        | sed "s/-PFortran$/-PFortran --debug/g" \
        | sed "s/-pFortran$/-pFortran --debug -r all -g/g" \
        &gt; Makefile.new
    cp Makefile.new Makefile

    # Show user the difference in the Makefiles
    echo "--- Makefile ---"
    diff Makefile Makefile.old | sed "s/^/    /g"
fi

This then produces the Parser.output file which we use to debug the BNFC input grammar. I'll explain the process of debugging the grammar when there are reduce/reduce and shift/reduce errors in another post:

Terminals unused in grammar

   _ERROR_


State 177 conflicts: 3 reduce/reduce
State 225 conflicts: 3 reduce/reduce
State 226 conflicts: 3 reduce/reduce
State 227 conflicts: 1 shift/reduce, 3 reduce/reduce


Grammar

    0 $accept: Program $end

    1 Program: ListLblStm

    2 ListLblStm: %empty
    3           | ListLblStm LblStm _SYMB_0

    4 LblStm: Labeled_stm
    5       | Simple_stm
    6       | %empty

    7 Labeled_stm: _INTEGER_ Simple_stm

    8 Simple_stm: _SYMB_39 Type_Spec Type_Qual _SYMB_1 _SYMB_51 _SYMB_2 _SYMB_51 _SYMB_3
    9           | _SYMB_43 ListNameValue
   10           | _SYMB_30 ListNameDim
   11           | Type_Spec Type_Qual ListNameDim
   12           | Type_Spec ListNameDim
   13           | _SYMB_29 ListDataSeg
   14           | _SYMB_27 _SYMB_8 _SYMB_51 _SYMB_8 ListName
   15           | _SYMB_50 _SYMB_1 ListAssignName _SYMB_3
   16           | _SYMB_50 _SYMB_1 ListAssignName _SYMB_3 ListNameOrArray
   17           | _SYMB_35 _SYMB_1 ListFmtSpecs _SYMB_3
   18           | _SYMB_44 _SYMB_1 ListAssignName _SYMB_3 ListNameOrArray
   19           | _SYMB_44 _SYMB_6 LExp
...

Generated Lexer fixups:

The generated lexer had a few changes that were needed because I was trying to make it conform to what I wanted to do instead of letting it do it's thing:

<YYINITIAL>"
"        return T_NEWLINE;
<YYINITIAL>"("           return T_LPAREN;
<YYINITIAL>"-"           return T_MINUS;
<YYINITIAL>")"           return T_RPAREN;
...
<YYINITIAL>"TO"          return T_TO;
<YYINITIAL>"WRITE"           return T_WRITE;

<YYINITIAL>"//"[^\n]*\n     ++yy_mylinenumber;   /* BNFC single-line comment */;
<YYINITIAL>\%*{CAPITAL}({CAPITAL}|{DIGIT}|\$|\_)*        yylval.string_ = strdup(yytext); return T_NAME;
<YYINITIAL>'.+'          yylval.string_ = strdup(yytext); return T_SQSTR;
<YYINITIAL>{DIGIT}+\.{DIGIT}+((e|E)\-?{DIGIT}+)?(f|F)|{DIGIT}+(e|E)\-?{DIGIT}+(f|F)          yylval.string_ = strdup(yytext); return T_CFLT;
<YYINITIAL>{DIGIT}+          yylval.int_ = atoi(yytext); return _INTEGER_;
\n ++yy_mylinenumber ;
<YYINITIAL>[ \t\r\n\f]           /* ignore white space. */;
<YYINITIAL>.         return _ERROR_;
%%
void initialize_lexer(FILE *inp) { yyrestart(inp); BEGIN YYINITIAL; }

First BNFC doesn't know what to do with a newline character as a token. So you see in the first two lines a broken Flex statement. These two lines were replaced with a line derived from the file 'l1':

"\n" { ++yy_mylinenumber; return T_NEWLINE; };

which treats the newline better. The other change is to get rid of the line that counts the line numbers (the ++yy_mylinenumber; line) and remove newlines and form-feeds from the "ignore white space" line. The following bash script segment does this:

# Do the other modifications to Fortran.l to fix the above problem.
cp Fortran.l Fortran.l.old
cat Fortran.l \
    | grep -v "^<YYINITIAL>"$" \
   | grep -v "
^..\ ++yy_mylinenumber.;$" \
   | sed "
s/^"[ \t]*return T_NEWLINE;$/${l1}/g" \
    | sed "s/\\\n\\\f]/]+/g" \
    > Fortran.l.new
cp Fortran.l.new Fortran.l
touch Fortran.y

# Show changes to user.
echo "--- Fortran.l ---"
diff Fortran.l Fortran.l.old | sed "s/^/    /g"

This produces the following lexer:

"\n"       { ++yy_mylinenumber; return T_NEWLINE; };
<YYINITIAL>"("           return T_LPAREN;
<YYINITIAL>"-"           return T_MINUS;
<YYINITIAL>")"           return T_RPAREN;
...
<YYINITIAL>"TO"          return T_TO;
<YYINITIAL>"WRITE"           return T_WRITE;

<YYINITIAL>"//"[^\n]*\n     ++yy_mylinenumber;   /* BNFC single-line comment */;
<YYINITIAL>\%*{CAPITAL}({CAPITAL}|{DIGIT}|\$|\_)*        yylval.string_ = strdup(yytext); return T_NAME;
<YYINITIAL>'.+'          yylval.string_ = strdup(yytext); return T_SQSTR;
<YYINITIAL>{DIGIT}+\.{DIGIT}+((e|E)\-?{DIGIT}+)?(f|F)|{DIGIT}+(e|E)\-?{DIGIT}+(f|F)          yylval.string_ = strdup(yytext); return T_CFLT;
<YYINITIAL>{DIGIT}+          yylval.int_ = atoi(yytext); return _INTEGER_;
<YYINITIAL>[ \t\r]+          /* ignore white space. */;
<YYINITIAL>.         return _ERROR_;
%%

Code Generation:

The generation of all the Flex/Bison and the pretty printer code is the saving grace. BNFC gets you most of the way to producing a front-end for your compiler and makes life a lot easier if, like me, you tend to forget how to write a Flex and Bison driver file in between doing other coding.

However, if you are new to building a compiler then BNFC may just make things worse by adding another level of complexity to an already complex problem. For this reason it might be best for novice compiler writers to ignore BNFC and read a good book on Flex/Bison and maybe a text book on compiler writing.

In my next post I will describe the code that is generated by BNFC.

Here are all the files (complete) that I've talked about above.

The Front-End (Part 2)

The following three files demonstrate how the front end works. These files are the original source file Maze.for, the pre-processed file Maze_pp.for, and the front end debug output TestProgram.out. These files are included here.

First Maze.for the original Fortran source:

C
C       MAZE -  USES A VT100 TO WANDER AROUND.
C               THE VT100 MUST HAVE ADVANCED VIDEO OPTION.
C               ANSI VT100 ESCAPE SEQUENCES ARE USED.
C
C       WRITTEN BY DON MCLEAN
C       OF THE MACNEAL-SCHWENDLER CORP.
C
C       THE PURPOSE OF THIS PROGRAM WAS TO
C               1. LEARN SOMETHING ABOUT THE VT100 GRAPHICS.
C               2. KEEP MY KIDS BUSY ON WEEKENDS. WHILE I TRIED
C                  TO GET SOMETHING ELSE DONE.
C
C       USE OF THIS PROGRAM FOR ANY PURPOSE OTHER THAN FUN
C       IS PROHIBITED.
C
        IMPLICIT INTEGER*4 (A-Z)
C
C       MAZE DIMENSIONS
C       HMAX AND WMAX SHOULD NOT BE LARGER THAN 22 AND 80 RESP.
C
        PARAMETER HMAX=22, WMAX=80, DMAX=4
C
        DIMENSION SLEEP(2)
C
C       DIMENSION IS HMAX*WMAX*DMAX
        INTEGER*2  EXIT(HMAX*WMAX*DMAX), MAT(HMAX*WMAX*DMAX)
        INTEGER*2  LCOUNT(DMAX)
C
        BYTE CLEAR(2)
C
        CHARACTER*200 INPUT
C
        COMMON /MAZECM/ STARTH,STARTW,STARTD,ENDH,ENDW,ENDD,NOBELL
C
C       CLEAR IS A VT100 RESET
C
        DATA CLEAR / 27, 'c' /
C
C       START - SEE IF AN OLD GAME IS TO BE USED.
C
        WRITE(6,10)
   10   FORMAT(' WELCOME TO MAZE')
C
   20   WRITE(6,30)
   30   FORMAT(' ARE YOU GOING TO PLAY A SAVED GAME? ',$)
        READ(5,40) NC,INPUT
   40   FORMAT(Q,A)
        IF(INDEX(INPUT(1:NC),'Y').NE.0) GO TO 120
        SAVE = 0
C
C       INPUT DIMENSION OF MAZE
C
   50   WRITE(6,60) HMAX
   60   FORMAT(' PLEASE INPUT HEIGHT OF MAZE - DEFAULT = ',I2,' ',$)
        READ(5,40) NC,INPUT
        READ(INPUT,70,ERR=50) HEIGHT
   70   FORMAT(BNI2)
        IF(HEIGHT.EQ.0) HEIGHT=HMAX
        IF(HEIGHT.LT.2) HEIGHT=2
        IF(HEIGHT.GT.HMAX) HEIGHT=HMAX
   80   WRITE(6,90) WMAX
   90   FORMAT(' PLEASE INPUT WIDTH  OF MAZE - DEFAULT = ',I2,' ',$)
        READ(5,40) NC,INPUT
        READ(INPUT,70,ERR=80) WIDTH
        IF(WIDTH.EQ.0) WIDTH = WMAX
        IF(WIDTH.LT.2) WIDTH=2
        IF(WIDTH.GT.WMAX) WIDTH=WMAX
  100   WRITE(6,110)
  110   FORMAT(' PLEASE INPUT DEPTH  OF MAZE - DEFAULT =  1 ',$)
        READ(5,40) NC,INPUT
        READ(INPUT,70,ERR=100) DEPTH
        IF(DEPTH.LE.0) DEPTH = 1
        IF(DEPTH.GT.DMAX) DEPTH = DMAX
        NTERMS = HEIGHT * WIDTH * DEPTH
C
C       GENERATE MAZE
C
        CALL MAZGEN(EXIT,LCOUNT,HEIGHT,WIDTH,DEPTH)
        GO TO 180
C
C       READ IN OLD MAZE
C
  120   WRITE(6,130)
  130   FORMAT(' INPUT SAVED FILE NAME ',$)
        READ(5,40) NC,INPUT
        OPEN(UNIT=7,NAME=INPUT(1:NC),STATUS='OLD',ERR=140,
        1 FORM='UNFORMATTED',READONLY)
        GO TO 160
C
  140   WRITE(6,150)
  150   FORMAT(' SAVE FILE NOT FOUND')
        GO TO 20
  160   READ(UNIT=7) HEIGHT,WIDTH,DEPTH,STARTH,STARTW,STARTD,
        1 ENDH,ENDW,ENDD
        NTERMS = HEIGHT * WIDTH * DEPTH
        READ(UNIT=7) (EXIT(I),I=1,NTERMS)
        READ(UNIT=7) (MAT (I),I=1,NTERMS)
        CLOSE(UNIT=7)
C
        WRITE(6,170)
  170   FORMAT( ' DO YOU WANT THE PATHS RESTORED? ',$)
        READ(5,40) NC,INPUT
        IF(INDEX(INPUT(1:NC),'Y').NE.0) SAVE=1
C       SPECIAL CASE TO PRINT ALL PATHS
        IF(INDEX(INPUT(1:NC),'YES SOLUTIONS').NE.0) GO TO 240
C
C       MAZE DESCRIPTION
C
  180   WRITE(6,190) HEIGHT,WIDTH,DEPTH
  190   FORMAT('0',' YOUR MAZE HAS A HEIGHT OF',I5,/,
        1  '             AND A WIDTH OF',I5,/,
        1  '            WITH A DEPTH OF',I5,//,
        2  '  THE DIRECTION COMMANDS FOR MAZE ARE SINGLE LETTERS',/,
        2  '    N(ORTH), U(P),    OR 8 IS UP',/,
        2  '    E(AST) , R(IGHT), OR 6 IS RIGHT',/,
        2  '    S(OUTH), D(OWN),  OR 2 IS DOWN',/,
        2  '    W(EST) , L(EFT),  OR 4 IS LEFT',/,
        2  '    I(N)   ,          OR 9 IS IN TO SCREEN',/,
        2  '    O(UT)  ,          OR 7 IS OUT OF SCREEN',/,
        2  '  OR YOU CAN USE THE ARROW KEYS FOR DIRECTIONS',/,
        3  '  THE COMMAND H(OME)    RETURNS YOUR POSITION TO "S" OR "O"',/,
        3  '  THE COMMAND Q(UIT)    ENDS THE GAME',/,
        3  '  THE COMMAND B(ELL)    MAKES THE TERMINAL BEEP (DEFAULT)',/,
        3  '  THE COMMAND M(UTE)    TURNS OFF TERMINAL BEEPING',/,
        3  '  THE COMMAND C(URRENT) PRINTS THE CURRENT LEVEL',/,
        3  '  AFTER A Q(UIT) COMMAND YOU GET A CHANCE TO SAVE THE GAME',/,
        4  '  YOU CAN MOVE ALONG BORDERS',//,
        4  '  PRESS RETURN TO START')
        READ(5,40) NC,INPUT
        NOBELL = 0
        IF(INPUT(1:6).EQ.'NOBELL') OFFBEL = 1
C
C       EXECUTE THE MAZE
C
        IF(SAVE.EQ.1) GO TO 210
        DO 200 I=1,NTERMS
  200   MAT(I)=0
C
  210   CALL MAZRUN(EXIT,MAT,HEIGHT,WIDTH,DEPTH)
C
C       SAVE THE MAZE ON REQUEST
C
        WRITE(6,220)
  220   FORMAT(' DO YOU WANT TO SAVE THIS MAZE? ',$)
        READ(5,40) NC,INPUT
C
        IF(INDEX(INPUT(1:NC),'Y') .EQ.0) GO TO 260
        WRITE(6,230)
  230   FORMAT(' PLEASE INPUT FILE NAME ',$)
        READ(5,40) NC,INPUT
        OPEN(UNIT=7,NAME=INPUT(1:NC),STATUS='NEW',FORM='UNFORMATTED')
        WRITE(UNIT=7) HEIGHT,WIDTH,DEPTH,STARTH,STARTW,STARTD,
        1 ENDH,ENDW,ENDD
        WRITE(UNIT=7) (EXIT(I),I=1,NTERMS)
        WRITE(UNIT=7) (MAT (I),I=1,NTERMS)
        CLOSE(UNIT=7)
        GO TO 260
C
C       PRINT THE SOLUTION TO A MAZE
C
  240   WRITE(6,250) HEIGHT,WIDTH,DEPTH
  250   FORMAT('0',' YOUR MAZE HAS A HEIGHT OF',I5,/,
        1  '             AND A WIDTH OF',I5,/,
        1  '            WITH A DEPTH OF',I5,//,
        4  '  PRESS RETURN TO START')
        READ(5,40) NC,INPUT
C
C       PRINT MAZE
C
        CALL MAZSOL(EXIT,MAT,HEIGHT,WIDTH,DEPTH)
C
C       CLEAR SCREEN AND WAIT 2 SECONDS
C
  260   CALL MAZOUT(CLEAR,2,1,24,1,0,0,0)
        CALL SYS$BINTIM( '0 ::02.00', SLEEP )
        CALL SYS$SCHDWK( , , SLEEP , )
        CALL SYS$HIBER
        STOP 'BYE FROM MAZE'
        END
 
        SUBROUTINE MAZGEN (  EXIT, LCOUNT, HEIGHT, WIDTH, DEPTH )
C
C       MAZGEN CREATES A MAZE IN EXIT
C
C       MAZE IS CREATED BY GOING FROM A START LOCATION IN A
C       RANDOM WALK
C       SQUARES MAY ONLY BE ENTERED ONCE BUT CAN HAVE MULTIPLE EXITS
C
C       MOVEMENT CONVENTION IS
C               1 - SOUTH OR DOWN
C               2 - EAST  OR RIGHT
C               4 - NORTH OR UP
C               8 - WEST  OR LEFT
C              16 - IN  A LEVEL
C              32 - OUT A LEVEL
C
        IMPLICIT INTEGER*4 (A-Z)
C
        INTEGER*2  EXIT(HEIGHT,WIDTH,DEPTH), LCOUNT(DEPTH)
C
        DIMENSION XDIR(4), YDIR(4), IN(4), OUT(4)
C
        REAL  SEED
C
        COMMON /MAZECM/ STARTH,STARTW,STARTD,ENDH,ENDW,ENDD,NOBELL
C
        DATA XDIR / 0, 1, 0,-1 /
        DATA YDIR / 1, 0,-1, 0 /
        DATA IN   / 4, 8, 1, 2 /
        DATA OUT  / 1, 2, 4, 8 /
C
C       INITIALIZE AND PICK START AND END POSITIONS
C
        SEED = FOR$SECNDS(0)
        H = HEIGHT
        W = WIDTH
        D = DEPTH
        NENTER = 1
        LMAX = H * W
        NMAX = LMAX * D
        DO 10 L=1,D
        LCOUNT(L) = 0
        DO 10 J=1,W
        DO 10 I=1,H
   10   EXIT (I,J,L) = 0
C
        STARTH = IRAN(SEED,1,H)
        STARTW = IRAN(SEED,1,W)
        STARTD = 1
   20   ENDH   = IRAN(SEED,1,H)
        ENDW   = IRAN(SEED,1,W)
        ENDD   = D
        IF(STARTH.EQ.ENDH.AND.STARTW.EQ.ENDW.AND.STARTD.EQ.ENDD)
        1 GO TO 20
        SY = STARTH
        SX = STARTW
        SD = STARTD
        LCOUNT(SD) = 1
C
C       START FILLING IN MAZE
C
   30   ODIR = 0
        Y = SY
        X = SX
        L = SD
   40   DIR = IRAN(SEED,1,4)
C       DO NOT GO BACK ON YOURSELF
        IF( ODIR .EQ. OUT(DIR) ) GO TO 40
C
C       TEND TO MAKE LONGER LINES WITH NLOOPS
C
        NLOOPS = IRAN(SEED,1,DIR)
        NCOUNT=0
   50   NY = YDIR(DIR) + Y
        NX = XDIR(DIR) + X
        IF(NY.LT.1.OR.NY.GT.H) GO TO 40
        IF(NX.LT.1.OR.NX.GT.W) GO TO 40
        IF( EXIT(NY,NX,L) .EQ. 0 ) GO TO 80
C
C       CHECK FOR DEAD END
C
        DO 60 I=1,4
        TY = Y + YDIR(I)
        TX = X + XDIR(I)
        IF(TY.LT.1.OR.TY.GT.H) GO TO 60
        IF(TX.LT.1.OR.TX.GT.W) GO TO 60
C       NOT DEAD END TRY AGAIN
        IF( EXIT(TY,TX,L) .NE. 0 ) GO TO 60
        GO TO 40
   60   CONTINUE
C
C       DEAD END RETURN TO START UNLESS ALL DIRECTIONS ARE TAKEN
C
        IF( Y.EQ.SY .AND. X.EQ. SX ) GO TO 70
        GO TO 30
C
C       ALL STARTS FROM THIS STARTING POSITION ARE TAKEN
C       PICK A NEW STARTING POSITIONS UNTIL MAZE IS FULL
C
   70   SY = IRAN(SEED,1,H)
        SX = IRAN(SEED,1,W)
        IF( EXIT(SY,SX,L) .EQ. 0 ) GO TO 70
        IF( SY.EQ.STARTH.AND.SX.EQ.STARTW.AND.L.EQ.STARTD) GO TO 70
        IF( SY.EQ.ENDH  .AND.SX.EQ.ENDW  .AND.L.EQ.ENDD) GO TO 70
        IF( SY.EQ.Y     .AND.SX.EQ.X   ) GO TO 70
C
C       FILL IN A LAYER AT A TIME
C
        IF(LCOUNT(L).NE.LMAX) GO TO 30
        SD = SD + 1
        EXIT(SY,SX, L) = IOR(EXIT(SY,SX, L),16)
        EXIT(SY,SX,SD) = IOR(EXIT(SY,SX,SD),32)
        NENTER = NENTER + 1
        LCOUNT(SD) = 1
        GO TO 30
C
C       DIRECTION TO GO FOUND
C       SET POSITION AS HAVING BEEN ENTERED AND
C       SET EXIT ARRAY TO DIRECTIONS INVOLVED
C
   80   ODIR = IN(DIR)
        EXIT(Y,X,L)   = IOR(EXIT(Y,X,L),OUT(DIR))
        EXIT(NY,NX,L) = IOR(EXIT(NY,NX,L),IN(DIR))
        NENTER = NENTER + 1
        LCOUNT(L) = LCOUNT(L)+1
C       THE WAY OUT - ALL POINTS USED
        IF( NENTER .EQ. NMAX ) GO TO 90
        Y = NY
        X = NX
C
C       ONLY ALLOW THE END LOCATION TO BE ENTERED ONCE
C
        IF(Y.EQ.ENDH.AND.X.EQ.ENDW.AND.L.EQ.ENDD) GO TO 30
        NCOUNT=NCOUNT+1
        IF(NCOUNT.LT.NLOOPS) GO TO 50
        GO TO 40
C
C       OUT
C
   90   CONTINUE
        RETURN
        END
 
        SUBROUTINE MAZOUT( STRING, L, XOFF, Y, X, BOLD, REVERS, BLINK )
C*****
C  OUTPUTS -STRING- OF LENGTH -L- BYTES WITH BYTE NUMBER -XOFF-
C  OF STRING LOCATED AT CURSER LOCATION -X-, -Y-.
C
C  BOLD, REVERS, BLINK ARE THE MODES TO OUTPUT THIS STRING
C*****
        IMPLICIT INTEGER*2 (A-Z)
C
        LOGICAL ANY
C
        CHARACTER*300 CC
C
        BYTE STRING(L), LINEOUT(300), CHAR(10), ESCAPE
C
        DATA CHAR/ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' /
        DATA ESCAPE/ 27 /, C1,C2,C3 / 0,0,0/
C
        EQUIVALENCE(CC,LINEOUT(1))
C
        NL     = X - XOFF + 1
        NR     = NL + L - 1
        LENGTH = L
        ISTART = 1
        NX     = X
        NY     = Y
C
C  READJUST STRING LIMITS TO BE WITHIN SCREEN.  IF STRING IS
C  COMPLETELY OUT OF SCREEN, THEN RETURN DOING NOTHING.
C
        IF( NY.LT.1 .OR. NY.GT.24 ) RETURN
        IF( NR.LT.1 .OR. NL.GT.132 ) RETURN
C
C  STRING (ALL OR PART) LIES IN THE SCREEN AREA.
C
        IF( NL .GE. 1 ) GO TO 10
        ISTART = 2 - NL
        NL     = 1
        LENGTH = LENGTH - ISTART + 1
C
   10 IF( NR .LE. 132 ) GO TO 20
        LENGTH = LENGTH - (NR-132)
        NR = 132
C
C  OK AT THIS POINT WE ARE GOING TO OUTPUT STRING(ISTART) THRU
C  STRING(ISTART+LENGTH-1) STARTING AT SCREEN LOCAT SCREEN ION (NL,NY)
C
C 20  LINEOUT(1) = ' '
   20 LINEOUT(1) = ESCAPE
        LINEOUT(2) = '['
        IOUT = 2
        COORD = NY
        DO 40 I = 1,2
        ANY = .FALSE.
        DO 30 J = 1,3
        N = MOD( COORD/10**(3-J), 10 )
        IF( N.EQ.0 .AND. .NOT.ANY ) GO TO 30
        ANY = .TRUE.
        IOUT = IOUT + 1
        LINEOUT(IOUT) = CHAR(N+1)
   30 CONTINUE
        IOUT = IOUT + 1
        LINEOUT(IOUT) = ';'
        COORD = NL
   40 CONTINUE
        LINEOUT(IOUT) = 'H'
C
C  CHECK MODES AGAINST CURRENT MODES AND OUTPUT APPROPRIATE
C  MODE INDICATORS.
C
        IF( C1.NE.0 .AND.   BOLD.EQ.0 ) GO TO 80
        IF( C2.NE.0 .AND. REVERS.EQ.0 ) GO TO 80
        IF( C3.NE.0 .AND.  BLINK.EQ.0 ) GO TO 80
        IF( C1.EQ.BOLD .AND. C2.EQ.REVERS .AND. C3.EQ.BLINK )GO TO 120
C
C  OK SIMPLY ADD OUTPUT MODES
C
        LINEOUT(IOUT+1) = ESCAPE
        LINEOUT(IOUT+2) = '['
        IOUT = IOUT + 2
C
        IF( C1.EQ.BOLD   ) GO TO 50
        LINEOUT(IOUT+1) = '1'
        LINEOUT(IOUT+2) = ';'
        IOUT = IOUT + 2
        C1   = BOLD
C
   50 IF( C2 .EQ. REVERS ) GO TO 60
        LINEOUT(IOUT+1) = '7'
        LINEOUT(IOUT+2) = ';'
        IOUT = IOUT + 2
        C2 = REVERS
C
   60 IF( C3 .EQ. BLINK ) GO TO 70
        LINEOUT(IOUT+1) = '5'
        LINEOUT(IOUT+2) = ';'
        IOUT = IOUT + 2
        C3 = BLINK
C
   70 LINEOUT(IOUT) = 'm'
        GO TO 120
C
C  SOME OR ALL OF CURRENT MODES ARE NOT DESIRED, THUS
C  MUST DO A NORMAL FOLLOWED BY A RESET OF MODES DESIRED.
C
   80 LINEOUT(IOUT+1) = ESCAPE
        LINEOUT(IOUT+2) = '['
        LINEOUT(IOUT+3) = '0'
        LINEOUT(IOUT+4) = ';'
        IOUT = IOUT + 4
C
        IF( BOLD .EQ. 0 ) GO TO 90
        LINEOUT(IOUT+1) = '1'
        LINEOUT(IOUT+2) = ';'
        IOUT = IOUT + 2
C
   90 C1 = BOLD
        IF( REVERS .EQ. 0 ) GO TO 100
        LINEOUT(IOUT+1) = '7'
        LINEOUT(IOUT+2) = ';'
        IOUT = IOUT + 2
C
  100 C2 = REVERS
        IF( BLINK .EQ. 0 ) GO TO 110
        LINEOUT(IOUT+1) = '5'
        LINEOUT(IOUT+2) = ';'
        IOUT = IOUT + 2
C
  110 C3 = BLINK
        LINEOUT(IOUT) = 'm'
C*****
C  OUTPUT THE STRING WITH ITS LEADER
C*****
  120 DO 130 I = 1,LENGTH
        LINEOUT(IOUT+I) = STRING(ISTART+I-1)
  130 CONTINUE
        IOUT = IOUT + LENGTH
C*****
C  BACK UP CURSER ONE LINE IF AT LINE 24
C*****
        IF( NY .NE. 24 ) GO TO 140
        LINEOUT(IOUT+1) = ESCAPE
        LINEOUT(IOUT+2) = 'M'
        IOUT = IOUT + 2
C*****
C  NOW READY TO OUTPUT THE STRING.
C*****
  140 RC = LIB$PUT_OUTPUT( CC(1:IOUT) )
        RETURN
        END
        FUNCTION IRAN( SEED, I, J )
C*****
C  RETURNS A RANDOM NUMBER IN THE RANGE OF I THRU J.
C  SEED IS UPDATED AND THUS A VARIABLE MUST BE SENT.
C*****
        REAL MTH$RANDOM
        FN = J - I + 1
        IRAN = I + IFIX( FN * MTH$RANDOM(SEED) )
        RETURN
        END
 
        SUBROUTINE MAZRUN(EXIT,MAT,HEIGHT,WIDTH,DEPTH)
C
C       MAZRUN USES THE EXIT ARRAY TO CONTROL MAZE MOVEMENT
C                       MAT  ARRAY CONTAINS WHERE YOU HAVE BEEN
C
        IMPLICIT INTEGER*4 (A-Z)
C
        INTEGER*2 EXIT(HEIGHT,WIDTH,DEPTH)
        INTEGER*2 MAT (HEIGHT,WIDTH,DEPTH), ADD, MOVE(4,4)
C
        DIMENSION XDIR(4), YDIR(4), OUT(6), SLEEP(2)
C
        BYTE START(28),BELL,DEAD,LR132(10)
        BYTE SET(16)
        BYTE SCROL(8)
C
        CHARACTER*200 INPUT
        CHARACTER*10  NAME
        CHARACTER*6   PORT
C
        COMMON /MAZECM/ STARTH,STARTW,STARTD,ENDH,ENDW,ENDD,NOBELL
C
        DATA XDIR / 0, 1, 0,-1 /
        DATA YDIR / 1, 0,-1, 0 /
        DATA OUT  / 1, 2, 4, 8, 16, 32 /
        DATA BELL / 7 /
C
C       ESCAPE SEQUENCES TO
C       ANSI MODE, ERASE SCREEN, ATTRIBUTES OFF, SCREEN NORMAL,
C       WRAP OFF, 80 COL., AND SPECIAL GRAPHICS
C
        DATA START/ 27,'<',27,'[','2','J',27,'[','0','m',27,'[','?',
     1    '5','l',27,'[','?','7','l',  27,'[','?','3','l',27,'(','0'/
C
C       GRAPHICS CHARACTERS TO USE FOR DRAWING LINES
C
        DATA SET/' ', ' ', 'l', ' ', 'k', 'q', 'w', ' ',
     1     'x', 'm', 't', 'j', 'u', 'v', 'n', 97 /
C
C       ESCAPE SEQUENCE TO SET 132 CHARACTER LINE MODE
C
        DATA LR132 / 27,'[','?','3','h' , 27,'[','?','5','h' /
C
C       SET SCROLLING REGION TO LAST TWO LINES (23-24)
C
        DATA SCROL / 27,'[','2','3',';','2','4','r' /
        DATA DEAD / 97 /
        DATA MOVE / 9, 5,-1, 3
        1        ,10, 6, 3,-1
        2        ,-1,12, 9,10
        3        ,12,-1, 5, 6 /
C
C       SET UP FOR QIO FROM TERMINAL
C
        STATUS = SYS$TRNLOG( 'SYS$INPUT' ,, NAME ,,, )
        PORT = NAME( 5:10 )
        STATUS = SYS$ASSIGN( PORT, CHAN ,, )
        IF( STATUS.NE.1 ) RETURN
        READ = 49
        NOECHO = 64
        CVLOW = 256
C
C       CLEAR SCREEN AND SHOW START AND END OF MAZE
C
        CALL MAZOUT( START(1), 28, 1, 1,1, 0,0,0)
        IF(WIDTH.GT.80) CALL MAZOUT(LR132,10,1,1,1,0,0,0)
        CALL MAZOUT(SCROL,8,1,23,1,0,0,0)
        LOOP = 0
        SOVER = 0
C
C       BORDER
C
   10   CONTINUE
        Y = STARTH
        X = STARTW
        L = STARTD
   20   CONTINUE
        CALL MAZOUT(START(3),4,1,1,1,0,0,0)
        DO 40 I=1,HEIGHT
        CALL MAZOUT(' ',1,1, I,1     ,0,1,0)
        CALL MAZOUT(' ',1,1, I,WIDTH,0,1,0)
        IF(I.NE.1.AND.I.NE.HEIGHT) GO TO 40
        DO 30 J=2,WIDTH-1
        CALL MAZOUT(' ',1,1, I,J     ,0,1,0)
   30   CONTINUE
   40   CONTINUE
C
C       SHOW CURRENT STATUS OF MAZE SOLUTION
C
        DO 50 J=1,WIDTH
        DO 50 I=1,HEIGHT
        IF(IAND(EXIT(I,J,L),16).NE.0) CALL MAZOUT('O',1,1,I,J,1,1,1)
        IF(MAT(I,J,L).EQ.0) GO TO 50
        IF(MAT(I,J,L).GT.0.AND.MAT(I,J,L).LT.16)
        1 CALL MAZOUT(SET(MAT(I,J,L)),1,1,I,J,1,1,0)
        IF(MAT(I,J,L).LT.0) CALL MAZOUT('~',1,1,I,J,1,1,0)
        IF(MAT(I,J,L).EQ.64) CALL MAZOUT(SET(16),1,1,I,J,1,1,0)
        IF(MAT(I,J,L).GT.15.AND.MAT(I,J,L).LT.32)
        1 CALL MAZOUT('O',1,1,I,J,1,1,0)
        IF(MAT(I,J,L).GT.31.AND.MAT(I,J,L).LT.64)
        1 CALL MAZOUT('O',1,1,I,J,1,1,1)
   50   CONTINUE
        IF(LOOP.NE.0) CALL MAZOUT('O',1,1,Y,X,0,1,0)
        IF(L.EQ.ENDD) CALL MAZOUT( 'E',1,1,ENDH,ENDW,1,1,1)
        IF(L.EQ.STARTD) CALL MAZOUT( 'S',1,1,STARTH,STARTW,1,1,1)
        HOMEH = Y
        HOMEW = X
   60   DEADE = 0
        ODIR = 0
C
C       READ INPUT AND MOVE AS REQUESTED
C
        ESC = 0
        OPT =  READ + NOECHO + CVLOW
   70   CALL MAZOUT(' ',1,1,24,1,0,0,0)
C
        STATUS = SYS$QIOW( , %VAL(CHAN), %VAL(OPT),,,,
        1       %VAL(%LOC(INPUT)), %VAL(1),,,, )
        IF( STATUS .NE. 1 ) RETURN
C
   80   FORMAT(Q,A)
        IF( ESC .EQ. 1 ) GO TO 140
        IF(ICHAR(INPUT(1:1)) .EQ. 27 ) GO TO 130
        IF(INPUT(1:1) .EQ.'Q') RETURN
        IF(INPUT(1:1) .EQ.'B') GO TO 90
        IF(INPUT(1:1) .EQ.'M') GO TO 100
        IF(INPUT(1:1) .EQ.'C' ) GO TO 110
        IF(INPUT(1:1).NE.'H') GO TO 160
        IF(Y.EQ.HOMEH.AND.X.EQ.HOMEW) GO TO 60
        SOVER=1
        ADD = -1
        GO TO 220
   90   NOBELL = 0
        GO TO 70
  100   NOBELL = 1
        GO TO 70
  110   WRITE(6,120) L
  120   FORMAT( ' CURRENT LEVEL IS ',I2)
        GO TO 70
  130   ESC = 1
        GO TO 70
  140   IF(INPUT(1:1) .EQ. '[' ) GO TO 70
        GO TO 170
  150   SOVER = 0
        Y = HOMEH
        X = HOMEW
        GO TO 60
C
C       FIND DIRECTION TO GO
C
  160   DIR = 0
        IF(ICHAR(INPUT(1:1)).EQ.27) GO TO 170
        IF(INPUT(1:1).EQ.'S'.OR.INPUT(1:1).EQ.'D') DIR=1
        IF(INPUT(1:1).EQ.'E'.OR.INPUT(1:1).EQ.'R') DIR=2
        IF(INPUT(1:1).EQ.'N'.OR.INPUT(1:1).EQ.'U') DIR=3
        IF(INPUT(1:1).EQ.'W'.OR.INPUT(1:1).EQ.'L') DIR=4
        IF(INPUT(1:1).EQ.'2') DIR=1
        IF(INPUT(1:1).EQ.'6') DIR=2
        IF(INPUT(1:1).EQ.'8') DIR=3
        IF(INPUT(1:1).EQ.'4') DIR=4
        IF(INPUT(1:1).EQ.'I'.OR.INPUT(1:1).EQ.'9') DIR=5
        IF(INPUT(1:1).EQ.'O'.OR.INPUT(1:1).EQ.'7') DIR=6
        GO TO 180
C
C       CHECK ARROW KEYS ( DID NOT HAVE TIME TO MAKE THIS WORK )
C
  170   IF(INPUT(1:1).EQ.'A') DIR=3
        IF(INPUT(1:1).EQ.'B') DIR=1
        IF(INPUT(1:1).EQ.'C') DIR=2
        IF(INPUT(1:1).EQ.'D') DIR=4
        ESC = 0
  180   IF(DIR.NE.0) GO TO 200
C
C       COMMAND NOT RECOGNIZED
C
        WRITE(6,190)
  190   FORMAT(' TRY AGAIN ')
        GO TO 70
C
C       SEE IF DIRECTION IS LEGAL
C
  200   IF( IAND(EXIT(Y,X,L),OUT(DIR)) .NE. 0 ) GO TO 210
        IF(NOBELL .NE. 0 ) GO TO 70
        CALL MAZOUT( BELL ,1,1, 24,1, 0,0,0 )
        GO TO 70
C
C       MOVE KEEP MOVEMENT ARRAY MAT UP TO DATE
C
  210   IF(Y.EQ.STARTH.AND.X.EQ.STARTW.AND.L.EQ.STARTD) GO TO 230
        IF(DEADE.EQ.1) GO TO 230
        ADD = OUT(DIR)
        IF(ODIR.NE.0.AND.DIR.LT.5) ADD = MOVE(ODIR,DIR)
        IF(ODIR.EQ.0) ADD = 0
  220   IF(MAT(Y,X,L).EQ.-1) MAT(Y,X,L) = 0
        IF(ADD.EQ.-1 .AND. MAT(Y,X,L).EQ.0 ) MAT(Y,X,L) = ADD
        IF(ADD.NE.-1) MAT(Y,X,L) = IOR(MAT(Y,X,L),ADD)
        IF(MAT(Y,X,L).GT.0.AND.MAT(Y,X,L).LT.16)
        1 CALL MAZOUT(SET(MAT(Y,X,L)),1,1,Y,X,1,1,0)
        IF(MAT(Y,X,L).LT.0) CALL MAZOUT( '~' ,1,1,Y,X,1,1,0)
  230   IF(SOVER.EQ.1) GO TO 150
        IF( DIR.LT.5 ) GO TO 240
C
C       CHANGE LEVELS
C
        IF( DIR.EQ.5 ) L = L+1
        IF( DIR.EQ.6 ) L = L-1
        MAT(Y,X,L) = OUT(DIR)
        LOOP = LOOP + 1
        GO TO 20
  240   Y = Y + YDIR(DIR)
        X = X + XDIR(DIR)
        IF(Y.EQ.STARTH.AND.X.EQ.STARTW.AND.L.EQ.STARTD) GO TO 70
        IF(MAT(Y,X,L).LT.16) CALL MAZOUT('{',1,1,Y,X,0,1,1)
        DEADE = 0
        ODIR = DIR
        IF(Y.EQ.ENDH.AND.X.EQ.ENDW.AND.L.EQ.ENDD) GO TO 270
C
C       CHECK FOR DEAD END
C
        DO 250 I=1,6
        IF( EXIT(Y,X,L) .EQ. OUT(I) ) GO TO 260
  250   CONTINUE
        GO TO 70
C
C       DEAD END
C
  260   CALL MAZOUT(DEAD,1,1,Y,X,0,0,0)
        MAT(Y,X,L) = 64
        DEADE = 1
        GO TO 70
  270   CONTINUE
C
C       SUCCESS - END FOUND
C
        DO 290 I=1,6
        J=MOD(I,2)
        CALL MAZOUT('E',1,1,ENDH,ENDW,1,J,1)
        CALL MAZOUT(' ',1,1,24,1,0,J,1)
        WRITE(6,280)
  280   FORMAT(' SUCCESS SUCCESS SUCCESS' )
        CALL SYS$BINTIM( '0 ::00.50', SLEEP )
        CALL SYS$SCHDWK( , , SLEEP , )
        CALL SYS$HIBER
  290   CONTINUE
        RETURN
        END
 
        SUBROUTINE MAZSOL(EXIT,MAT,HEIGHT,WIDTH,DEPTH)
C
C       MAZSOL SHOWS ALL POSSIABLE PATHS IN MAZE
C
        IMPLICIT INTEGER*4 (A-Z)
C
        INTEGER*2 EXIT(HEIGHT,WIDTH,DEPTH)
        INTEGER*2 MAT (HEIGHT,WIDTH,DEPTH), ADD, MOVE(4,4)
        DIMENSION XDIR(4), YDIR(4), OUT(4), SLEEP(2)
C
        BYTE START(28),BELL,DEAD,LR132(10)
        BYTE SET(16)
        BYTE SCROL(8)
C
        CHARACTER*200 INPUT
C
        COMMON /MAZECM/ STARTH,STARTW,STARTD,ENDH,ENDW,ENDD,NOBELL
C
        DATA XDIR / 0, 1, 0,-1 /
        DATA YDIR / 1, 0,-1, 0 /
        DATA OUT  / 1, 2, 4, 8 /
        DATA BELL / 7 /
        DATA START/ 27,'<',27,'[','2','J',27,'[','0','m',27,'[','?',
     1    '5','l',27,'[','?','7','l',  27,'[','?','3','l',27,'(','0'/
        DATA SET/' ', ' ', 'l', ' ', 'k', 'q', 'w', ' ',
     1     'x', 'm', 't', 'j', 'u', 'v', 'n', 97 /
        DATA LR132 / 27,'[','?','3','h' , 27,'[','?','5','h' /
        DATA SCROL / 27,'[','2','3',';','2','4','r' /
        DATA DEAD / 97 /
        DATA MOVE / 0, 3, 9, 5
        1        , 3, 0,10, 6
        2        , 9,10, 0,12
        3        , 5, 6,12, 0 /
C
C       CLEAR SCREEN AND SHOW START AND END OF MAZE
C
        CALL MAZOUT( START(1), 28, 1, 1,1, 0,0,0)
        IF(WIDTH.GT.80) CALL MAZOUT(LR132,10,1,1,1,0,0,0)
        CALL MAZOUT(SCROL,8,1,23,1,0,0,0)
C
C       BORDER
C
        DO 70 L = 1,DEPTH
        IF(L.EQ.ENDD) CALL MAZOUT( 'E',1,1,ENDH,ENDW,1,1,1)
        IF(L.EQ.STARTD) CALL MAZOUT( 'S',1,1,STARTH,STARTW,1,1,1)
C
C       LOOP OVER MAZE
C
        DO 40 X=1,WIDTH
        DO 40 Y=1,HEIGHT
        MAT(Y,X,L) = 0
        IF(Y.EQ.STARTH.AND.X.EQ.STARTW.AND.L.EQ.STARTD) GO TO 40
        IF(Y.EQ.ENDH  .AND.X.EQ.ENDW  .AND.L.EQ.ENDD) GO TO 40
C
C       CHECK FOR DEAD END
C
        DO 20 ODIR=1,4
        IF( EXIT(Y,X,L) .EQ. OUT(ODIR) ) GO TO 30
        IF( IAND(EXIT(Y,X,L),OUT(ODIR)) .EQ. 0 ) GO TO 20
        DO 10 DIR=1,4
        IF(DIR.EQ.ODIR) GO TO 10
        IF( IAND(EXIT(Y,X,L),OUT(DIR)) .EQ. 0 ) GO TO 10
        ADD = MOVE(ODIR,DIR)
        MAT(Y,X,L) = IOR(MAT(Y,X,L),ADD)
   10   CONTINUE
   20   CONTINUE
        IF(EXIT(Y,X,L).LT.16) CALL MAZOUT(SET(MAT(Y,X,L)),1,1,Y,X,1,1,0)
        IF(IAND(EXIT(Y,X,L),16).NE.0) CALL MAZOUT('O',1,1,Y,X,1,1,1)
        IF(IAND(EXIT(Y,X,L),32).NE.0) CALL MAZOUT('O',1,1,Y,X,1,1,0)
        GO TO 40
C
C       DEAD END
C
   30   CALL MAZOUT(DEAD,1,1,Y,X,0,0,0)
   40   CONTINUE
C
C       SUCCESS - END FOUND
C
        CALL MAZOUT(' ',1,1,24,1,0,0,0)
        WRITE(6,50)
   50   FORMAT('  PRESS RETURN TO CONTINUE OR FINISH')
        READ(5,60) NC,INPUT
   60   FORMAT(Q,A)
   70   CONTINUE
        RETURN
        END

The pre-processed version has the comments converted and the continuation lines appended:

//
//      MAZE -  USES A VT100 TO WANDER AROUND.
//              THE VT100 MUST HAVE ADVANCED VIDEO OPTION.
//              ANSI VT100 ESCAPE SEQUENCES ARE USED.
//
//      WRITTEN BY DON MCLEAN
//      OF THE MACNEAL-SCHWENDLER CORP.
//
//      THE PURPOSE OF THIS PROGRAM WAS TO
//              1. LEARN SOMETHING ABOUT THE VT100 GRAPHICS.
//              2. KEEP MY KIDS BUSY ON WEEKENDS. WHILE I TRIED
//                 TO GET SOMETHING ELSE DONE.
//
//      USE OF THIS PROGRAM FOR ANY PURPOSE OTHER THAN FUN
//      IS PROHIBITED.
//
        IMPLICIT INTEGER*4 (A-Z)
//
//      MAZE DIMENSIONS
//      HMAX AND WMAX SHOULD NOT BE LARGER THAN 22 AND 80 RESP.
//
        PARAMETER HMAX=22, WMAX=80, DMAX=4
//
        DIMENSION SLEEP(2)
//
//      DIMENSION IS HMAX*WMAX*DMAX
        INTEGER*2  EXIT(HMAX*WMAX*DMAX), MAT(HMAX*WMAX*DMAX)
        INTEGER*2  LCOUNT(DMAX)
//
        BYTE CLEAR(2)
//
        CHARACTER*200 INPUT
//
        COMMON /MAZECM/ STARTH,STARTW,STARTD,ENDH,ENDW,ENDD,NOBELL
//
//      CLEAR IS A VT100 RESET
//
        DATA CLEAR / 27, 'c' /
//
//      START - SEE IF AN OLD GAME IS TO BE USED.
//
        WRITE(6,10)
   10   FORMAT(' WELCOME TO MAZE')
//
   20   WRITE(6,30)
   30   FORMAT(' ARE YOU GOING TO PLAY A SAVED GAME? ',$)
        READ(5,40) NC,INPUT
   40   FORMAT(Q,A)
        IF(INDEX(INPUT(1:NC),'Y').NE.0) GO TO 120
        SAVE = 0
//
//      INPUT DIMENSION OF MAZE
//
   50   WRITE(6,60) HMAX
   60   FORMAT(' PLEASE INPUT HEIGHT OF MAZE - DEFAULT = ',I2,' ',$)
        READ(5,40) NC,INPUT
        READ(INPUT,70,ERR=50) HEIGHT
   70   FORMAT(BNI2)
        IF(HEIGHT.EQ.0) HEIGHT=HMAX
        IF(HEIGHT.LT.2) HEIGHT=2
        IF(HEIGHT.GT.HMAX) HEIGHT=HMAX
   80   WRITE(6,90) WMAX
   90   FORMAT(' PLEASE INPUT WIDTH  OF MAZE - DEFAULT = ',I2,' ',$)
        READ(5,40) NC,INPUT
        READ(INPUT,70,ERR=80) WIDTH
        IF(WIDTH.EQ.0) WIDTH = WMAX
        IF(WIDTH.LT.2) WIDTH=2
        IF(WIDTH.GT.WMAX) WIDTH=WMAX
  100   WRITE(6,110)
  110   FORMAT(' PLEASE INPUT DEPTH  OF MAZE - DEFAULT =  1 ',$)
        READ(5,40) NC,INPUT
        READ(INPUT,70,ERR=100) DEPTH
        IF(DEPTH.LE.0) DEPTH = 1
        IF(DEPTH.GT.DMAX) DEPTH = DMAX
        NTERMS = HEIGHT * WIDTH * DEPTH
//
//      GENERATE MAZE
//
        CALL MAZGEN(EXIT,LCOUNT,HEIGHT,WIDTH,DEPTH)
        GO TO 180
//
//      READ IN OLD MAZE
//
  120   WRITE(6,130)
  130   FORMAT(' INPUT SAVED FILE NAME ',$)
        READ(5,40) NC,INPUT
        OPEN(UNIT=7,NAME=INPUT(1:NC),STATUS='OLD',ERR=140,FORM='UNFORMATTED',READONLY)
        GO TO 160
//
  140   WRITE(6,150)
  150   FORMAT(' SAVE FILE NOT FOUND')
        GO TO 20
  160   READ(UNIT=7) HEIGHT,WIDTH,DEPTH,STARTH,STARTW,STARTD,ENDH,ENDW,ENDD
        NTERMS = HEIGHT * WIDTH * DEPTH
        READ(UNIT=7) (EXIT(I),I=1,NTERMS)
        READ(UNIT=7) (MAT (I),I=1,NTERMS)
        CLOSE(UNIT=7)
//
        WRITE(6,170)
  170   FORMAT( ' DO YOU WANT THE PATHS RESTORED? ',$)
        READ(5,40) NC,INPUT
        IF(INDEX(INPUT(1:NC),'Y').NE.0) SAVE=1
//      SPECIAL CASE TO PRINT ALL PATHS
        IF(INDEX(INPUT(1:NC),'YES SOLUTIONS').NE.0) GO TO 240
//
//      MAZE DESCRIPTION
//
  180   WRITE(6,190) HEIGHT,WIDTH,DEPTH
  190   FORMAT('0',' YOUR MAZE HAS A HEIGHT OF',I5,/,'             AND A WIDTH OF',I5,/,'            WITH A DEPTH OF',I5,//,'  THE DIRECTION COMMANDS FOR MAZE ARE SINGLE LETTERS',/,'    N(ORTH), U(P),    OR 8 IS UP',/,'    E(AST) , R(IGHT), OR 6 IS RIGHT',/,'    S(OUTH), D(OWN),  OR 2 IS DOWN',/,'    W(EST) , L(EFT),  OR 4 IS LEFT',/,'    I(N)   ,          OR 9 IS IN TO SCREEN',/,'    O(UT)  ,          OR 7 IS OUT OF SCREEN',/,'  OR YOU CAN USE THE ARROW KEYS FOR DIRECTIONS',/,'  THE COMMAND H(OME)    RETURNS YOUR POSITION TO "S" OR "O"',/,'  THE COMMAND Q(UIT)    ENDS THE GAME',/,'  THE COMMAND B(ELL)    MAKES THE TERMINAL BEEP (DEFAULT)',/,'  THE COMMAND M(UTE)    TURNS OFF TERMINAL BEEPING',/,'  THE COMMAND C(URRENT) PRINTS THE CURRENT LEVEL',/,'  AFTER A Q(UIT) COMMAND YOU GET A CHANCE TO SAVE THE GAME',/,'  YOU CAN MOVE ALONG BORDERS',//,'  PRESS RETURN TO START')
        READ(5,40) NC,INPUT
        NOBELL = 0
        IF(INPUT(1:6).EQ.'NOBELL') OFFBEL = 1
//
//      EXECUTE THE MAZE
//
        IF(SAVE.EQ.1) GO TO 210
        DO 200 I=1,NTERMS
  200   MAT(I)=0
//
  210   CALL MAZRUN(EXIT,MAT,HEIGHT,WIDTH,DEPTH)
//
//      SAVE THE MAZE ON REQUEST
//
        WRITE(6,220)
  220   FORMAT(' DO YOU WANT TO SAVE THIS MAZE? ',$)
        READ(5,40) NC,INPUT
//
        IF(INDEX(INPUT(1:NC),'Y') .EQ.0) GO TO 260
        WRITE(6,230)
  230   FORMAT(' PLEASE INPUT FILE NAME ',$)
        READ(5,40) NC,INPUT
        OPEN(UNIT=7,NAME=INPUT(1:NC),STATUS='NEW',FORM='UNFORMATTED')
        WRITE(UNIT=7) HEIGHT,WIDTH,DEPTH,STARTH,STARTW,STARTD,ENDH,ENDW,ENDD
        WRITE(UNIT=7) (EXIT(I),I=1,NTERMS)
        WRITE(UNIT=7) (MAT (I),I=1,NTERMS)
        CLOSE(UNIT=7)
        GO TO 260
//
//      PRINT THE SOLUTION TO A MAZE
//
  240   WRITE(6,250) HEIGHT,WIDTH,DEPTH
  250   FORMAT('0',' YOUR MAZE HAS A HEIGHT OF',I5,/,'             AND A WIDTH OF',I5,/,'            WITH A DEPTH OF',I5,//,'  PRESS RETURN TO START')
        READ(5,40) NC,INPUT
//
//      PRINT MAZE
//
        CALL MAZSOL(EXIT,MAT,HEIGHT,WIDTH,DEPTH)
//
//      CLEAR SCREEN AND WAIT 2 SECONDS
//
  260   CALL MAZOUT(CLEAR,2,1,24,1,0,0,0)
        CALL SYS$BINTIM( '0 ::02.00', SLEEP )
        CALL SYS$SCHDWK( , , SLEEP , )
        CALL SYS$HIBER
        STOP 'BYE FROM MAZE'
        END
 
        SUBROUTINE MAZGEN (  EXIT, LCOUNT, HEIGHT, WIDTH, DEPTH )
//
//      MAZGEN CREATES A MAZE IN EXIT
//
//      MAZE IS CREATED BY GOING FROM A START LOCATION IN A
//      RANDOM WALK
//      SQUARES MAY ONLY BE ENTERED ONCE BUT CAN HAVE MULTIPLE EXITS
//
//      MOVEMENT CONVENTION IS
//              1 - SOUTH OR DOWN
//              2 - EAST  OR RIGHT
//              4 - NORTH OR UP
//              8 - WEST  OR LEFT
//             16 - IN  A LEVEL
//             32 - OUT A LEVEL
//
        IMPLICIT INTEGER*4 (A-Z)
//
        INTEGER*2  EXIT(HEIGHT,WIDTH,DEPTH), LCOUNT(DEPTH)
//
        DIMENSION XDIR(4), YDIR(4), IN(4), OUT(4)
//
        REAL  SEED
//
        COMMON /MAZECM/ STARTH,STARTW,STARTD,ENDH,ENDW,ENDD,NOBELL
//
        DATA XDIR / 0, 1, 0,-1 /
        DATA YDIR / 1, 0,-1, 0 /
        DATA IN   / 4, 8, 1, 2 /
        DATA OUT  / 1, 2, 4, 8 /
//
//      INITIALIZE AND PICK START AND END POSITIONS
//
        SEED = FOR$SECNDS(0)
        H = HEIGHT
        W = WIDTH
        D = DEPTH
        NENTER = 1
        LMAX = H * W
        NMAX = LMAX * D
        DO 10 L=1,D
        LCOUNT(L) = 0
        DO 10 J=1,W
        DO 10 I=1,H
   10   EXIT (I,J,L) = 0
//
        STARTH = IRAN(SEED,1,H)
        STARTW = IRAN(SEED,1,W)
        STARTD = 1
   20   ENDH   = IRAN(SEED,1,H)
        ENDW   = IRAN(SEED,1,W)
        ENDD   = D
        IF(STARTH.EQ.ENDH.AND.STARTW.EQ.ENDW.AND.STARTD.EQ.ENDD)GO TO 20
        SY = STARTH
        SX = STARTW
        SD = STARTD
        LCOUNT(SD) = 1
//
//      START FILLING IN MAZE
//
   30   ODIR = 0
        Y = SY
        X = SX
        L = SD
   40   DIR = IRAN(SEED,1,4)
//      DO NOT GO BACK ON YOURSELF
        IF( ODIR .EQ. OUT(DIR) ) GO TO 40
//
//      TEND TO MAKE LONGER LINES WITH NLOOPS
//
        NLOOPS = IRAN(SEED,1,DIR)
        NCOUNT=0
   50   NY = YDIR(DIR) + Y
        NX = XDIR(DIR) + X
        IF(NY.LT.1.OR.NY.GT.H) GO TO 40
        IF(NX.LT.1.OR.NX.GT.W) GO TO 40
        IF( EXIT(NY,NX,L) .EQ. 0 ) GO TO 80
//
//      CHECK FOR DEAD END
//
        DO 60 I=1,4
        TY = Y + YDIR(I)
        TX = X + XDIR(I)
        IF(TY.LT.1.OR.TY.GT.H) GO TO 60
        IF(TX.LT.1.OR.TX.GT.W) GO TO 60
//      NOT DEAD END TRY AGAIN
        IF( EXIT(TY,TX,L) .NE. 0 ) GO TO 60
        GO TO 40
   60   CONTINUE
//
//      DEAD END RETURN TO START UNLESS ALL DIRECTIONS ARE TAKEN
//
        IF( Y.EQ.SY .AND. X.EQ. SX ) GO TO 70
        GO TO 30
//
//      ALL STARTS FROM THIS STARTING POSITION ARE TAKEN
//      PICK A NEW STARTING POSITIONS UNTIL MAZE IS FULL
//
   70   SY = IRAN(SEED,1,H)
        SX = IRAN(SEED,1,W)
        IF( EXIT(SY,SX,L) .EQ. 0 ) GO TO 70
        IF( SY.EQ.STARTH.AND.SX.EQ.STARTW.AND.L.EQ.STARTD) GO TO 70
        IF( SY.EQ.ENDH  .AND.SX.EQ.ENDW  .AND.L.EQ.ENDD) GO TO 70
        IF( SY.EQ.Y     .AND.SX.EQ.X   ) GO TO 70
//
//      FILL IN A LAYER AT A TIME
//
        IF(LCOUNT(L).NE.LMAX) GO TO 30
        SD = SD + 1
        EXIT(SY,SX, L) = IOR(EXIT(SY,SX, L),16)
        EXIT(SY,SX,SD) = IOR(EXIT(SY,SX,SD),32)
        NENTER = NENTER + 1
        LCOUNT(SD) = 1
        GO TO 30
//
//      DIRECTION TO GO FOUND
//      SET POSITION AS HAVING BEEN ENTERED AND
//      SET EXIT ARRAY TO DIRECTIONS INVOLVED
//
   80   ODIR = IN(DIR)
        EXIT(Y,X,L)   = IOR(EXIT(Y,X,L),OUT(DIR))
        EXIT(NY,NX,L) = IOR(EXIT(NY,NX,L),IN(DIR))
        NENTER = NENTER + 1
        LCOUNT(L) = LCOUNT(L)+1
//      THE WAY OUT - ALL POINTS USED
        IF( NENTER .EQ. NMAX ) GO TO 90
        Y = NY
        X = NX
//
//      ONLY ALLOW THE END LOCATION TO BE ENTERED ONCE
//
        IF(Y.EQ.ENDH.AND.X.EQ.ENDW.AND.L.EQ.ENDD) GO TO 30
        NCOUNT=NCOUNT+1
        IF(NCOUNT.LT.NLOOPS) GO TO 50
        GO TO 40
//
//      OUT
//
   90   CONTINUE
        RETURN
        END
 
        SUBROUTINE MAZOUT( STRING, L, XOFF, Y, X, BOLD, REVERS, BLINK )
//*****
//  OUTPUTS -STRING- OF LENGTH -L- BYTES WITH BYTE NUMBER -XOFF-
//  OF STRING LOCATED AT CURSER LOCATION -X-, -Y-.
//
//  BOLD, REVERS, BLINK ARE THE MODES TO OUTPUT THIS STRING
//*****
        IMPLICIT INTEGER*2 (A-Z)
//
        LOGICAL ANY
//
        CHARACTER*300 CC
//
        BYTE STRING(L), LINEOUT(300), CHAR(10), ESCAPE
//
        DATA CHAR/ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' /
        DATA ESCAPE/ 27 /, C1,C2,C3 / 0,0,0/
//
        EQUIVALENCE(CC,LINEOUT(1))
//
        NL     = X - XOFF + 1
        NR     = NL + L - 1
        LENGTH = L
        ISTART = 1
        NX     = X
        NY     = Y
//
//  READJUST STRING LIMITS TO BE WITHIN SCREEN.  IF STRING IS
//  COMPLETELY OUT OF SCREEN, THEN RETURN DOING NOTHING.
//
        IF( NY.LT.1 .OR. NY.GT.24 ) RETURN
        IF( NR.LT.1 .OR. NL.GT.132 ) RETURN
//
//  STRING (ALL OR PART) LIES IN THE SCREEN AREA.
//
        IF( NL .GE. 1 ) GO TO 10
        ISTART = 2 - NL
        NL     = 1
        LENGTH = LENGTH - ISTART + 1
//
   10 IF( NR .LE. 132 ) GO TO 20
        LENGTH = LENGTH - (NR-132)
        NR = 132
//
//  OK AT THIS POINT WE ARE GOING TO OUTPUT STRING(ISTART) THRU
//  STRING(ISTART+LENGTH-1) STARTING AT SCREEN LOCAT SCREEN ION (NL,NY)
//
// 20  LINEOUT(1) = ' '
   20 LINEOUT(1) = ESCAPE
        LINEOUT(2) = '['
        IOUT = 2
        COORD = NY
        DO 40 I = 1,2
        ANY = .FALSE.
        DO 30 J = 1,3
        N = MOD( COORD/10**(3-J), 10 )
        IF( N.EQ.0 .AND. .NOT.ANY ) GO TO 30
        ANY = .TRUE.
        IOUT = IOUT + 1
        LINEOUT(IOUT) = CHAR(N+1)
   30 CONTINUE
        IOUT = IOUT + 1
        LINEOUT(IOUT) = ';'
        COORD = NL
   40 CONTINUE
        LINEOUT(IOUT) = 'H'
//
//  CHECK MODES AGAINST CURRENT MODES AND OUTPUT APPROPRIATE
//  MODE INDICATORS.
//
        IF( C1.NE.0 .AND.   BOLD.EQ.0 ) GO TO 80
        IF( C2.NE.0 .AND. REVERS.EQ.0 ) GO TO 80
        IF( C3.NE.0 .AND.  BLINK.EQ.0 ) GO TO 80
        IF( C1.EQ.BOLD .AND. C2.EQ.REVERS .AND. C3.EQ.BLINK )GO TO 120
//
//  OK SIMPLY ADD OUTPUT MODES
//
        LINEOUT(IOUT+1) = ESCAPE
        LINEOUT(IOUT+2) = '['
        IOUT = IOUT + 2
//
        IF( C1.EQ.BOLD   ) GO TO 50
        LINEOUT(IOUT+1) = '1'
        LINEOUT(IOUT+2) = ';'
        IOUT = IOUT + 2
        C1   = BOLD
//
   50 IF( C2 .EQ. REVERS ) GO TO 60
        LINEOUT(IOUT+1) = '7'
        LINEOUT(IOUT+2) = ';'
        IOUT = IOUT + 2
        C2 = REVERS
//
   60 IF( C3 .EQ. BLINK ) GO TO 70
        LINEOUT(IOUT+1) = '5'
        LINEOUT(IOUT+2) = ';'
        IOUT = IOUT + 2
        C3 = BLINK
//
   70 LINEOUT(IOUT) = 'm'
        GO TO 120
//
//  SOME OR ALL OF CURRENT MODES ARE NOT DESIRED, THUS
//  MUST DO A NORMAL FOLLOWED BY A RESET OF MODES DESIRED.
//
   80 LINEOUT(IOUT+1) = ESCAPE
        LINEOUT(IOUT+2) = '['
        LINEOUT(IOUT+3) = '0'
        LINEOUT(IOUT+4) = ';'
        IOUT = IOUT + 4
//
        IF( BOLD .EQ. 0 ) GO TO 90
        LINEOUT(IOUT+1) = '1'
        LINEOUT(IOUT+2) = ';'
        IOUT = IOUT + 2
//
   90 C1 = BOLD
        IF( REVERS .EQ. 0 ) GO TO 100
        LINEOUT(IOUT+1) = '7'
        LINEOUT(IOUT+2) = ';'
        IOUT = IOUT + 2
//
  100 C2 = REVERS
        IF( BLINK .EQ. 0 ) GO TO 110
        LINEOUT(IOUT+1) = '5'
        LINEOUT(IOUT+2) = ';'
        IOUT = IOUT + 2
//
  110 C3 = BLINK
        LINEOUT(IOUT) = 'm'
//*****
//  OUTPUT THE STRING WITH ITS LEADER
//*****
  120 DO 130 I = 1,LENGTH
        LINEOUT(IOUT+I) = STRING(ISTART+I-1)
  130 CONTINUE
        IOUT = IOUT + LENGTH
//*****
//  BACK UP CURSER ONE LINE IF AT LINE 24
//*****
        IF( NY .NE. 24 ) GO TO 140
        LINEOUT(IOUT+1) = ESCAPE
        LINEOUT(IOUT+2) = 'M'
        IOUT = IOUT + 2
//*****
//  NOW READY TO OUTPUT THE STRING.
//*****
  140 RC = LIB$PUT_OUTPUT( CC(1:IOUT) )
        RETURN
        END
        FUNCTION IRAN( SEED, I, J )
//*****
//  RETURNS A RANDOM NUMBER IN THE RANGE OF I THRU J.
//  SEED IS UPDATED AND THUS A VARIABLE MUST BE SENT.
//*****
        REAL MTH$RANDOM
        FN = J - I + 1
        IRAN = I + IFIX( FN * MTH$RANDOM(SEED) )
        RETURN
        END
 
        SUBROUTINE MAZRUN(EXIT,MAT,HEIGHT,WIDTH,DEPTH)
//
//      MAZRUN USES THE EXIT ARRAY TO CONTROL MAZE MOVEMENT
//                      MAT  ARRAY CONTAINS WHERE YOU HAVE BEEN
//
        IMPLICIT INTEGER*4 (A-Z)
//
        INTEGER*2 EXIT(HEIGHT,WIDTH,DEPTH)
        INTEGER*2 MAT (HEIGHT,WIDTH,DEPTH), ADD, MOVE(4,4)
//
        DIMENSION XDIR(4), YDIR(4), OUT(6), SLEEP(2)
//
        BYTE START(28),BELL,DEAD,LR132(10)
        BYTE SET(16)
        BYTE SCROL(8)
//
        CHARACTER*200 INPUT
        CHARACTER*10  NAME
        CHARACTER*6   PORT
//
        COMMON /MAZECM/ STARTH,STARTW,STARTD,ENDH,ENDW,ENDD,NOBELL
//
        DATA XDIR / 0, 1, 0,-1 /
        DATA YDIR / 1, 0,-1, 0 /
        DATA OUT  / 1, 2, 4, 8, 16, 32 /
        DATA BELL / 7 /
//
//      ESCAPE SEQUENCES TO
//      ANSI MODE, ERASE SCREEN, ATTRIBUTES OFF, SCREEN NORMAL,
//      WRAP OFF, 80 COL., AND SPECIAL GRAPHICS
//
        DATA START/ 27,'<',27,'[','2','J',27,'[','0','m',27,'[','?','5','l',27,'[','?','7','l',  27,'[','?','3','l',27,'(','0'/
//
//      GRAPHICS CHARACTERS TO USE FOR DRAWING LINES
//
        DATA SET/' ', ' ', 'l', ' ', 'k', 'q', 'w', ' ','x', 'm', 't', 'j', 'u', 'v', 'n', 97 /
//
//      ESCAPE SEQUENCE TO SET 132 CHARACTER LINE MODE
//
        DATA LR132 / 27,'[','?','3','h' , 27,'[','?','5','h' /
//
//      SET SCROLLING REGION TO LAST TWO LINES (23-24)
//
        DATA SCROL / 27,'[','2','3',';','2','4','r' /
        DATA DEAD / 97 /
        DATA MOVE / 9, 5,-1, 3,10, 6, 3,-1,-1,12, 9,10,12,-1, 5, 6 /
//
//      SET UP FOR QIO FROM TERMINAL
//
        STATUS = SYS$TRNLOG( 'SYS$INPUT' ,, NAME ,,, )
        PORT = NAME( 5:10 )
        STATUS = SYS$ASSIGN( PORT, CHAN ,, )
        IF( STATUS.NE.1 ) RETURN
        READ = 49
        NOECHO = 64
        CVLOW = 256
//
//      CLEAR SCREEN AND SHOW START AND END OF MAZE
//
        CALL MAZOUT( START(1), 28, 1, 1,1, 0,0,0)
        IF(WIDTH.GT.80) CALL MAZOUT(LR132,10,1,1,1,0,0,0)
        CALL MAZOUT(SCROL,8,1,23,1,0,0,0)
        LOOP = 0
        SOVER = 0
//
//      BORDER
//
   10   CONTINUE
        Y = STARTH
        X = STARTW
        L = STARTD
   20   CONTINUE
        CALL MAZOUT(START(3),4,1,1,1,0,0,0)
        DO 40 I=1,HEIGHT
        CALL MAZOUT(' ',1,1, I,1     ,0,1,0)
        CALL MAZOUT(' ',1,1, I,WIDTH,0,1,0)
        IF(I.NE.1.AND.I.NE.HEIGHT) GO TO 40
        DO 30 J=2,WIDTH-1
        CALL MAZOUT(' ',1,1, I,J     ,0,1,0)
   30   CONTINUE
   40   CONTINUE
//
//      SHOW CURRENT STATUS OF MAZE SOLUTION
//
        DO 50 J=1,WIDTH
        DO 50 I=1,HEIGHT
        IF(IAND(EXIT(I,J,L),16).NE.0) CALL MAZOUT('O',1,1,I,J,1,1,1)
        IF(MAT(I,J,L).EQ.0) GO TO 50
        IF(MAT(I,J,L).GT.0.AND.MAT(I,J,L).LT.16)CALL MAZOUT(SET(MAT(I,J,L)),1,1,I,J,1,1,0)
        IF(MAT(I,J,L).LT.0) CALL MAZOUT('~',1,1,I,J,1,1,0)
        IF(MAT(I,J,L).EQ.64) CALL MAZOUT(SET(16),1,1,I,J,1,1,0)
        IF(MAT(I,J,L).GT.15.AND.MAT(I,J,L).LT.32)CALL MAZOUT('O',1,1,I,J,1,1,0)
        IF(MAT(I,J,L).GT.31.AND.MAT(I,J,L).LT.64)CALL MAZOUT('O',1,1,I,J,1,1,1)
   50   CONTINUE
        IF(LOOP.NE.0) CALL MAZOUT('O',1,1,Y,X,0,1,0)
        IF(L.EQ.ENDD) CALL MAZOUT( 'E',1,1,ENDH,ENDW,1,1,1)
        IF(L.EQ.STARTD) CALL MAZOUT( 'S',1,1,STARTH,STARTW,1,1,1)
        HOMEH = Y
        HOMEW = X
   60   DEADE = 0
        ODIR = 0
//
//      READ INPUT AND MOVE AS REQUESTED
//
        ESC = 0
        OPT =  READ + NOECHO + CVLOW
   70   CALL MAZOUT(' ',1,1,24,1,0,0,0)
//
        STATUS = SYS$QIOW( , %VAL(CHAN), %VAL(OPT),,,,%VAL(%LOC(INPUT)), %VAL(1),,,, )
        IF( STATUS .NE. 1 ) RETURN
//
   80   FORMAT(Q,A)
        IF( ESC .EQ. 1 ) GO TO 140
        IF(ICHAR(INPUT(1:1)) .EQ. 27 ) GO TO 130
        IF(INPUT(1:1) .EQ.'Q') RETURN
        IF(INPUT(1:1) .EQ.'B') GO TO 90
        IF(INPUT(1:1) .EQ.'M') GO TO 100
        IF(INPUT(1:1) .EQ.'C' ) GO TO 110
        IF(INPUT(1:1).NE.'H') GO TO 160
        IF(Y.EQ.HOMEH.AND.X.EQ.HOMEW) GO TO 60
        SOVER=1
        ADD = -1
        GO TO 220
   90   NOBELL = 0
        GO TO 70
  100   NOBELL = 1
        GO TO 70
  110   WRITE(6,120) L
  120   FORMAT( ' CURRENT LEVEL IS ',I2)
        GO TO 70
  130   ESC = 1
        GO TO 70
  140   IF(INPUT(1:1) .EQ. '[' ) GO TO 70
        GO TO 170
  150   SOVER = 0
        Y = HOMEH
        X = HOMEW
        GO TO 60
//
//      FIND DIRECTION TO GO
//
  160   DIR = 0
        IF(ICHAR(INPUT(1:1)).EQ.27) GO TO 170
        IF(INPUT(1:1).EQ.'S'.OR.INPUT(1:1).EQ.'D') DIR=1
        IF(INPUT(1:1).EQ.'E'.OR.INPUT(1:1).EQ.'R') DIR=2
        IF(INPUT(1:1).EQ.'N'.OR.INPUT(1:1).EQ.'U') DIR=3
        IF(INPUT(1:1).EQ.'W'.OR.INPUT(1:1).EQ.'L') DIR=4
        IF(INPUT(1:1).EQ.'2') DIR=1
        IF(INPUT(1:1).EQ.'6') DIR=2
        IF(INPUT(1:1).EQ.'8') DIR=3
        IF(INPUT(1:1).EQ.'4') DIR=4
        IF(INPUT(1:1).EQ.'I'.OR.INPUT(1:1).EQ.'9') DIR=5
        IF(INPUT(1:1).EQ.'O'.OR.INPUT(1:1).EQ.'7') DIR=6
        GO TO 180
//
//      CHECK ARROW KEYS ( DID NOT HAVE TIME TO MAKE THIS WORK )
//
  170   IF(INPUT(1:1).EQ.'A') DIR=3
        IF(INPUT(1:1).EQ.'B') DIR=1
        IF(INPUT(1:1).EQ.'C') DIR=2
        IF(INPUT(1:1).EQ.'D') DIR=4
        ESC = 0
  180   IF(DIR.NE.0) GO TO 200
//
//      COMMAND NOT RECOGNIZED
//
        WRITE(6,190)
  190   FORMAT(' TRY AGAIN ')
        GO TO 70
//
//      SEE IF DIRECTION IS LEGAL
//
  200   IF( IAND(EXIT(Y,X,L),OUT(DIR)) .NE. 0 ) GO TO 210
        IF(NOBELL .NE. 0 ) GO TO 70
        CALL MAZOUT( BELL ,1,1, 24,1, 0,0,0 )
        GO TO 70
//
//      MOVE KEEP MOVEMENT ARRAY MAT UP TO DATE
//
  210   IF(Y.EQ.STARTH.AND.X.EQ.STARTW.AND.L.EQ.STARTD) GO TO 230
        IF(DEADE.EQ.1) GO TO 230
        ADD = OUT(DIR)
        IF(ODIR.NE.0.AND.DIR.LT.5) ADD = MOVE(ODIR,DIR)
        IF(ODIR.EQ.0) ADD = 0
  220   IF(MAT(Y,X,L).EQ.-1) MAT(Y,X,L) = 0
        IF(ADD.EQ.-1 .AND. MAT(Y,X,L).EQ.0 ) MAT(Y,X,L) = ADD
        IF(ADD.NE.-1) MAT(Y,X,L) = IOR(MAT(Y,X,L),ADD)
        IF(MAT(Y,X,L).GT.0.AND.MAT(Y,X,L).LT.16)CALL MAZOUT(SET(MAT(Y,X,L)),1,1,Y,X,1,1,0)
        IF(MAT(Y,X,L).LT.0) CALL MAZOUT( '~' ,1,1,Y,X,1,1,0)
  230   IF(SOVER.EQ.1) GO TO 150
        IF( DIR.LT.5 ) GO TO 240
//
//      CHANGE LEVELS
//
        IF( DIR.EQ.5 ) L = L+1
        IF( DIR.EQ.6 ) L = L-1
        MAT(Y,X,L) = OUT(DIR)
        LOOP = LOOP + 1
        GO TO 20
  240   Y = Y + YDIR(DIR)
        X = X + XDIR(DIR)
        IF(Y.EQ.STARTH.AND.X.EQ.STARTW.AND.L.EQ.STARTD) GO TO 70
        IF(MAT(Y,X,L).LT.16) CALL MAZOUT('{',1,1,Y,X,0,1,1)
        DEADE = 0
        ODIR = DIR
        IF(Y.EQ.ENDH.AND.X.EQ.ENDW.AND.L.EQ.ENDD) GO TO 270
//
//      CHECK FOR DEAD END
//
        DO 250 I=1,6
        IF( EXIT(Y,X,L) .EQ. OUT(I) ) GO TO 260
  250   CONTINUE
        GO TO 70
//
//      DEAD END
//
  260   CALL MAZOUT(DEAD,1,1,Y,X,0,0,0)
        MAT(Y,X,L) = 64
        DEADE = 1
        GO TO 70
  270   CONTINUE
//
//      SUCCESS - END FOUND
//
        DO 290 I=1,6
        J=MOD(I,2)
        CALL MAZOUT('E',1,1,ENDH,ENDW,1,J,1)
        CALL MAZOUT(' ',1,1,24,1,0,J,1)
        WRITE(6,280)
  280   FORMAT(' SUCCESS SUCCESS SUCCESS' )
        CALL SYS$BINTIM( '0 ::00.50', SLEEP )
        CALL SYS$SCHDWK( , , SLEEP , )
        CALL SYS$HIBER
  290   CONTINUE
        RETURN
        END
 
        SUBROUTINE MAZSOL(EXIT,MAT,HEIGHT,WIDTH,DEPTH)
//
//      MAZSOL SHOWS ALL POSSIABLE PATHS IN MAZE
//
        IMPLICIT INTEGER*4 (A-Z)
//
        INTEGER*2 EXIT(HEIGHT,WIDTH,DEPTH)
        INTEGER*2 MAT (HEIGHT,WIDTH,DEPTH), ADD, MOVE(4,4)
        DIMENSION XDIR(4), YDIR(4), OUT(4), SLEEP(2)
//
        BYTE START(28),BELL,DEAD,LR132(10)
        BYTE SET(16)
        BYTE SCROL(8)
//
        CHARACTER*200 INPUT
//
        COMMON /MAZECM/ STARTH,STARTW,STARTD,ENDH,ENDW,ENDD,NOBELL
//
        DATA XDIR / 0, 1, 0,-1 /
        DATA YDIR / 1, 0,-1, 0 /
        DATA OUT  / 1, 2, 4, 8 /
        DATA BELL / 7 /
        DATA START/ 27,'<',27,'[','2','J',27,'[','0','m',27,'[','?','5','l',27,'[','?','7','l',  27,'[','?','3','l',27,'(','0'/
        DATA SET/' ', ' ', 'l', ' ', 'k', 'q', 'w', ' ','x', 'm', 't', 'j', 'u', 'v', 'n', 97 /
        DATA LR132 / 27,'[','?','3','h' , 27,'[','?','5','h' /
        DATA SCROL / 27,'[','2','3',';','2','4','r' /
        DATA DEAD / 97 /
        DATA MOVE / 0, 3, 9, 5, 3, 0,10, 6, 9,10, 0,12, 5, 6,12, 0 /
//
//      CLEAR SCREEN AND SHOW START AND END OF MAZE
//
        CALL MAZOUT( START(1), 28, 1, 1,1, 0,0,0)
        IF(WIDTH.GT.80) CALL MAZOUT(LR132,10,1,1,1,0,0,0)
        CALL MAZOUT(SCROL,8,1,23,1,0,0,0)
//
//      BORDER
//
        DO 70 L = 1,DEPTH
        IF(L.EQ.ENDD) CALL MAZOUT( 'E',1,1,ENDH,ENDW,1,1,1)
        IF(L.EQ.STARTD) CALL MAZOUT( 'S',1,1,STARTH,STARTW,1,1,1)
//
//      LOOP OVER MAZE
//
        DO 40 X=1,WIDTH
        DO 40 Y=1,HEIGHT
        MAT(Y,X,L) = 0
        IF(Y.EQ.STARTH.AND.X.EQ.STARTW.AND.L.EQ.STARTD) GO TO 40
        IF(Y.EQ.ENDH  .AND.X.EQ.ENDW  .AND.L.EQ.ENDD) GO TO 40
//
//      CHECK FOR DEAD END
//
        DO 20 ODIR=1,4
        IF( EXIT(Y,X,L) .EQ. OUT(ODIR) ) GO TO 30
        IF( IAND(EXIT(Y,X,L),OUT(ODIR)) .EQ. 0 ) GO TO 20
        DO 10 DIR=1,4
        IF(DIR.EQ.ODIR) GO TO 10
        IF( IAND(EXIT(Y,X,L),OUT(DIR)) .EQ. 0 ) GO TO 10
        ADD = MOVE(ODIR,DIR)
        MAT(Y,X,L) = IOR(MAT(Y,X,L),ADD)
   10   CONTINUE
   20   CONTINUE
        IF(EXIT(Y,X,L).LT.16) CALL MAZOUT(SET(MAT(Y,X,L)),1,1,Y,X,1,1,0)
        IF(IAND(EXIT(Y,X,L),16).NE.0) CALL MAZOUT('O',1,1,Y,X,1,1,1)
        IF(IAND(EXIT(Y,X,L),32).NE.0) CALL MAZOUT('O',1,1,Y,X,1,1,0)
        GO TO 40
//
//      DEAD END
//
   30   CALL MAZOUT(DEAD,1,1,Y,X,0,0,0)
   40   CONTINUE
//
//      SUCCESS - END FOUND
//
        CALL MAZOUT(' ',1,1,24,1,0,0,0)
        WRITE(6,50)
   50   FORMAT('  PRESS RETURN TO CONTINUE OR FINISH')
        READ(5,60) NC,INPUT
   60   FORMAT(Q,A)
   70   CONTINUE
        RETURN
        END

And the output shows how the tokens are consumed:

--(end of buffer or a NUL)
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        MAZE -  USES A VT100 TO WANDER AROUND.
")
--accepting rule at line 86 ("//                THE VT100 MUST HAVE ADVANCED VIDEO OPTION.
")
--accepting rule at line 86 ("//                ANSI VT100 ESCAPE SEQUENCES ARE USED.
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        WRITTEN BY DON MCLEAN
")
--accepting rule at line 86 ("//        OF THE MACNEAL-SCHWENDLER CORP.
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        THE PURPOSE OF THIS PROGRAM WAS TO
")
--accepting rule at line 86 ("//                1. LEARN SOMETHING ABOUT THE VT100 GRAPHICS.
")
--accepting rule at line 86 ("//                2. KEEP MY KIDS BUSY ON WEEKENDS. WHILE I TRIED
")
--accepting rule at line 86 ("//                   TO GET SOMETHING ELSE DONE.
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        USE OF THIS PROGRAM FOR ANY PURPOSE OTHER THAN FUN
")
--accepting rule at line 86 ("//        IS PROHIBITED.
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 73 ("IMPLICIT")
--accepting rule at line 91 (" ")
--accepting rule at line 74 ("INTEGER")
--accepting rule at line 38 ("*")
--accepting rule at line 90 ("4")
--accepting rule at line 91 (" ")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("A")
--accepting rule at line 36 ("-")
--accepting rule at line 87 ("Z")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        MAZE DIMENSIONS
")
--accepting rule at line 86 ("//        HMAX AND WMAX SHOULD NOT BE LARGER THAN 22 AND 80 RESP.
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 77 ("PARAMETER")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("HMAX")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("22")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("WMAX")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("80")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("DMAX")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("4")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 64 ("DIMENSION")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("SLEEP")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("2")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        DIMENSION IS HMAX*WMAX*DMAX
")
--accepting rule at line 91 ("  ")
--accepting rule at line 74 ("INTEGER")
--accepting rule at line 38 ("*")
--accepting rule at line 90 ("2")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("EXIT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("HMAX")
--accepting rule at line 38 ("*")
--accepting rule at line 87 ("WMAX")
--accepting rule at line 38 ("*")
--accepting rule at line 87 ("DMAX")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("HMAX")
--accepting rule at line 38 ("*")
--accepting rule at line 87 ("WMAX")
--accepting rule at line 38 ("*")
--accepting rule at line 87 ("DMAX")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 74 ("INTEGER")
--accepting rule at line 38 ("*")
--accepting rule at line 90 ("2")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("LCOUNT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("DMAX")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 57 ("BYTE")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("CLEAR")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("2")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 59 ("CHARACTER")
--accepting rule at line 38 ("*")
--accepting rule at line 90 ("200")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("INPUT")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 61 ("COMMON")
--accepting rule at line 91 (" ")
--accepting rule at line 42 ("/")
--accepting rule at line 87 ("MAZECM")
--accepting rule at line 42 ("/")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("STARTH")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("STARTW")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("STARTD")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("ENDH")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("ENDW")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("ENDD")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("NOBELL")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        CLEAR IS A VT100 RESET
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 63 ("DATA")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("CLEAR")
--accepting rule at line 91 (" ")
--accepting rule at line 42 ("/")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("27")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 88 ("'c'")
--accepting rule at line 91 (" ")
--accepting rule at line 42 ("/")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        START - SEE IF AN OLD GAME IS TO BE USED.
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 84 ("WRITE")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("6")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("10")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("   ")
--accepting rule at line 90 ("10")
--accepting rule at line 91 ("   ")
--accepting rule at line 69 ("FORMAT")
--accepting rule at line 35 ("(")
--accepting rule at line 88 ("' WELCOME TO MAZE'")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("   ")
--accepting rule at line 90 ("20")
--accepting rule at line 91 ("   ")
--accepting rule at line 84 ("WRITE")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("6")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("30")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("   ")
--accepting rule at line 90 ("30")
--accepting rule at line 91 ("   ")
--accepting rule at line 69 ("FORMAT")
--accepting rule at line 35 ("(")
--accepting rule at line 88 ("' ARE YOU GOING TO PLAY A SAVED GAME? '")
--accepting rule at line 39 (",")
--accepting rule at line 43 ("$")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 78 ("READ")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("5")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("40")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("NC")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("INPUT")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("   ")
--accepting rule at line 90 ("40")
--accepting rule at line 91 ("   ")
--accepting rule at line 69 ("FORMAT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("Q")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("A")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("INDEX")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("INPUT")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("1")
--accepting rule at line 53 (":")
--accepting rule at line 87 ("NC")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 88 ("'Y'")
--accepting rule at line 37 (")")
--accepting rule at line 47 (".NE.")
--accepting rule at line 90 ("0")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("120")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("SAVE")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        INPUT DIMENSION OF MAZE
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("   ")
--accepting rule at line 90 ("50")
--accepting rule at line 91 ("   ")
--accepting rule at line 84 ("WRITE")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("6")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("60")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("HMAX")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("   ")
--accepting rule at line 90 ("60")
--accepting rule at line 91 ("   ")
--accepting rule at line 69 ("FORMAT")
--accepting rule at line 35 ("(")
--accepting rule at line 88 ("' PLEASE INPUT HEIGHT OF MAZE - DEFAULT = ',I2,' '")
--accepting rule at line 39 (",")
--accepting rule at line 43 ("$")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 78 ("READ")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("5")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("40")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("NC")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("INPUT")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 78 ("READ")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("INPUT")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("70")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("ERR")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("50")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("HEIGHT")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("   ")
--accepting rule at line 90 ("70")
--accepting rule at line 91 ("   ")
--accepting rule at line 69 ("FORMAT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("BNI2")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("HEIGHT")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 90 ("0")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("HEIGHT")
--accepting rule at line 40 ("=")
--accepting rule at line 87 ("HMAX")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("HEIGHT")
--accepting rule at line 48 (".LT.")
--accepting rule at line 90 ("2")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("HEIGHT")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("2")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("HEIGHT")
--accepting rule at line 49 (".GT.")
--accepting rule at line 87 ("HMAX")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("HEIGHT")
--accepting rule at line 40 ("=")
--accepting rule at line 87 ("HMAX")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("   ")
--accepting rule at line 90 ("80")
--accepting rule at line 91 ("   ")
--accepting rule at line 84 ("WRITE")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("6")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("90")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("WMAX")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("   ")
--accepting rule at line 90 ("90")
--accepting rule at line 91 ("   ")
--accepting rule at line 69 ("FORMAT")
--accepting rule at line 35 ("(")
--accepting rule at line 88 ("' PLEASE INPUT WIDTH  OF MAZE - DEFAULT = ',I2,' '")
--accepting rule at line 39 (",")
--accepting rule at line 43 ("$")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 78 ("READ")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("5")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("40")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("NC")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("INPUT")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 78 ("READ")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("INPUT")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("70")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("ERR")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("80")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("WIDTH")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("WIDTH")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 90 ("0")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("WIDTH")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("WMAX")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("WIDTH")
--accepting rule at line 48 (".LT.")
--accepting rule at line 90 ("2")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("WIDTH")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("2")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("WIDTH")
--accepting rule at line 49 (".GT.")
--accepting rule at line 87 ("WMAX")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("WIDTH")
--accepting rule at line 40 ("=")
--accepting rule at line 87 ("WMAX")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 90 ("100")
--accepting rule at line 91 ("   ")
--accepting rule at line 84 ("WRITE")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("6")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("110")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 90 ("110")
--accepting rule at line 91 ("   ")
--accepting rule at line 69 ("FORMAT")
--accepting rule at line 35 ("(")
--accepting rule at line 88 ("' PLEASE INPUT DEPTH  OF MAZE - DEFAULT =  1 '")
--accepting rule at line 39 (",")
--accepting rule at line 43 ("$")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 78 ("READ")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("5")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("40")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("NC")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("INPUT")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 78 ("READ")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("INPUT")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("70")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("ERR")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("100")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("DEPTH")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("DEPTH")
--accepting rule at line 50 (".LE.")
--accepting rule at line 90 ("0")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("DEPTH")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("1")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("DEPTH")
--accepting rule at line 49 (".GT.")
--accepting rule at line 87 ("DMAX")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("DEPTH")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("DMAX")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("NTERMS")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("HEIGHT")
--accepting rule at line 91 (" ")
--accepting rule at line 38 ("*")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("WIDTH")
--accepting rule at line 91 (" ")
--accepting rule at line 38 ("*")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("DEPTH")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        GENERATE MAZE
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 58 ("CALL")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAZGEN")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("EXIT")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("LCOUNT")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("HEIGHT")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("WIDTH")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("DEPTH")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("180")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        READ IN OLD MAZE
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 90 ("120")
--accepting rule at line 91 ("   ")
--accepting rule at line 84 ("WRITE")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("6")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("130")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 90 ("130")
--accepting rule at line 91 ("   ")
--accepting rule at line 69 ("FORMAT")
--accepting rule at line 35 ("(")
--accepting rule at line 88 ("' INPUT SAVED FILE NAME '")
--accepting rule at line 39 (",")
--accepting rule at line 43 ("$")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 78 ("READ")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("5")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("40")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("NC")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("INPUT")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 76 ("OPEN")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("UNIT")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("7")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("NAME")
--accepting rule at line 40 ("=")
--accepting rule at line 87 ("INPUT")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("1")
--accepting rule at line 53 (":")
--accepting rule at line 87 ("NC")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("STATUS")
--accepting rule at line 40 ("=")
--accepting rule at line 88 ("'OLD',ERR=140,FORM='UNFORMATTED'")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("READONLY")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("160")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 90 ("140")
--accepting rule at line 91 ("   ")
--accepting rule at line 84 ("WRITE")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("6")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("150")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 90 ("150")
--accepting rule at line 91 ("   ")
--accepting rule at line 69 ("FORMAT")
--accepting rule at line 35 ("(")
--accepting rule at line 88 ("' SAVE FILE NOT FOUND'")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("20")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 90 ("160")
--accepting rule at line 91 ("   ")
--accepting rule at line 78 ("READ")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("UNIT")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("7")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("HEIGHT")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("WIDTH")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("DEPTH")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("STARTH")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("STARTW")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("STARTD")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("ENDH")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("ENDW")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("ENDD")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("NTERMS")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("HEIGHT")
--accepting rule at line 91 (" ")
--accepting rule at line 38 ("*")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("WIDTH")
--accepting rule at line 91 (" ")
--accepting rule at line 38 ("*")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("DEPTH")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 78 ("READ")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("UNIT")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("7")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("EXIT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("I")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("I")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("NTERMS")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 78 ("READ")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("UNIT")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("7")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("MAT")
--accepting rule at line 91 (" ")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("I")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("I")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("NTERMS")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 60 ("CLOSE")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("UNIT")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("7")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 84 ("WRITE")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("6")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("170")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 90 ("170")
--accepting rule at line 91 ("   ")
--accepting rule at line 69 ("FORMAT")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 88 ("' DO YOU WANT THE PATHS RESTORED? '")
--accepting rule at line 39 (",")
--accepting rule at line 43 ("$")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 78 ("READ")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("5")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("40")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("NC")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("INPUT")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("INDEX")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("INPUT")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("1")
--accepting rule at line 53 (":")
--accepting rule at line 87 ("NC")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 88 ("'Y'")
--accepting rule at line 37 (")")
--accepting rule at line 47 (".NE.")
--accepting rule at line 90 ("0")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("SAVE")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("1")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//        SPECIAL CASE TO PRINT ALL PATHS
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("INDEX")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("INPUT")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("1")
--accepting rule at line 53 (":")
--accepting rule at line 87 ("NC")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 88 ("'YES SOLUTIONS'")
--accepting rule at line 37 (")")
--accepting rule at line 47 (".NE.")
--accepting rule at line 90 ("0")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("240")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        MAZE DESCRIPTION
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 90 ("180")
--accepting rule at line 91 ("   ")
--accepting rule at line 84 ("WRITE")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("6")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("190")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("HEIGHT")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("WIDTH")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("DEPTH")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 90 ("190")
--accepting rule at line 91 ("   ")
--accepting rule at line 69 ("FORMAT")
--accepting rule at line 35 ("(")
--accepting rule at line 88 ("'0',' YOUR MAZE HAS A HEIGHT OF',I5,/,'             AND A WIDTH OF',I5,/,'            WITH A DEPTH OF',I5,//,'  THE DIRECTION COMMANDS FOR MAZE ARE SINGLE LETTERS',/,'    N(ORTH), U(P),    OR 8 IS UP',/,'    E(AST) , R(IGHT), OR 6 IS RIGHT',/,'    S(OUTH), D(OWN),  OR 2 IS DOWN',/,'    W(EST) , L(EFT),  OR 4 IS LEFT',/,'    I(N)   ,          OR 9 IS IN TO SCREEN',/,'    O(UT)  ,          OR 7 IS OUT OF SCREEN',/,'  OR YOU CAN USE THE ARROW KEYS FOR DIRECTIONS',/,'  THE COMMAND H(OME)    RETURNS YOUR POSITION TO "S" OR "O"',/,'  THE COMMAND Q(UIT)    ENDS THE GAME',/,'  THE COMMAND B(ELL)    MAKES THE TERMINAL BEEP (DEFAULT)',/,'  THE COMMAND M(UTE)    TURNS OFF TERMINAL BEEPING',/,'  THE COMMAND C(URRENT) PRINTS THE CURRENT LEVEL',/,'  AFTER A Q(UIT) COMMAND YOU GET A CHANCE TO SAVE THE GAME',/,'  YOU CAN MOVE ALONG BORDERS',//,'  PRESS RETURN TO START'")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 78 ("READ")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("5")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("40")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("NC")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("INPUT")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("NOBELL")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("INPUT")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("1")
--accepting rule at line 53 (":")
--accepting rule at line 90 ("6")
--accepting rule at line 37 (")")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 88 ("'NOBELL'")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("OFFBEL")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("1")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        EXECUTE THE MAZE
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("SAVE")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("210")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 65 ("DO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("200")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("I")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("NTERMS")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 90 ("200")
--accepting rule at line 91 ("   ")
--accepting rule at line 87 ("MAT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("I")
--accepting rule at line 37 (")")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("0")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 90 ("210")
--accepting rule at line 91 ("   ")
--accepting rule at line 58 ("CALL")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAZRUN")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("EXIT")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("MAT")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("HEIGHT")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("WIDTH")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("DEPTH")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        SAVE THE MAZE ON REQUEST
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 84 ("WRITE")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("6")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("220")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 90 ("220")
--accepting rule at line 91 ("   ")
--accepting rule at line 69 ("FORMAT")
--accepting rule at line 35 ("(")
--accepting rule at line 88 ("' DO YOU WANT TO SAVE THIS MAZE? '")
--accepting rule at line 39 (",")
--accepting rule at line 43 ("$")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 78 ("READ")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("5")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("40")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("NC")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("INPUT")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("INDEX")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("INPUT")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("1")
--accepting rule at line 53 (":")
--accepting rule at line 87 ("NC")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 88 ("'Y'")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 90 ("0")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("260")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 84 ("WRITE")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("6")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("230")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 90 ("230")
--accepting rule at line 91 ("   ")
--accepting rule at line 69 ("FORMAT")
--accepting rule at line 35 ("(")
--accepting rule at line 88 ("' PLEASE INPUT FILE NAME '")
--accepting rule at line 39 (",")
--accepting rule at line 43 ("$")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 78 ("READ")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("5")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("40")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("NC")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("INPUT")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 76 ("OPEN")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("UNIT")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("7")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("NAME")
--accepting rule at line 40 ("=")
--accepting rule at line 87 ("INPUT")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("1")
--accepting rule at line 53 (":")
--accepting rule at line 87 ("NC")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("STATUS")
--accepting rule at line 40 ("=")
--accepting rule at line 88 ("'NEW',FORM='UNFORMATTED'")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 84 ("WRITE")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("UNIT")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("7")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("HEIGHT")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("WIDTH")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("DEPTH")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("STARTH")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("STARTW")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("STARTD")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("ENDH")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("ENDW")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("ENDD")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 84 ("WRITE")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("UNIT")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("7")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("EXIT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("I")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("I")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("NTERMS")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 84 ("WRITE")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("UNIT")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("7")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("MAT")
--accepting rule at line 91 (" ")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("I")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("I")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("NTERMS")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 60 ("CLOSE")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("UNIT")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("7")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("260")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        PRINT THE SOLUTION TO A MAZE
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 90 ("240")
--accepting rule at line 91 ("   ")
--accepting rule at line 84 ("WRITE")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("6")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("250")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("HEIGHT")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("WIDTH")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("DEPTH")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 90 ("250")
--accepting rule at line 91 ("   ")
--accepting rule at line 69 ("FORMAT")
--accepting rule at line 35 ("(")
--accepting rule at line 88 ("'0',' YOUR MAZE HAS A HEIGHT OF',I5,/,'             AND A WIDTH OF',I5,/,'            WITH A DEPTH OF',I5,//,'  PRESS RETURN TO START'")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 78 ("READ")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("5")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("40")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("NC")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("INPUT")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        PRINT MAZE
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 58 ("CALL")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAZSOL")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("EXIT")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("MAT")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("HEIGHT")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("WIDTH")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("DEPTH")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        CLEAR SCREEN AND WAIT 2 SECONDS
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 90 ("260")
--accepting rule at line 91 ("   ")
--accepting rule at line 58 ("CALL")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAZOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("CLEAR")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("2")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("24")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 58 ("CALL")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("SYS$BINTIM")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 88 ("'0 ::02.00'")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("SLEEP")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 58 ("CALL")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("SYS$SCHDWK")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("SLEEP")
--accepting rule at line 91 (" ")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 58 ("CALL")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("SYS$HIBER")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 81 ("STOP")
--accepting rule at line 91 (" ")
--accepting rule at line 88 ("'BYE FROM MAZE'")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 67 ("END")
--accepting rule at line 34 ("
")
--accepting rule at line 91 (" ")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 82 ("SUBROUTINE")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAZGEN")
--accepting rule at line 91 (" ")
--accepting rule at line 35 ("(")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("EXIT")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("LCOUNT")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("HEIGHT")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("WIDTH")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("DEPTH")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        MAZGEN CREATES A MAZE IN EXIT
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        MAZE IS CREATED BY GOING FROM A START LOCATION IN A
")
--accepting rule at line 86 ("//        RANDOM WALK
")
--accepting rule at line 86 ("//        SQUARES MAY ONLY BE ENTERED ONCE BUT CAN HAVE MULTIPLE EXITS
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        MOVEMENT CONVENTION IS
")
--accepting rule at line 86 ("//                1 - SOUTH OR DOWN
")
--accepting rule at line 86 ("//                2 - EAST  OR RIGHT
")
--accepting rule at line 86 ("//                4 - NORTH OR UP
")
--accepting rule at line 86 ("//                8 - WEST  OR LEFT
")
--accepting rule at line 86 ("//               16 - IN  A LEVEL
")
--accepting rule at line 86 ("//               32 - OUT A LEVEL
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 73 ("IMPLICIT")
--accepting rule at line 91 (" ")
--accepting rule at line 74 ("INTEGER")
--accepting rule at line 38 ("*")
--accepting rule at line 90 ("4")
--accepting rule at line 91 (" ")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("A")
--accepting rule at line 36 ("-")
--accepting rule at line 87 ("Z")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 74 ("INTEGER")
--accepting rule at line 38 ("*")
--accepting rule at line 90 ("2")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("EXIT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("HEIGHT")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("WIDTH")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("DEPTH")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("LCOUNT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("DEPTH")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 64 ("DIMENSION")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("XDIR")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("4")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("YDIR")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("4")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("IN")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("4")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("OUT")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("4")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 79 ("REAL")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("SEED")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 61 ("COMMON")
--accepting rule at line 91 (" ")
--accepting rule at line 42 ("/")
--accepting rule at line 87 ("MAZECM")
--accepting rule at line 42 ("/")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("STARTH")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("STARTW")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("STARTD")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("ENDH")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("ENDW")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("ENDD")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("NOBELL")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 63 ("DATA")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("XDIR")
--accepting rule at line 91 (" ")
--accepting rule at line 42 ("/")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 39 (",")
--accepting rule at line 36 ("-")
--accepting rule at line 90 ("1")
--accepting rule at line 91 (" ")
--accepting rule at line 42 ("/")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 63 ("DATA")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("YDIR")
--accepting rule at line 91 (" ")
--accepting rule at line 42 ("/")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 39 (",")
--accepting rule at line 36 ("-")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 91 (" ")
--accepting rule at line 42 ("/")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 63 ("DATA")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("IN")
--accepting rule at line 91 ("   ")
--accepting rule at line 42 ("/")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("4")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("8")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("2")
--accepting rule at line 91 (" ")
--accepting rule at line 42 ("/")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 63 ("DATA")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("OUT")
--accepting rule at line 91 ("  ")
--accepting rule at line 42 ("/")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("2")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("4")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("8")
--accepting rule at line 91 (" ")
--accepting rule at line 42 ("/")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        INITIALIZE AND PICK START AND END POSITIONS
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("SEED")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("FOR$SECNDS")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("0")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("H")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("HEIGHT")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("W")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("WIDTH")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("D")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("DEPTH")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("NENTER")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("1")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("LMAX")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("H")
--accepting rule at line 91 (" ")
--accepting rule at line 38 ("*")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("W")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("NMAX")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("LMAX")
--accepting rule at line 91 (" ")
--accepting rule at line 38 ("*")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("D")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 65 ("DO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("10")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("L")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("D")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("LCOUNT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 65 ("DO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("10")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("J")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("W")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 65 ("DO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("10")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("I")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("H")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("   ")
--accepting rule at line 90 ("10")
--accepting rule at line 91 ("   ")
--accepting rule at line 87 ("EXIT")
--accepting rule at line 91 (" ")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("I")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("J")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("STARTH")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("IRAN")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("SEED")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("H")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("STARTW")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("IRAN")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("SEED")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("W")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("STARTD")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("1")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("   ")
--accepting rule at line 90 ("20")
--accepting rule at line 91 ("   ")
--accepting rule at line 87 ("ENDH")
--accepting rule at line 91 ("   ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("IRAN")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("SEED")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("H")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("ENDW")
--accepting rule at line 91 ("   ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("IRAN")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("SEED")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("W")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("ENDD")
--accepting rule at line 91 ("   ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("D")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("STARTH")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 87 ("ENDH")
--accepting rule at line 45 (".AND.")
--accepting rule at line 87 ("STARTW")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 87 ("ENDW")
--accepting rule at line 45 (".AND.")
--accepting rule at line 87 ("STARTD")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 87 ("ENDD")
--accepting rule at line 37 (")")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("20")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("SY")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("STARTH")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("SX")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("STARTW")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("SD")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("STARTD")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("LCOUNT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("SD")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("1")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        START FILLING IN MAZE
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("   ")
--accepting rule at line 90 ("30")
--accepting rule at line 91 ("   ")
--accepting rule at line 87 ("ODIR")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("Y")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("SY")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("X")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("SX")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("L")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("SD")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("   ")
--accepting rule at line 90 ("40")
--accepting rule at line 91 ("   ")
--accepting rule at line 87 ("DIR")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("IRAN")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("SEED")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("4")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//        DO NOT GO BACK ON YOURSELF
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("ODIR")
--accepting rule at line 91 (" ")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("OUT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("DIR")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("40")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        TEND TO MAKE LONGER LINES WITH NLOOPS
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("NLOOPS")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("IRAN")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("SEED")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("DIR")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("NCOUNT")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("0")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("   ")
--accepting rule at line 90 ("50")
--accepting rule at line 91 ("   ")
--accepting rule at line 87 ("NY")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("YDIR")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("DIR")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 41 ("+")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("Y")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("NX")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("XDIR")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("DIR")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 41 ("+")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("X")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("NY")
--accepting rule at line 48 (".LT.")
--accepting rule at line 90 ("1")
--accepting rule at line 44 (".OR.")
--accepting rule at line 87 ("NY")
--accepting rule at line 49 (".GT.")
--accepting rule at line 87 ("H")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("40")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("NX")
--accepting rule at line 48 (".LT.")
--accepting rule at line 90 ("1")
--accepting rule at line 44 (".OR.")
--accepting rule at line 87 ("NX")
--accepting rule at line 49 (".GT.")
--accepting rule at line 87 ("W")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("40")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("EXIT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("NY")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("NX")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("80")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        CHECK FOR DEAD END
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 65 ("DO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("60")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("I")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("4")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("TY")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("Y")
--accepting rule at line 91 (" ")
--accepting rule at line 41 ("+")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("YDIR")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("I")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("TX")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("X")
--accepting rule at line 91 (" ")
--accepting rule at line 41 ("+")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("XDIR")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("I")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("TY")
--accepting rule at line 48 (".LT.")
--accepting rule at line 90 ("1")
--accepting rule at line 44 (".OR.")
--accepting rule at line 87 ("TY")
--accepting rule at line 49 (".GT.")
--accepting rule at line 87 ("H")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("60")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("TX")
--accepting rule at line 48 (".LT.")
--accepting rule at line 90 ("1")
--accepting rule at line 44 (".OR.")
--accepting rule at line 87 ("TX")
--accepting rule at line 49 (".GT.")
--accepting rule at line 87 ("W")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("60")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//        NOT DEAD END TRY AGAIN
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("EXIT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("TY")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("TX")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 47 (".NE.")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("60")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("40")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("   ")
--accepting rule at line 90 ("60")
--accepting rule at line 91 ("   ")
--accepting rule at line 62 ("CONTINUE")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        DEAD END RETURN TO START UNLESS ALL DIRECTIONS ARE TAKEN
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("Y")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 87 ("SY")
--accepting rule at line 91 (" ")
--accepting rule at line 45 (".AND.")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("X")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("SX")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("70")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("30")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        ALL STARTS FROM THIS STARTING POSITION ARE TAKEN
")
--accepting rule at line 86 ("//        PICK A NEW STARTING POSITIONS UNTIL MAZE IS FULL
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("   ")
--accepting rule at line 90 ("70")
--accepting rule at line 91 ("   ")
--accepting rule at line 87 ("SY")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("IRAN")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("SEED")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("H")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("SX")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("IRAN")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("SEED")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("W")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("EXIT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("SY")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("SX")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("70")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("SY")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 87 ("STARTH")
--accepting rule at line 45 (".AND.")
--accepting rule at line 87 ("SX")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 87 ("STARTW")
--accepting rule at line 45 (".AND.")
--accepting rule at line 87 ("L")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 87 ("STARTD")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("70")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("SY")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 87 ("ENDH")
--accepting rule at line 91 ("  ")
--accepting rule at line 45 (".AND.")
--accepting rule at line 87 ("SX")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 87 ("ENDW")
--accepting rule at line 91 ("  ")
--accepting rule at line 45 (".AND.")
--accepting rule at line 87 ("L")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 87 ("ENDD")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("70")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("SY")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 87 ("Y")
--accepting rule at line 91 ("     ")
--accepting rule at line 45 (".AND.")
--accepting rule at line 87 ("SX")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 87 ("X")
--accepting rule at line 91 ("   ")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("70")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        FILL IN A LAYER AT A TIME
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("LCOUNT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 47 (".NE.")
--accepting rule at line 87 ("LMAX")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("30")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("SD")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("SD")
--accepting rule at line 91 (" ")
--accepting rule at line 41 ("+")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("1")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("EXIT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("SY")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("SX")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("IOR")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("EXIT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("SY")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("SX")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("16")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("EXIT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("SY")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("SX")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("SD")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("IOR")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("EXIT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("SY")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("SX")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("SD")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("32")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("NENTER")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("NENTER")
--accepting rule at line 91 (" ")
--accepting rule at line 41 ("+")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("1")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("LCOUNT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("SD")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("1")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("30")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        DIRECTION TO GO FOUND
")
--accepting rule at line 86 ("//        SET POSITION AS HAVING BEEN ENTERED AND
")
--accepting rule at line 86 ("//        SET EXIT ARRAY TO DIRECTIONS INVOLVED
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("   ")
--accepting rule at line 90 ("80")
--accepting rule at line 91 ("   ")
--accepting rule at line 87 ("ODIR")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("IN")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("DIR")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("EXIT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("Y")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("X")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 91 ("   ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("IOR")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("EXIT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("Y")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("X")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("OUT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("DIR")
--accepting rule at line 37 (")")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("EXIT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("NY")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("NX")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("IOR")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("EXIT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("NY")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("NX")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("IN")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("DIR")
--accepting rule at line 37 (")")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("NENTER")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("NENTER")
--accepting rule at line 91 (" ")
--accepting rule at line 41 ("+")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("1")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("LCOUNT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("LCOUNT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 41 ("+")
--accepting rule at line 90 ("1")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//        THE WAY OUT - ALL POINTS USED
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("NENTER")
--accepting rule at line 91 (" ")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("NMAX")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("90")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("Y")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("NY")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("X")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("NX")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        ONLY ALLOW THE END LOCATION TO BE ENTERED ONCE
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("Y")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 87 ("ENDH")
--accepting rule at line 45 (".AND.")
--accepting rule at line 87 ("X")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 87 ("ENDW")
--accepting rule at line 45 (".AND.")
--accepting rule at line 87 ("L")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 87 ("ENDD")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("30")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("NCOUNT")
--accepting rule at line 40 ("=")
--accepting rule at line 87 ("NCOUNT")
--accepting rule at line 41 ("+")
--accepting rule at line 90 ("1")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("NCOUNT")
--accepting rule at line 48 (".LT.")
--accepting rule at line 87 ("NLOOPS")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("50")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("40")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        OUT
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("   ")
--accepting rule at line 90 ("90")
--accepting rule at line 91 ("   ")
--accepting rule at line 62 ("CONTINUE")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 80 ("RETURN")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 67 ("END")
--accepting rule at line 34 ("
")
--accepting rule at line 91 (" ")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 82 ("SUBROUTINE")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAZOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("STRING")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("L")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("XOFF")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("Y")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("X")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("BOLD")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("REVERS")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("BLINK")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//*****
")
--accepting rule at line 86 ("//  OUTPUTS -STRING- OF LENGTH -L- BYTES WITH BYTE NUMBER -XOFF-
")
--accepting rule at line 86 ("//  OF STRING LOCATED AT CURSER LOCATION -X-, -Y-.
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//  BOLD, REVERS, BLINK ARE THE MODES TO OUTPUT THIS STRING
")
--accepting rule at line 86 ("//*****
")
--accepting rule at line 91 ("  ")
--accepting rule at line 73 ("IMPLICIT")
--accepting rule at line 91 (" ")
--(end of buffer or a NUL)
--accepting rule at line 74 ("INTEGER")
--accepting rule at line 38 ("*")
--accepting rule at line 90 ("2")
--accepting rule at line 91 (" ")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("A")
--accepting rule at line 36 ("-")
--accepting rule at line 87 ("Z")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 75 ("LOGICAL")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("ANY")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 59 ("CHARACTER")
--accepting rule at line 38 ("*")
--accepting rule at line 90 ("300")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("CC")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 57 ("BYTE")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("STRING")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("LINEOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("300")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("CHAR")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("10")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("ESCAPE")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 63 ("DATA")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("CHAR")
--accepting rule at line 42 ("/")
--accepting rule at line 91 (" ")
--accepting rule at line 88 ("'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'")
--accepting rule at line 91 (" ")
--accepting rule at line 42 ("/")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 63 ("DATA")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("ESCAPE")
--accepting rule at line 42 ("/")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("27")
--accepting rule at line 91 (" ")
--accepting rule at line 42 ("/")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("C1")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("C2")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("C3")
--accepting rule at line 91 (" ")
--accepting rule at line 42 ("/")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 42 ("/")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 68 ("EQUIVALENCE")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("CC")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("LINEOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("NL")
--accepting rule at line 91 ("     ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("X")
--accepting rule at line 91 (" ")
--accepting rule at line 36 ("-")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("XOFF")
--accepting rule at line 91 (" ")
--accepting rule at line 41 ("+")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("1")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("NR")
--accepting rule at line 91 ("     ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("NL")
--accepting rule at line 91 (" ")
--accepting rule at line 41 ("+")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("L")
--accepting rule at line 91 (" ")
--accepting rule at line 36 ("-")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("1")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("LENGTH")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("L")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("ISTART")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("1")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("NX")
--accepting rule at line 91 ("     ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("X")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("NY")
--accepting rule at line 91 ("     ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("Y")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//  READJUST STRING LIMITS TO BE WITHIN SCREEN.  IF STRING IS
")
--accepting rule at line 86 ("//  COMPLETELY OUT OF SCREEN, THEN RETURN DOING NOTHING.
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("NY")
--accepting rule at line 48 (".LT.")
--accepting rule at line 90 ("1")
--accepting rule at line 91 (" ")
--accepting rule at line 44 (".OR.")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("NY")
--accepting rule at line 49 (".GT.")
--accepting rule at line 90 ("24")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 80 ("RETURN")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("NR")
--accepting rule at line 48 (".LT.")
--accepting rule at line 90 ("1")
--accepting rule at line 91 (" ")
--accepting rule at line 44 (".OR.")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("NL")
--accepting rule at line 49 (".GT.")
--accepting rule at line 90 ("132")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 80 ("RETURN")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//  STRING (ALL OR PART) LIES IN THE SCREEN AREA.
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("NL")
--accepting rule at line 91 (" ")
--accepting rule at line 51 (".GE.")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("1")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("10")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("ISTART")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("2")
--accepting rule at line 91 (" ")
--accepting rule at line 36 ("-")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("NL")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("NL")
--accepting rule at line 91 ("     ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("1")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("LENGTH")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("LENGTH")
--accepting rule at line 91 (" ")
--accepting rule at line 36 ("-")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("ISTART")
--accepting rule at line 91 (" ")
--accepting rule at line 41 ("+")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("1")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("   ")
--accepting rule at line 90 ("10")
--accepting rule at line 91 (" ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("NR")
--accepting rule at line 91 (" ")
--accepting rule at line 50 (".LE.")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("132")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("20")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("LENGTH")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("LENGTH")
--accepting rule at line 91 (" ")
--accepting rule at line 36 ("-")
--accepting rule at line 91 (" ")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("NR")
--accepting rule at line 36 ("-")
--accepting rule at line 90 ("132")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("NR")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("132")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//  OK AT THIS POINT WE ARE GOING TO OUTPUT STRING(ISTART) THRU
")
--accepting rule at line 86 ("//  STRING(ISTART+LENGTH-1) STARTING AT SCREEN LOCAT SCREEN ION (NL,NY)
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("// 20  LINEOUT(1) = ' '
")
--accepting rule at line 91 ("   ")
--accepting rule at line 90 ("20")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("LINEOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("ESCAPE")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("LINEOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("2")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 88 ("'['")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("2")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("COORD")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("NY")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 65 ("DO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("40")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("I")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("2")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("ANY")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 55 (".FALSE.")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 65 ("DO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("30")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("J")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("3")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("N")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MOD")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("COORD")
--accepting rule at line 42 ("/")
--accepting rule at line 90 ("10")
--accepting rule at line 52 ("**")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("3")
--accepting rule at line 36 ("-")
--accepting rule at line 87 ("J")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("10")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("N")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 90 ("0")
--accepting rule at line 91 (" ")
--accepting rule at line 45 (".AND.")
--accepting rule at line 91 (" ")
--accepting rule at line 56 (".NOT.")
--accepting rule at line 87 ("ANY")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("30")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("ANY")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 54 (".TRUE.")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 91 (" ")
--accepting rule at line 41 ("+")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("1")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("LINEOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("CHAR")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("N")
--accepting rule at line 41 ("+")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("   ")
--accepting rule at line 90 ("30")
--accepting rule at line 91 (" ")
--accepting rule at line 62 ("CONTINUE")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 91 (" ")
--accepting rule at line 41 ("+")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("1")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("LINEOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 88 ("';'")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("COORD")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("NL")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("   ")
--accepting rule at line 90 ("40")
--accepting rule at line 91 (" ")
--accepting rule at line 62 ("CONTINUE")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("LINEOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 88 ("'H'")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//  CHECK MODES AGAINST CURRENT MODES AND OUTPUT APPROPRIATE
")
--accepting rule at line 86 ("//  MODE INDICATORS.
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("C1")
--accepting rule at line 47 (".NE.")
--accepting rule at line 90 ("0")
--accepting rule at line 91 (" ")
--accepting rule at line 45 (".AND.")
--accepting rule at line 91 ("   ")
--accepting rule at line 87 ("BOLD")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 90 ("0")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("80")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("C2")
--accepting rule at line 47 (".NE.")
--accepting rule at line 90 ("0")
--accepting rule at line 91 (" ")
--accepting rule at line 45 (".AND.")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("REVERS")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 90 ("0")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("80")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("C3")
--accepting rule at line 47 (".NE.")
--accepting rule at line 90 ("0")
--accepting rule at line 91 (" ")
--accepting rule at line 45 (".AND.")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("BLINK")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 90 ("0")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("80")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("C1")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 87 ("BOLD")
--accepting rule at line 91 (" ")
--accepting rule at line 45 (".AND.")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("C2")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 87 ("REVERS")
--accepting rule at line 91 (" ")
--accepting rule at line 45 (".AND.")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("C3")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 87 ("BLINK")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("120")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//  OK SIMPLY ADD OUTPUT MODES
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("LINEOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 41 ("+")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("ESCAPE")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("LINEOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 41 ("+")
--accepting rule at line 90 ("2")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 88 ("'['")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 91 (" ")
--accepting rule at line 41 ("+")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("2")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("C1")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 87 ("BOLD")
--accepting rule at line 91 ("   ")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("50")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("LINEOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 41 ("+")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 88 ("'1'")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("LINEOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 41 ("+")
--accepting rule at line 90 ("2")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 88 ("';'")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 91 (" ")
--accepting rule at line 41 ("+")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("2")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("C1")
--accepting rule at line 91 ("   ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("BOLD")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("   ")
--accepting rule at line 90 ("50")
--accepting rule at line 91 (" ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("C2")
--accepting rule at line 91 (" ")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("REVERS")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("60")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("LINEOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 41 ("+")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 88 ("'7'")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("LINEOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 41 ("+")
--accepting rule at line 90 ("2")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 88 ("';'")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 91 (" ")
--accepting rule at line 41 ("+")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("2")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("C2")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("REVERS")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("   ")
--accepting rule at line 90 ("60")
--accepting rule at line 91 (" ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("C3")
--accepting rule at line 91 (" ")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("BLINK")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("70")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("LINEOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 41 ("+")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 88 ("'5'")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("LINEOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 41 ("+")
--accepting rule at line 90 ("2")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 88 ("';'")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 91 (" ")
--accepting rule at line 41 ("+")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("2")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("C3")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("BLINK")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("   ")
--accepting rule at line 90 ("70")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("LINEOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 88 ("'m'")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("120")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//  SOME OR ALL OF CURRENT MODES ARE NOT DESIRED, THUS
")
--accepting rule at line 86 ("//  MUST DO A NORMAL FOLLOWED BY A RESET OF MODES DESIRED.
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("   ")
--accepting rule at line 90 ("80")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("LINEOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 41 ("+")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("ESCAPE")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("LINEOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 41 ("+")
--accepting rule at line 90 ("2")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 88 ("'['")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("LINEOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 41 ("+")
--accepting rule at line 90 ("3")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 88 ("'0'")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("LINEOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 41 ("+")
--accepting rule at line 90 ("4")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 88 ("';'")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 91 (" ")
--accepting rule at line 41 ("+")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("4")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("BOLD")
--accepting rule at line 91 (" ")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("90")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("LINEOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 41 ("+")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 88 ("'1'")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("LINEOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 41 ("+")
--accepting rule at line 90 ("2")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 88 ("';'")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 91 (" ")
--accepting rule at line 41 ("+")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("2")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("   ")
--accepting rule at line 90 ("90")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("C1")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("BOLD")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("REVERS")
--accepting rule at line 91 (" ")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("100")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("LINEOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 41 ("+")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 88 ("'7'")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("LINEOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 41 ("+")
--accepting rule at line 90 ("2")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 88 ("';'")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 91 (" ")
--accepting rule at line 41 ("+")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("2")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 90 ("100")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("C2")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("REVERS")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("BLINK")
--accepting rule at line 91 (" ")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("110")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("LINEOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 41 ("+")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 88 ("'5'")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("LINEOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 41 ("+")
--accepting rule at line 90 ("2")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 88 ("';'")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 91 (" ")
--accepting rule at line 41 ("+")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("2")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 90 ("110")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("C3")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("BLINK")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("LINEOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 88 ("'m'")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//*****
")
--accepting rule at line 86 ("//  OUTPUT THE STRING WITH ITS LEADER
")
--accepting rule at line 86 ("//*****
")
--accepting rule at line 91 ("  ")
--accepting rule at line 90 ("120")
--accepting rule at line 91 (" ")
--accepting rule at line 65 ("DO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("130")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("I")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("LENGTH")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("LINEOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 41 ("+")
--accepting rule at line 87 ("I")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("STRING")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("ISTART")
--accepting rule at line 41 ("+")
--accepting rule at line 87 ("I")
--accepting rule at line 36 ("-")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 90 ("130")
--accepting rule at line 91 (" ")
--accepting rule at line 62 ("CONTINUE")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 91 (" ")
--accepting rule at line 41 ("+")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("LENGTH")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//*****
")
--accepting rule at line 86 ("//  BACK UP CURSER ONE LINE IF AT LINE 24
")
--accepting rule at line 86 ("//*****
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("NY")
--accepting rule at line 91 (" ")
--accepting rule at line 47 (".NE.")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("24")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("140")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("LINEOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 41 ("+")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("ESCAPE")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("LINEOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 41 ("+")
--accepting rule at line 90 ("2")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 88 ("'M'")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 91 (" ")
--accepting rule at line 41 ("+")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("2")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//*****
")
--accepting rule at line 86 ("//  NOW READY TO OUTPUT THE STRING.
")
--accepting rule at line 86 ("//*****
")
--accepting rule at line 91 ("  ")
--accepting rule at line 90 ("140")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("RC")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("LIB$PUT_OUTPUT")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("CC")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("1")
--accepting rule at line 53 (":")
--accepting rule at line 87 ("IOUT")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 80 ("RETURN")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 67 ("END")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 70 ("FUNCTION")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("IRAN")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("SEED")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("I")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("J")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//*****
")
--accepting rule at line 86 ("//  RETURNS A RANDOM NUMBER IN THE RANGE OF I THRU J.
")
--accepting rule at line 86 ("//  SEED IS UPDATED AND THUS A VARIABLE MUST BE SENT.
")
--accepting rule at line 86 ("//*****
")
--accepting rule at line 91 ("  ")
--accepting rule at line 79 ("REAL")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MTH$RANDOM")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("FN")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("J")
--accepting rule at line 91 (" ")
--accepting rule at line 36 ("-")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("I")
--accepting rule at line 91 (" ")
--accepting rule at line 41 ("+")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("1")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("IRAN")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("I")
--accepting rule at line 91 (" ")
--accepting rule at line 41 ("+")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("IFIX")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("FN")
--accepting rule at line 91 (" ")
--accepting rule at line 38 ("*")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MTH$RANDOM")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("SEED")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 80 ("RETURN")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 67 ("END")
--accepting rule at line 34 ("
")
--accepting rule at line 91 (" ")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 82 ("SUBROUTINE")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAZRUN")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("EXIT")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("MAT")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("HEIGHT")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("WIDTH")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("DEPTH")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        MAZRUN USES THE EXIT ARRAY TO CONTROL MAZE MOVEMENT
")
--accepting rule at line 86 ("//                        MAT  ARRAY CONTAINS WHERE YOU HAVE BEEN
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 73 ("IMPLICIT")
--accepting rule at line 91 (" ")
--accepting rule at line 74 ("INTEGER")
--accepting rule at line 38 ("*")
--accepting rule at line 90 ("4")
--accepting rule at line 91 (" ")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("A")
--accepting rule at line 36 ("-")
--accepting rule at line 87 ("Z")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 74 ("INTEGER")
--accepting rule at line 38 ("*")
--accepting rule at line 90 ("2")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("EXIT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("HEIGHT")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("WIDTH")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("DEPTH")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 74 ("INTEGER")
--accepting rule at line 38 ("*")
--accepting rule at line 90 ("2")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAT")
--accepting rule at line 91 (" ")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("HEIGHT")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("WIDTH")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("DEPTH")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("ADD")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MOVE")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("4")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("4")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 64 ("DIMENSION")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("XDIR")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("4")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("YDIR")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("4")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("OUT")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("6")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("SLEEP")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("2")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 57 ("BYTE")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("START")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("28")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("BELL")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("DEAD")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("LR132")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("10")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 57 ("BYTE")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("SET")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("16")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 57 ("BYTE")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("SCROL")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("8")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 59 ("CHARACTER")
--accepting rule at line 38 ("*")
--accepting rule at line 90 ("200")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("INPUT")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 59 ("CHARACTER")
--accepting rule at line 38 ("*")
--accepting rule at line 90 ("10")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("NAME")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 59 ("CHARACTER")
--accepting rule at line 38 ("*")
--accepting rule at line 90 ("6")
--accepting rule at line 91 ("   ")
--accepting rule at line 87 ("PORT")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 61 ("COMMON")
--accepting rule at line 91 (" ")
--accepting rule at line 42 ("/")
--accepting rule at line 87 ("MAZECM")
--accepting rule at line 42 ("/")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("STARTH")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("STARTW")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("STARTD")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("ENDH")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("ENDW")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("ENDD")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("NOBELL")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 63 ("DATA")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("XDIR")
--accepting rule at line 91 (" ")
--accepting rule at line 42 ("/")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 39 (",")
--accepting rule at line 36 ("-")
--accepting rule at line 90 ("1")
--accepting rule at line 91 (" ")
--accepting rule at line 42 ("/")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 63 ("DATA")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("YDIR")
--accepting rule at line 91 (" ")
--accepting rule at line 42 ("/")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 39 (",")
--accepting rule at line 36 ("-")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 91 (" ")
--accepting rule at line 42 ("/")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 63 ("DATA")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("OUT")
--accepting rule at line 91 ("  ")
--accepting rule at line 42 ("/")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("2")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("4")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("8")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("16")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("32")
--accepting rule at line 91 (" ")
--accepting rule at line 42 ("/")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 63 ("DATA")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("BELL")
--accepting rule at line 91 (" ")
--accepting rule at line 42 ("/")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("7")
--accepting rule at line 91 (" ")
--accepting rule at line 42 ("/")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        ESCAPE SEQUENCES TO
")
--accepting rule at line 86 ("//        ANSI MODE, ERASE SCREEN, ATTRIBUTES OFF, SCREEN NORMAL,
")
--accepting rule at line 86 ("//        WRAP OFF, 80 COL., AND SPECIAL GRAPHICS
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 63 ("DATA")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("START")
--accepting rule at line 42 ("/")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("27")
--accepting rule at line 39 (",")
--accepting rule at line 88 ("'<',27,'[','2','J',27,'[','0','m',27,'[','?','5','l',27,'[','?','7','l',  27,'[','?','3','l',27,'(','0'")
--accepting rule at line 42 ("/")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        GRAPHICS CHARACTERS TO USE FOR DRAWING LINES
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 63 ("DATA")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("SET")
--accepting rule at line 42 ("/")
--accepting rule at line 88 ("' ', ' ', 'l', ' ', 'k', 'q', 'w', ' ','x', 'm', 't', 'j', 'u', 'v', 'n'")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("97")
--accepting rule at line 91 (" ")
--accepting rule at line 42 ("/")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        ESCAPE SEQUENCE TO SET 132 CHARACTER LINE MODE
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 63 ("DATA")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("LR132")
--accepting rule at line 91 (" ")
--accepting rule at line 42 ("/")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("27")
--accepting rule at line 39 (",")
--accepting rule at line 88 ("'[','?','3','h' , 27,'[','?','5','h'")
--accepting rule at line 91 (" ")
--accepting rule at line 42 ("/")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        SET SCROLLING REGION TO LAST TWO LINES (23-24)
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 63 ("DATA")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("SCROL")
--accepting rule at line 91 (" ")
--accepting rule at line 42 ("/")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("27")
--accepting rule at line 39 (",")
--accepting rule at line 88 ("'[','2','3',';','2','4','r'")
--accepting rule at line 91 (" ")
--accepting rule at line 42 ("/")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 63 ("DATA")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("DEAD")
--accepting rule at line 91 (" ")
--accepting rule at line 42 ("/")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("97")
--accepting rule at line 91 (" ")
--accepting rule at line 42 ("/")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 63 ("DATA")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MOVE")
--accepting rule at line 91 (" ")
--accepting rule at line 42 ("/")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("9")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("5")
--accepting rule at line 39 (",")
--accepting rule at line 36 ("-")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("3")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("10")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("6")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("3")
--accepting rule at line 39 (",")
--accepting rule at line 36 ("-")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 36 ("-")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("12")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("9")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("10")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("12")
--accepting rule at line 39 (",")
--accepting rule at line 36 ("-")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("5")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("6")
--accepting rule at line 91 (" ")
--accepting rule at line 42 ("/")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        SET UP FOR QIO FROM TERMINAL
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("STATUS")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("SYS$TRNLOG")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 88 ("'SYS$INPUT'")
--accepting rule at line 91 (" ")
--accepting rule at line 39 (",")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("NAME")
--accepting rule at line 91 (" ")
--accepting rule at line 39 (",")
--accepting rule at line 39 (",")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("PORT")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("NAME")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("5")
--accepting rule at line 53 (":")
--accepting rule at line 90 ("10")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("STATUS")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("SYS$ASSIGN")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("PORT")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("CHAN")
--accepting rule at line 91 (" ")
--accepting rule at line 39 (",")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("STATUS")
--accepting rule at line 47 (".NE.")
--accepting rule at line 90 ("1")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 80 ("RETURN")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 78 ("READ")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("49")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("NOECHO")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("64")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("CVLOW")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("256")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        CLEAR SCREEN AND SHOW START AND END OF MAZE
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 58 ("CALL")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAZOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("START")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("28")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("WIDTH")
--accepting rule at line 49 (".GT.")
--accepting rule at line 90 ("80")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 58 ("CALL")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAZOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("LR132")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("10")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 58 ("CALL")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAZOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("SCROL")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("8")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("23")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("LOOP")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("SOVER")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        BORDER
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("   ")
--accepting rule at line 90 ("10")
--accepting rule at line 91 ("   ")
--accepting rule at line 62 ("CONTINUE")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("Y")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("STARTH")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("X")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("STARTW")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("L")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("STARTD")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("   ")
--accepting rule at line 90 ("20")
--accepting rule at line 91 ("   ")
--accepting rule at line 62 ("CONTINUE")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 58 ("CALL")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAZOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("START")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("3")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("4")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 65 ("DO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("40")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("I")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("HEIGHT")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 58 ("CALL")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAZOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 88 ("' '")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("I")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 91 ("     ")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 58 ("CALL")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAZOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 88 ("' '")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("I")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("WIDTH")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("I")
--accepting rule at line 47 (".NE.")
--accepting rule at line 90 ("1")
--accepting rule at line 45 (".AND.")
--accepting rule at line 87 ("I")
--accepting rule at line 47 (".NE.")
--accepting rule at line 87 ("HEIGHT")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("40")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 65 ("DO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("30")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("J")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("2")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("WIDTH")
--accepting rule at line 36 ("-")
--accepting rule at line 90 ("1")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 58 ("CALL")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAZOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 88 ("' '")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("I")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("J")
--accepting rule at line 91 ("     ")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("   ")
--accepting rule at line 90 ("30")
--accepting rule at line 91 ("   ")
--accepting rule at line 62 ("CONTINUE")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("   ")
--accepting rule at line 90 ("40")
--accepting rule at line 91 ("   ")
--accepting rule at line 62 ("CONTINUE")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        SHOW CURRENT STATUS OF MAZE SOLUTION
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 65 ("DO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("50")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("J")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("WIDTH")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 65 ("DO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("50")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("I")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("HEIGHT")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("IAND")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("EXIT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("I")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("J")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("16")
--accepting rule at line 37 (")")
--accepting rule at line 47 (".NE.")
--accepting rule at line 90 ("0")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 58 ("CALL")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAZOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 88 ("'O'")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("I")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("J")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("MAT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("I")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("J")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 90 ("0")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("50")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("MAT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("I")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("J")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 49 (".GT.")
--accepting rule at line 90 ("0")
--accepting rule at line 45 (".AND.")
--accepting rule at line 87 ("MAT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("I")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("J")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 48 (".LT.")
--accepting rule at line 90 ("16")
--accepting rule at line 37 (")")
--accepting rule at line 58 ("CALL")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAZOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("SET")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("MAT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("I")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("J")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("I")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("J")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("MAT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("I")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("J")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 48 (".LT.")
--accepting rule at line 90 ("0")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 58 ("CALL")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAZOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 88 ("'~'")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("I")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("J")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("MAT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("I")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("J")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 90 ("64")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 58 ("CALL")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAZOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("SET")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("16")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("I")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("J")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("MAT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("I")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("J")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 49 (".GT.")
--accepting rule at line 90 ("15")
--accepting rule at line 45 (".AND.")
--accepting rule at line 87 ("MAT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("I")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("J")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 48 (".LT.")
--accepting rule at line 90 ("32")
--accepting rule at line 37 (")")
--accepting rule at line 58 ("CALL")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAZOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 88 ("'O'")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("I")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("J")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("MAT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("I")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("J")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 49 (".GT.")
--accepting rule at line 90 ("31")
--accepting rule at line 45 (".AND.")
--accepting rule at line 87 ("MAT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("I")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("J")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 48 (".LT.")
--accepting rule at line 90 ("64")
--accepting rule at line 37 (")")
--accepting rule at line 58 ("CALL")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAZOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 88 ("'O'")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("I")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("J")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("   ")
--accepting rule at line 90 ("50")
--accepting rule at line 91 ("   ")
--accepting rule at line 62 ("CONTINUE")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("LOOP")
--accepting rule at line 47 (".NE.")
--accepting rule at line 90 ("0")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 58 ("CALL")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAZOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 88 ("'O'")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("Y")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("X")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("L")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 87 ("ENDD")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 58 ("CALL")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAZOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 88 ("'E'")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("ENDH")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("ENDW")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("L")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 87 ("STARTD")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 58 ("CALL")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAZOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 88 ("'S'")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("STARTH")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("STARTW")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("HOMEH")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("Y")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("HOMEW")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("X")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("   ")
--accepting rule at line 90 ("60")
--accepting rule at line 91 ("   ")
--accepting rule at line 87 ("DEADE")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("ODIR")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        READ INPUT AND MOVE AS REQUESTED
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("ESC")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("OPT")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 ("  ")
--accepting rule at line 78 ("READ")
--accepting rule at line 91 (" ")
--accepting rule at line 41 ("+")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("NOECHO")
--accepting rule at line 91 (" ")
--accepting rule at line 41 ("+")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("CVLOW")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("   ")
--accepting rule at line 90 ("70")
--accepting rule at line 91 ("   ")
--accepting rule at line 58 ("CALL")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAZOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 88 ("' '")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("24")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("STATUS")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("SYS$QIOW")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("%VAL")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("CHAN")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("%VAL")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("OPT")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 39 (",")
--accepting rule at line 39 (",")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("%VAL")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("%LOC")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("INPUT")
--accepting rule at line 37 (")")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("%VAL")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 39 (",")
--accepting rule at line 39 (",")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("STATUS")
--accepting rule at line 91 (" ")
--accepting rule at line 47 (".NE.")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("1")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 80 ("RETURN")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("   ")
--accepting rule at line 90 ("80")
--accepting rule at line 91 ("   ")
--accepting rule at line 69 ("FORMAT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("Q")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("A")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("ESC")
--accepting rule at line 91 (" ")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("1")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("140")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("ICHAR")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("INPUT")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("1")
--accepting rule at line 53 (":")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("27")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("130")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("INPUT")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("1")
--accepting rule at line 53 (":")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 88 ("'Q'")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 80 ("RETURN")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("INPUT")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("1")
--accepting rule at line 53 (":")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 88 ("'B'")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("90")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("INPUT")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("1")
--accepting rule at line 53 (":")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 88 ("'M'")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("100")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("INPUT")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("1")
--accepting rule at line 53 (":")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 88 ("'C'")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("110")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("INPUT")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("1")
--accepting rule at line 53 (":")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 47 (".NE.")
--accepting rule at line 88 ("'H'")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("160")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("Y")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 87 ("HOMEH")
--accepting rule at line 45 (".AND.")
--accepting rule at line 87 ("X")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 87 ("HOMEW")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("60")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("SOVER")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("1")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("ADD")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 36 ("-")
--accepting rule at line 90 ("1")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("220")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("   ")
--accepting rule at line 90 ("90")
--accepting rule at line 91 ("   ")
--accepting rule at line 87 ("NOBELL")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("70")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 90 ("100")
--accepting rule at line 91 ("   ")
--accepting rule at line 87 ("NOBELL")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("1")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("70")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 90 ("110")
--accepting rule at line 91 ("   ")
--accepting rule at line 84 ("WRITE")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("6")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("120")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("L")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 90 ("120")
--accepting rule at line 91 ("   ")
--accepting rule at line 69 ("FORMAT")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 88 ("' CURRENT LEVEL IS '")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("I2")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("70")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 90 ("130")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("ESC")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("1")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("70")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 90 ("140")
--accepting rule at line 91 ("   ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("INPUT")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("1")
--accepting rule at line 53 (":")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 91 (" ")
--accepting rule at line 88 ("'['")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("70")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("170")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 90 ("150")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("SOVER")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("Y")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("HOMEH")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("X")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("HOMEW")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("60")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        FIND DIRECTION TO GO
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 90 ("160")
--accepting rule at line 91 ("   ")
--accepting rule at line 87 ("DIR")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("ICHAR")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("INPUT")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("1")
--accepting rule at line 53 (":")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 37 (")")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 90 ("27")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("170")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("INPUT")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("1")
--accepting rule at line 53 (":")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 88 ("'S'.OR.INPUT(1:1).EQ.'D'")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("DIR")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("1")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("INPUT")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("1")
--accepting rule at line 53 (":")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 88 ("'E'.OR.INPUT(1:1).EQ.'R'")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("DIR")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("2")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("INPUT")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("1")
--accepting rule at line 53 (":")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 88 ("'N'.OR.INPUT(1:1).EQ.'U'")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("DIR")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("3")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("INPUT")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("1")
--accepting rule at line 53 (":")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 88 ("'W'.OR.INPUT(1:1).EQ.'L'")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("DIR")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("4")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("INPUT")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("1")
--accepting rule at line 53 (":")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 88 ("'2'")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("DIR")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("1")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("INPUT")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("1")
--accepting rule at line 53 (":")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 88 ("'6'")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("DIR")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("2")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("INPUT")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("1")
--accepting rule at line 53 (":")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 88 ("'8'")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("DIR")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("3")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("INPUT")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("1")
--accepting rule at line 53 (":")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 88 ("'4'")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("DIR")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("4")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("INPUT")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("1")
--accepting rule at line 53 (":")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 88 ("'I'.OR.INPUT(1:1).EQ.'9'")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("DIR")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("5")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("INPUT")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("1")
--accepting rule at line 53 (":")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 88 ("'O'.OR.INPUT(1:1).EQ.'7'")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("DIR")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("6")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("180")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        CHECK ARROW KEYS ( DID NOT HAVE TIME TO MAKE THIS WORK )
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 90 ("170")
--accepting rule at line 91 ("   ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("INPUT")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("1")
--accepting rule at line 53 (":")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 88 ("'A'")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("DIR")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("3")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("INPUT")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("1")
--accepting rule at line 53 (":")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 88 ("'B'")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("DIR")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("1")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("INPUT")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("1")
--accepting rule at line 53 (":")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 88 ("'C'")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("DIR")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("2")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("INPUT")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("1")
--accepting rule at line 53 (":")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 88 ("'D'")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("DIR")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("4")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("ESC")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 90 ("180")
--accepting rule at line 91 ("   ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("DIR")
--accepting rule at line 47 (".NE.")
--accepting rule at line 90 ("0")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("200")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        COMMAND NOT RECOGNIZED
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 84 ("WRITE")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("6")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("190")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 90 ("190")
--accepting rule at line 91 ("   ")
--accepting rule at line 69 ("FORMAT")
--accepting rule at line 35 ("(")
--accepting rule at line 88 ("' TRY AGAIN '")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("70")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        SEE IF DIRECTION IS LEGAL
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 90 ("200")
--accepting rule at line 91 ("   ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("IAND")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("EXIT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("Y")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("X")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("OUT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("DIR")
--accepting rule at line 37 (")")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 47 (".NE.")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("210")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("NOBELL")
--accepting rule at line 91 (" ")
--accepting rule at line 47 (".NE.")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("70")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 58 ("CALL")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAZOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("BELL")
--accepting rule at line 91 (" ")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("24")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("70")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        MOVE KEEP MOVEMENT ARRAY MAT UP TO DATE
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 90 ("210")
--accepting rule at line 91 ("   ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("Y")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 87 ("STARTH")
--accepting rule at line 45 (".AND.")
--accepting rule at line 87 ("X")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 87 ("STARTW")
--accepting rule at line 45 (".AND.")
--accepting rule at line 87 ("L")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 87 ("STARTD")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("230")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("DEADE")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("230")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("ADD")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("OUT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("DIR")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("ODIR")
--accepting rule at line 47 (".NE.")
--accepting rule at line 90 ("0")
--accepting rule at line 45 (".AND.")
--accepting rule at line 87 ("DIR")
--accepting rule at line 48 (".LT.")
--accepting rule at line 90 ("5")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("ADD")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MOVE")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("ODIR")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("DIR")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("ODIR")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 90 ("0")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("ADD")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 90 ("220")
--accepting rule at line 91 ("   ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("MAT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("Y")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("X")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 36 ("-")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("Y")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("X")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("ADD")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 36 ("-")
--accepting rule at line 90 ("1")
--accepting rule at line 91 (" ")
--accepting rule at line 45 (".AND.")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("Y")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("X")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 90 ("0")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAT")
--accepting rule at line 35 ("(")
--(end of buffer or a NUL)
--accepting rule at line 87 ("Y")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("X")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("ADD")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("ADD")
--accepting rule at line 47 (".NE.")
--accepting rule at line 36 ("-")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("Y")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("X")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("IOR")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("MAT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("Y")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("X")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("ADD")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("MAT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("Y")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("X")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 49 (".GT.")
--accepting rule at line 90 ("0")
--accepting rule at line 45 (".AND.")
--accepting rule at line 87 ("MAT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("Y")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("X")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 48 (".LT.")
--accepting rule at line 90 ("16")
--accepting rule at line 37 (")")
--accepting rule at line 58 ("CALL")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAZOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("SET")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("MAT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("Y")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("X")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("Y")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("X")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("MAT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("Y")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("X")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 48 (".LT.")
--accepting rule at line 90 ("0")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 58 ("CALL")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAZOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 88 ("'~'")
--accepting rule at line 91 (" ")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("Y")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("X")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 90 ("230")
--accepting rule at line 91 ("   ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("SOVER")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("150")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("DIR")
--accepting rule at line 48 (".LT.")
--accepting rule at line 90 ("5")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("240")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        CHANGE LEVELS
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("DIR")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 90 ("5")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("L")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("L")
--accepting rule at line 41 ("+")
--accepting rule at line 90 ("1")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("DIR")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 90 ("6")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("L")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("L")
--accepting rule at line 36 ("-")
--accepting rule at line 90 ("1")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("MAT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("Y")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("X")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("OUT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("DIR")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("LOOP")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("LOOP")
--accepting rule at line 91 (" ")
--accepting rule at line 41 ("+")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("1")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("20")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 90 ("240")
--accepting rule at line 91 ("   ")
--accepting rule at line 87 ("Y")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("Y")
--accepting rule at line 91 (" ")
--accepting rule at line 41 ("+")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("YDIR")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("DIR")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("X")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("X")
--accepting rule at line 91 (" ")
--accepting rule at line 41 ("+")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("XDIR")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("DIR")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("Y")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 87 ("STARTH")
--accepting rule at line 45 (".AND.")
--accepting rule at line 87 ("X")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 87 ("STARTW")
--accepting rule at line 45 (".AND.")
--accepting rule at line 87 ("L")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 87 ("STARTD")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("70")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("MAT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("Y")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("X")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 48 (".LT.")
--accepting rule at line 90 ("16")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 58 ("CALL")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAZOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 88 ("'{'")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("Y")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("X")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("DEADE")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("ODIR")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("DIR")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("Y")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 87 ("ENDH")
--accepting rule at line 45 (".AND.")
--accepting rule at line 87 ("X")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 87 ("ENDW")
--accepting rule at line 45 (".AND.")
--accepting rule at line 87 ("L")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 87 ("ENDD")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("270")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        CHECK FOR DEAD END
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 65 ("DO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("250")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("I")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("6")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("EXIT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("Y")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("X")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("OUT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("I")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("260")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 90 ("250")
--accepting rule at line 91 ("   ")
--accepting rule at line 62 ("CONTINUE")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("70")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        DEAD END
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 90 ("260")
--accepting rule at line 91 ("   ")
--accepting rule at line 58 ("CALL")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAZOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("DEAD")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("Y")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("X")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("MAT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("Y")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("X")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("64")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("DEADE")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("1")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("70")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 90 ("270")
--accepting rule at line 91 ("   ")
--accepting rule at line 62 ("CONTINUE")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        SUCCESS - END FOUND
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 65 ("DO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("290")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("I")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("6")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("J")
--accepting rule at line 40 ("=")
--accepting rule at line 87 ("MOD")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("I")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("2")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 58 ("CALL")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAZOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 88 ("'E'")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("ENDH")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("ENDW")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("J")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 58 ("CALL")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAZOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 88 ("' '")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("24")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("J")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 84 ("WRITE")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("6")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("280")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 90 ("280")
--accepting rule at line 91 ("   ")
--accepting rule at line 69 ("FORMAT")
--accepting rule at line 35 ("(")
--accepting rule at line 88 ("' SUCCESS SUCCESS SUCCESS'")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 58 ("CALL")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("SYS$BINTIM")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 88 ("'0 ::00.50'")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("SLEEP")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 58 ("CALL")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("SYS$SCHDWK")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("SLEEP")
--accepting rule at line 91 (" ")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 58 ("CALL")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("SYS$HIBER")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 90 ("290")
--accepting rule at line 91 ("   ")
--accepting rule at line 62 ("CONTINUE")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 80 ("RETURN")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 67 ("END")
--accepting rule at line 34 ("
")
--accepting rule at line 91 (" ")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 82 ("SUBROUTINE")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAZSOL")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("EXIT")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("MAT")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("HEIGHT")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("WIDTH")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("DEPTH")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        MAZSOL SHOWS ALL POSSIABLE PATHS IN MAZE
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 73 ("IMPLICIT")
--accepting rule at line 91 (" ")
--accepting rule at line 74 ("INTEGER")
--accepting rule at line 38 ("*")
--accepting rule at line 90 ("4")
--accepting rule at line 91 (" ")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("A")
--accepting rule at line 36 ("-")
--accepting rule at line 87 ("Z")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 74 ("INTEGER")
--accepting rule at line 38 ("*")
--accepting rule at line 90 ("2")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("EXIT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("HEIGHT")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("WIDTH")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("DEPTH")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 74 ("INTEGER")
--accepting rule at line 38 ("*")
--accepting rule at line 90 ("2")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAT")
--accepting rule at line 91 (" ")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("HEIGHT")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("WIDTH")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("DEPTH")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("ADD")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MOVE")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("4")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("4")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 64 ("DIMENSION")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("XDIR")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("4")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("YDIR")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("4")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("OUT")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("4")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("SLEEP")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("2")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 57 ("BYTE")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("START")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("28")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("BELL")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("DEAD")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("LR132")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("10")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 57 ("BYTE")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("SET")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("16")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 57 ("BYTE")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("SCROL")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("8")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 59 ("CHARACTER")
--accepting rule at line 38 ("*")
--accepting rule at line 90 ("200")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("INPUT")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 61 ("COMMON")
--accepting rule at line 91 (" ")
--accepting rule at line 42 ("/")
--accepting rule at line 87 ("MAZECM")
--accepting rule at line 42 ("/")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("STARTH")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("STARTW")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("STARTD")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("ENDH")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("ENDW")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("ENDD")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("NOBELL")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 63 ("DATA")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("XDIR")
--accepting rule at line 91 (" ")
--accepting rule at line 42 ("/")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 39 (",")
--accepting rule at line 36 ("-")
--accepting rule at line 90 ("1")
--accepting rule at line 91 (" ")
--accepting rule at line 42 ("/")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 63 ("DATA")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("YDIR")
--accepting rule at line 91 (" ")
--accepting rule at line 42 ("/")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 39 (",")
--accepting rule at line 36 ("-")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 91 (" ")
--accepting rule at line 42 ("/")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 63 ("DATA")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("OUT")
--accepting rule at line 91 ("  ")
--accepting rule at line 42 ("/")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("2")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("4")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("8")
--accepting rule at line 91 (" ")
--accepting rule at line 42 ("/")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 63 ("DATA")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("BELL")
--accepting rule at line 91 (" ")
--accepting rule at line 42 ("/")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("7")
--accepting rule at line 91 (" ")
--accepting rule at line 42 ("/")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 63 ("DATA")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("START")
--accepting rule at line 42 ("/")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("27")
--accepting rule at line 39 (",")
--accepting rule at line 88 ("'<',27,'[','2','J',27,'[','0','m',27,'[','?','5','l',27,'[','?','7','l',  27,'[','?','3','l',27,'(','0'")
--accepting rule at line 42 ("/")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 63 ("DATA")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("SET")
--accepting rule at line 42 ("/")
--accepting rule at line 88 ("' ', ' ', 'l', ' ', 'k', 'q', 'w', ' ','x', 'm', 't', 'j', 'u', 'v', 'n'")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("97")
--accepting rule at line 91 (" ")
--accepting rule at line 42 ("/")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 63 ("DATA")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("LR132")
--accepting rule at line 91 (" ")
--accepting rule at line 42 ("/")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("27")
--accepting rule at line 39 (",")
--accepting rule at line 88 ("'[','?','3','h' , 27,'[','?','5','h'")
--accepting rule at line 91 (" ")
--accepting rule at line 42 ("/")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 63 ("DATA")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("SCROL")
--accepting rule at line 91 (" ")
--accepting rule at line 42 ("/")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("27")
--accepting rule at line 39 (",")
--accepting rule at line 88 ("'[','2','3',';','2','4','r'")
--accepting rule at line 91 (" ")
--accepting rule at line 42 ("/")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 63 ("DATA")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("DEAD")
--accepting rule at line 91 (" ")
--accepting rule at line 42 ("/")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("97")
--accepting rule at line 91 (" ")
--accepting rule at line 42 ("/")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 63 ("DATA")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MOVE")
--accepting rule at line 91 (" ")
--accepting rule at line 42 ("/")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("3")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("9")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("5")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("3")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("10")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("6")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("9")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("10")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("12")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("5")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("6")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("12")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 91 (" ")
--accepting rule at line 42 ("/")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        CLEAR SCREEN AND SHOW START AND END OF MAZE
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 58 ("CALL")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAZOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("START")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("28")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("WIDTH")
--accepting rule at line 49 (".GT.")
--accepting rule at line 90 ("80")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 58 ("CALL")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAZOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("LR132")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("10")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 58 ("CALL")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAZOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("SCROL")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("8")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("23")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        BORDER
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 65 ("DO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("70")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("L")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("DEPTH")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("L")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 87 ("ENDD")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 58 ("CALL")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAZOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 88 ("'E'")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("ENDH")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("ENDW")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("L")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 87 ("STARTD")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 58 ("CALL")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAZOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 88 ("'S'")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("STARTH")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("STARTW")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        LOOP OVER MAZE
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 65 ("DO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("40")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("X")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("WIDTH")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 65 ("DO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("40")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("Y")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("HEIGHT")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("MAT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("Y")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("X")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("Y")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 87 ("STARTH")
--accepting rule at line 45 (".AND.")
--accepting rule at line 87 ("X")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 87 ("STARTW")
--accepting rule at line 45 (".AND.")
--accepting rule at line 87 ("L")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 87 ("STARTD")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("40")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("Y")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 87 ("ENDH")
--accepting rule at line 91 ("  ")
--accepting rule at line 45 (".AND.")
--accepting rule at line 87 ("X")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 87 ("ENDW")
--accepting rule at line 91 ("  ")
--accepting rule at line 45 (".AND.")
--accepting rule at line 87 ("L")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 87 ("ENDD")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("40")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        CHECK FOR DEAD END
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 65 ("DO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("20")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("ODIR")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("4")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("EXIT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("Y")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("X")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("OUT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("ODIR")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("30")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("IAND")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("EXIT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("Y")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("X")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("OUT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("ODIR")
--accepting rule at line 37 (")")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("20")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 65 ("DO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("10")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("DIR")
--accepting rule at line 40 ("=")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("4")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("DIR")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 87 ("ODIR")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("10")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("IAND")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("EXIT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("Y")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("X")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("OUT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("DIR")
--accepting rule at line 37 (")")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 46 (".EQ.")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("0")
--accepting rule at line 91 (" ")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("10")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("ADD")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MOVE")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("ODIR")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("DIR")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 87 ("MAT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("Y")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("X")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 40 ("=")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("IOR")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("MAT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("Y")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("X")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("ADD")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("   ")
--accepting rule at line 90 ("10")
--accepting rule at line 91 ("   ")
--accepting rule at line 62 ("CONTINUE")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("   ")
--accepting rule at line 90 ("20")
--accepting rule at line 91 ("   ")
--accepting rule at line 62 ("CONTINUE")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("EXIT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("Y")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("X")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 48 (".LT.")
--accepting rule at line 90 ("16")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 58 ("CALL")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAZOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("SET")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("MAT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("Y")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("X")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("Y")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("X")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("IAND")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("EXIT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("Y")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("X")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("16")
--accepting rule at line 37 (")")
--accepting rule at line 47 (".NE.")
--accepting rule at line 90 ("0")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 58 ("CALL")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAZOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 88 ("'O'")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("Y")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("X")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 72 ("IF")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("IAND")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("EXIT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("Y")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("X")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("L")
--accepting rule at line 37 (")")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("32")
--accepting rule at line 37 (")")
--accepting rule at line 47 (".NE.")
--accepting rule at line 90 ("0")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 58 ("CALL")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAZOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 88 ("'O'")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("Y")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("X")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 71 ("GO")
--accepting rule at line 91 (" ")
--accepting rule at line 83 ("TO")
--accepting rule at line 91 (" ")
--accepting rule at line 90 ("40")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        DEAD END
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("   ")
--accepting rule at line 90 ("30")
--accepting rule at line 91 ("   ")
--accepting rule at line 58 ("CALL")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAZOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("DEAD")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("Y")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("X")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("   ")
--accepting rule at line 90 ("40")
--accepting rule at line 91 ("   ")
--accepting rule at line 62 ("CONTINUE")
--accepting rule at line 34 ("
")
--accepting rule at line 86 ("//
")
--accepting rule at line 86 ("//        SUCCESS - END FOUND
")
--accepting rule at line 86 ("//
")
--accepting rule at line 91 ("  ")
--accepting rule at line 58 ("CALL")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("MAZOUT")
--accepting rule at line 35 ("(")
--accepting rule at line 88 ("' '")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("24")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("1")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("0")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 84 ("WRITE")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("6")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("50")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("   ")
--accepting rule at line 90 ("50")
--accepting rule at line 91 ("   ")
--accepting rule at line 69 ("FORMAT")
--accepting rule at line 35 ("(")
--accepting rule at line 88 ("'  PRESS RETURN TO CONTINUE OR FINISH'")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 78 ("READ")
--accepting rule at line 35 ("(")
--accepting rule at line 90 ("5")
--accepting rule at line 39 (",")
--accepting rule at line 90 ("60")
--accepting rule at line 37 (")")
--accepting rule at line 91 (" ")
--accepting rule at line 87 ("NC")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("INPUT")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("   ")
--accepting rule at line 90 ("60")
--accepting rule at line 91 ("   ")
--accepting rule at line 69 ("FORMAT")
--accepting rule at line 35 ("(")
--accepting rule at line 87 ("Q")
--accepting rule at line 39 (",")
--accepting rule at line 87 ("A")
--accepting rule at line 37 (")")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("   ")
--accepting rule at line 90 ("70")
--accepting rule at line 91 ("   ")
--accepting rule at line 62 ("CONTINUE")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 80 ("RETURN")
--accepting rule at line 34 ("
")
--accepting rule at line 91 ("  ")
--accepting rule at line 67 ("END")
--accepting rule at line 34 ("
")
--(end of buffer or a NUL)
--EOF (start condition 1)

The "--accepting rule at line ##" is referring to the lines in the Fortran.l file:

/* -*- c -*- This FLex file was machine-generated by the BNF converter */
%option noyywrap
%{
#define yylval Fortranlval
#define YY_BUFFER_APPEND Fortran_BUFFER_APPEND
#define YY_BUFFER_RESET Fortran_BUFFER_RESET
#define initialize_lexer Fortran_initialize_lexer
#include <string.h>
#include "Parser.h"
#define YY_BUFFER_LENGTH 4096
extern int yy_mylinenumber ;
char YY_PARSED_STRING[YY_BUFFER_LENGTH];
void YY_BUFFER_APPEND(char *s)
{
  strcat(YY_PARSED_STRING, s); //Do something better here!
}
void YY_BUFFER_RESET(void)
{
  int x;
  for(x = 0; x < YY_BUFFER_LENGTH; x++)
    YY_PARSED_STRING[x] = 0;
}

%}

LETTER [a-zA-Z]
CAPITAL [A-Z]
SMALL [a-z]
DIGIT [0-9]
IDENT [a-zA-Z0-9'_]
%START YYINITIAL COMMENT CHAR CHARESC CHAREND STRING ESCAPED
%%

"\n"       { ++yy_mylinenumber; return _SYMB_0; };
<YYINITIAL>"("           return _SYMB_1;
<YYINITIAL>"-"           return _SYMB_2;
<YYINITIAL>")"           return _SYMB_3;
<YYINITIAL>"*"           return _SYMB_4;
<YYINITIAL>","           return _SYMB_5;
<YYINITIAL>"="           return _SYMB_6;
<YYINITIAL>"+"           return _SYMB_7;
<YYINITIAL>"/"           return _SYMB_8;
<YYINITIAL>"$"           return _SYMB_9;
<YYINITIAL>".OR."        return _SYMB_10;
<YYINITIAL>".AND."               return _SYMB_11;
<YYINITIAL>".EQ."        return _SYMB_12;
<YYINITIAL>".NE."        return _SYMB_13;
<YYINITIAL>".LT."        return _SYMB_14;
<YYINITIAL>".GT."        return _SYMB_15;
<YYINITIAL>".LE."        return _SYMB_16;
<YYINITIAL>".GE."        return _SYMB_17;
<YYINITIAL>"**"          return _SYMB_18;
<YYINITIAL>":"           return _SYMB_19;
<YYINITIAL>".TRUE."              return _SYMB_20;
<YYINITIAL>".FALSE."             return _SYMB_21;
<YYINITIAL>".NOT."               return _SYMB_22;
<YYINITIAL>"BYTE"        return _SYMB_23;
<YYINITIAL>"CALL"        return _SYMB_24;
<YYINITIAL>"CHARACTER"           return _SYMB_25;
<YYINITIAL>"CLOSE"               return _SYMB_26;
<YYINITIAL>"COMMON"              return _SYMB_27;
<YYINITIAL>"CONTINUE"            return _SYMB_28;
<YYINITIAL>"DATA"        return _SYMB_29;
<YYINITIAL>"DIMENSION"           return _SYMB_30;
<YYINITIAL>"DO"          return _SYMB_31;
<YYINITIAL>"DOUBLE"              return _SYMB_32;
<YYINITIAL>"END"         return _SYMB_33;
<YYINITIAL>"EQUIVALENCE"         return _SYMB_34;
<YYINITIAL>"FORMAT"              return _SYMB_35;
<YYINITIAL>"FUNCTION"            return _SYMB_36;
<YYINITIAL>"GO"          return _SYMB_37;
<YYINITIAL>"IF"          return _SYMB_38;
<YYINITIAL>"IMPLICIT"            return _SYMB_39;
<YYINITIAL>"INTEGER"             return _SYMB_40;
<YYINITIAL>"LOGICAL"             return _SYMB_41;
<YYINITIAL>"OPEN"        return _SYMB_42;
<YYINITIAL>"PARAMETER"           return _SYMB_43;
<YYINITIAL>"READ"        return _SYMB_44;
<YYINITIAL>"REAL"        return _SYMB_45;
<YYINITIAL>"RETURN"              return _SYMB_46;
<YYINITIAL>"STOP"        return _SYMB_47;
<YYINITIAL>"SUBROUTINE"          return _SYMB_48;
<YYINITIAL>"TO"          return _SYMB_49;
<YYINITIAL>"WRITE"               return _SYMB_50;

<YYINITIAL>"//"[^\n]*\n     ++yy_mylinenumber;   /* BNFC single-line comment */;
<YYINITIAL>\%*{CAPITAL}({CAPITAL}|{DIGIT}|\$|\_)*        yylval.string_ = strdup(yytext); return _SYMB_51;
<YYINITIAL>'.+'          yylval.string_ = strdup(yytext); return _SYMB_52;
<YYINITIAL>{DIGIT}+\.{DIGIT}+((e|E)\-?{DIGIT}+)?(f|F)|{DIGIT}+(e|E)\-?{DIGIT}+(f|F)              yylval.string_ = strdup(yytext); return _SYMB_53;
<YYINITIAL>{DIGIT}+              yylval.int_ = atoi(yytext); return _INTEGER_;
<YYINITIAL>[ \t\r]+              /* ignore white space. */;
<YYINITIAL>.             return _ERROR_;
%%
void initialize_lexer(FILE *inp) { yyrestart(inp); BEGIN YYINITIAL; }

The Front-End (Part 1)

The front-end to my Fortran 2 C translator turned out a lot easier to create with BNFC than I was anticipating. I was expecting a lot more difficulties than actually happened. There are a few things I should mention as potential problems with BNFC that should be watched for.

First, BNFC is supposedly designed for well formed languages which I gathered from the documentation means that there should be no position dependent stuff like is typical in Fortran:

  1. Comments that start with a 'C' in the first column
  2. Continuation lines, either with a tab or 5 spaces then a continuation mark at the front of the line.
  3. Order of the Flex token matchings.

The first two were easily dispatched with a simple state based machine (source):

/*
 * Program to do some preprocessing on a Fortran file to deal with:
 *     "\nC" ==> "\n//"                   -- Comments, and
 *     "[ \t]*\n     [0-9+][ \t]*" ==> "" -- Continuation lines
 *     "[ \t]*\n\t[0-9+][ \t]*"    ==> "" -- Continuation lines
 *
 */


#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
   
#define BUF_SZ 1000

#define DEBUG false

char buf[BUF_SZ];
int bufidx=-1;
int state=0;

int CntComments=0;
int CntContinue=0;

void save(int chr){
    buf[++bufidx]=(char)chr;

    if(bufidx==BUF_SZ){
        fprintf(stderr,"ERROR: Buffer Overflow\n");
        exit(1);
    }
}

void unsave(){
    buf[bufidx--]=0;

    if(bufidx<-1){
        fprintf(stderr,"ERROR: Buffer Underflow\n");
        exit(2);
    }
}

void reset(){
    memset(buf,0,BUF_SZ);
    bufidx=-1;
    state=0;
}

void purge(){
    printf("%s",buf);
    reset();
}


void asaprintf( const char * format, ... )
{
    va_list args;
    va_start (args, format);
    if(DEBUG) vprintf (format, args);
    va_end (args);
}

void newstate(int ns){
    state=ns;
    //asaprintf("<%d>",state);
}


int main(int argc,char* argv[]){

    int chr=0;
    int idx=0;

    reset();

    state=2; // Start in state 2 because first line in file may be a comment

    while((chr=getchar())!=EOF){
        asaprintf("%6d) state=%d chr='%c'(0x%02x)\n",idx++,state,chr,chr);
        save(chr);
        if(chr==0){
            reset();
        }else{
            switch(state){
                case 0:
                    switch(chr){
                        case ' ': break;
                        case '\t': break;
                        case '\n': newstate(2); break;
                        default: purge(); break;
                    };
                    break;

                case 2:
                    switch(chr){
                        case ' ': newstate(6); break;
                        case 'C': case 'c':
                            unsave(); purge(); printf("//"); CntComments++; break;
                        case '\t': newstate(10); break;
                        default: purge(); break;
                    };
                    break;
           
                case 6:
                    switch(chr){
                        case ' ': newstate(7); break;
                        default: purge(); break;
                    };
                    break;
           
                case 7:
                    switch(chr){
                        case ' ': newstate(8); break;
                        default: purge(); break;
                    };
                    break;
           
                case 8:
                    switch(chr){
                        case ' ': newstate(9); break;
                        default: purge(); break;
                    };
                    break;
           
                case 9:
                    switch(chr){
                        case ' ': newstate(10); break;
                        default: purge(); break;
                    };
                    break;
           
                case 10:
                    switch(chr){
                        case '0':
                        case '1':
                        case '2':
                        case '3':
                        case '4':
                        case '5':
                        case '6':
                        case '7':
                        case '8':
                        case '9':
                        case '+':
                            newstate(11); break;
                        default: purge(); break;
                    };
                    break;
           
                case 11:
                    switch(chr){
                        case ' ': break;
                        case '\t': break;
                        default: reset(); putchar(chr); CntContinue++; break;
                    };
                    break;
           
            }
        }
    }
    printf("\n");

    fprintf(stderr, "Counts:\n");
    fprintf(stderr, "  Comments:      %5d\n",CntComments);
    fprintf(stderr, "  Continuations: %5d\n",CntContinue);
    return(0);
}

Dealing with the lack of access to the Fortran.l (Flex lexical analysor for the program) turned out to not as much of a problem as I had anticipated. Mostly I just adjusted to having less control over the lexor and made a little bash script to modify the lexor to use '\n' to trigger a End-of-Statement token (others suggest using a pre-processor to add some sort of line termination token at the end of each line of the source code to be translated). The other modification was to remove '\f' '\n' as white space and to fixup the broken Flex code (resulting from my inclusion of "\n" as the statement ending token in my BNFC file).

These fixups and other code to convert the LBNF (Labelled BNF) grammar, compile it and run a test program against it is as follows (source):

#!/bin/bash

#
# Script file to translate a BNFC/LBNF grammar, compile it and run the resultant
# program against a Fortran file to be translated.
#
# (Script created by alan on 21/Apr/2019 18:35:42)
#
pgm=go
tmp=/tmp/${pgm}_
bin=${HOME}/bin
log=${bin}/data/${pgm}.$(uname -n).log

pgm=${1:-Maze.for}

# Remove program binary to make sure it doesn't run if we have a problem.
rm TestFortran 2>/dev/null

# Compile the LBNF grammar in Fortran.cf into a working front-end for translator.
bnfc -m -c Fortran.cf

# Touch the lex/yacc lexical analyser and parser source files to make sure they are compiled.
touch *.y *.l 2>/dev/null

# ----
# Modify the Makefile to add debug flags so output is more verbose.
cp Makefile Makefile.old
cat Makefile \
    | sed "s/-PFortran$/-PFortran --debug/g" \
    | sed "s/-pFortran$/-pFortran --debug -r all -g/g" \
    > Makefile.new
cp Makefile.new Makefile

# Show user the difference in the Makefiles
echo "--- Makefile ---"
diff Makefile Makefile.old | sed "s/^/    /g"

# ----
# Modify the lexical analyser to make \n a statement end character (deficit in BNFC).

# The l1 file contains:
#   "\\n"       { ++yy_mylinenumber; return _SYMB_0; };
# This will trap any newlines, increment the line-number and return it as a token.
l1=$(cat l1 )
#echo "l1='$l1'"

# Do the other modifications to Fortran.l to fix the above problem.
cp Fortran.l Fortran.l.old
cat Fortran.l \
    | grep -v "^<YYINITIAL>"$" \
   | grep -v "
^..\ ++yy_mylinenumber.;$" \
   | sed "
s/^"[ \t]*return _SYMB_0;$/${l1}/g" \
    | sed "s/\\\n\\\f]/]+/g" \
    > Fortran.l.new
cp Fortran.l.new Fortran.l

# Show changes to user.
echo "--- Fortran.l ---"
diff Fortran.l Fortran.l.old | sed "s/^/    /g"

echo "--- End dofix ---"

# Make our test program (TestFortran)
make

echo "========================================="

# Use state machine program to correct two problem features of Fortran.
#   Fortran C-comments need to be changed to C-style line comments:
#     "\nC" ==> "\n//"                   -- Comments, and
#   Continuation lines need to be merged together.
#     "[ \t]*\n     [0-9+][ \t]*" ==> "" -- Continuation lines
#     "[ \t]*\n\t[0-9+][ \t]*"    ==> "" -- Continuation lines
#
./fixup <${pgm} >${tmp}for

# Run the complete program
./TestFortran <${tmp}for


#
# end of 'go' script file.
#

Mostly I studied the 'C' BNFC/LBNF grammar from the BNFC website and then created my own grammar.

Starting with the Name token (whos format is particular to to Fortran and more so Vax Fortran) and started to build my grammar from the Program definition.

The program definition is just a list of statements (either numbered or not). I'd run my 'go' script above. It would tell me the line in my Fortran source file where the error occurred and the last tokenizing rule (line number in the auto generated Fortran.l file) that was accepted.

From this I could determine which token was triggering the error and thus where my grammar was wrong. Finally I came up with the following LBNF grammar which seemed to lex/parse all my example Fortran programs without problem (source):

--
-- Fortran LBNF grammar (Fortran.cf) to recognize a Fortran 66/IV program.
--
-- Created by Alan Angold 2019-04-23
--


entrypoints Program, LblStm ;



-- Tokens ----------------------------------------------------------------------

position token Name ( '%' )* upper ( upper | digit | '$' | '_' )* ;

position token SQString '\'' ( char )+ '\'';


position token CFloat ((digit+ '.' digit+)(('e'|'E')('-')? digit+)?
                               ('f'|'F'))|((digit+ ('e'|'E')('-')? digit+)('f'|'F'));


-- Tokens ----------------------------------------------------------------------




Progr.  Program ::= [ LblStm ] ;


[].      [LblStm] ::= ;
(:).     [LblStm] ::= LblStm "\n" [LblStm];

SLabel.   LblStm ::= Labeled_stm ;
SSimple.  LblStm ::= Simple_stm ;
SNill.    LblStm ::= ;

SLabelOne.   Labeled_stm ::= Integer Simple_stm ;

-- Simple_stm ------------------------------------------------------------------
SImplicit. Simple_stm ::= "IMPLICIT" Type_Spec Type_Qual  "(" Name "-" Name ")" ;
QType.     Type_Qual ::= "*" Integer ;

-- Simple_stm ------------------------------------------------------------------
SParameter. Simple_stm ::= "PARAMETER" [NameValue];

(:[]).   [NameValue] ::= NameValue ;
(:).     [NameValue] ::= NameValue "," [NameValue];

NVPair.  NameValue ::= Name "=" Integer ;

-- Simple_stm ------------------------------------------------------------------
SDiment.  Simple_stm ::= "DIMENSION" [ NameDim ] ;

(:[]).   [NameDim] ::= NameDim ;
(:).     [NameDim] ::= NameDim "," [NameDim];

PNameDim. NameDim ::= Name "(" [DExp] ")" ;
PNameDim2. NameDim ::= Name ;

(:[]).   [DExp] ::= DExp ;
(:).     [DExp] ::= DExp "," [DExp];

EDplus.       DExp  ::= DExp "+" DExp1;
EDminus.      DExp  ::= DExp "-" DExp1;
EDtimes.      DExp1 ::= DExp1 "*" DExp2;
EDdiv.        DExp1 ::= DExp1 "/" DExp2;
_.            DExp  ::= DExp1 ;
_.            DExp1 ::= DExp2 ;
_.            DExp2 ::= "(" DExp ")" ;
EDInt.        DExp2 ::= Integer;
EDName.      DExp2 ::= Name;


-- Simple_stm ------------------------------------------------------------------
SDeclQual. Simple_stm ::= Type_Spec Type_Qual [NameDim] ;
SDecl.     Simple_stm ::= Type_Spec [NameDim] ;



-- Simple_stm ------------------------------------------------------------------
SData.   Simple_stm ::= "DATA" [DataSeg];

(:[]).   [DataSeg] ::= DataSeg ;
(:).     [DataSeg] ::= DataSeg "," [DataSeg];

PDSeg.   DataSeg ::= [Vars] "/" [DataVal] "/" ;

(:[]).   [Vars] ::= Vars ;
(:).     [Vars] ::= Vars "," [Vars];

PVars.   Vars ::= Name ;

(:[]).   [DataVal] ::= DataVal ;
(:).     [DataVal] ::= DataVal "," [DataVal];

PDValPls. DataVal ::= "+" DataValType ;
PDValNeg. DataVal ::= "-" DataValType ;
PDValNil. DataVal ::= DataValType ;

PDVInt.   DataValType ::= Integer ;
PDVFloat. DataValType ::= CFloat ;
PDVChar.  DataValType ::= SQString ;


-- Simple_stm ------------------------------------------------------------------
SCommon.  Simple_stm ::= "COMMON" "/" Name "/" [Name] ;

(:[]).   [Name] ::= Name ;
(:).     [Name] ::= Name "," [Name];


-- Simple_stm ------------------------------------------------------------------
SWrtEmp. Simple_stm ::= "WRITE" "(" [AssignName] ")" ;
SWrite.  Simple_stm ::= "WRITE" "(" [AssignName] ")" [NameOrArray] ;

SFormat. Simple_stm ::= "FORMAT" "(" [FmtSpecs] ")" ;

(:[]).   [FmtSpecs] ::= FmtSpecs ;
(:).     [FmtSpecs] ::= FmtSpecs "," [FmtSpecs];

FSString. FmtSpecs ::= SQString ;
FSName.   FmtSpecs ::= Name ;
FSINNL.   FmtSpecs ::= "$";
FSSlash.  FmtSpecs ::= "/";



-- Simple_stm ------------------------------------------------------------------
SRead.      Simple_stm ::= "READ" "(" [AssignName] ")" [NameOrArray] ;
SAsignRead. Simple_stm ::= "READ" "=" LExp;

(:[]).   [NameOrArray] ::= NameOrArray ;
(:).     [NameOrArray] ::= NameOrArray "," [NameOrArray];


PNALName. NameOrArray ::= Name ;
PNALArry. NameOrArray ::= "(" Name "(" [Name] ")" "," DoRangePart ")" ;


-- Simple_stm ------------------------------------------------------------------
SIf.    Simple_stm ::= "IF" "(" LExp ")" IfThenPart;

PIfGoto.    IfThenPart ::= "GO" "TO" Integer ;
PIfAsgn.    IfThenPart ::= Name "=" LExp;
PIFAsnArr.  IfThenPart ::= Name "(" [LExp] ")" "=" LExp ;
PIfRetn.    IfThenPart ::= "RETURN" ;
PIfCall.    IfThenPart ::= "CALL" Name "(" [SpecLExp] ")" ;
PIfCallNil. IfThenPart ::= "CALL" Name  ;

Elor.        LExp  ::= LExp ".OR." LExp2;
Eland.       LExp  ::= LExp ".AND." LExp2;
Eeq.         LExp2 ::= LExp2 ".EQ." LExp3;
Eneq.        LExp2 ::= LExp2 ".NE." LExp3;
Elthen.      LExp3 ::= LExp3 ".LT." LExp4;
Egrthen.     LExp3 ::= LExp3 ".GT." LExp4;
Ele.         LExp3 ::= LExp3 ".LE." LExp4;
Ege.         LExp3 ::= LExp3 ".GE." LExp4;
Eplus.       LExp4 ::= LExp4 "+" LExp5;
Eminus.      LExp4 ::= LExp4 "-" LExp5;
Etimes.      LExp5 ::= LExp5 "*" LExp6;
Ediv.        LExp5 ::= LExp5 "/" LExp6;
Epreop.      LExp6 ::= Unary_operator LExp7;
Epower.      LExp8 ::= LExp5 "**" LExp8;
Efunk.       LExp8 ::= LExp8 "(" ")";
Efunkpar.    LExp8 ::= LExp8 "(" [SpecLExp] ")";
Evar.        LExp9 ::= TIntVar RangePart ;
Estr.        LExp9 ::= SQString ;

ERangeNull. RangePart ::= ;
ERange.     RangePart ::= ":" TIntVar ;

ETInt.       TIntVar ::= Integer;
ETTrue.      TIntVar ::= ".TRUE.";
ETFalse.     TIntVar ::= ".FALSE.";
ETNameVar.   TIntVar ::= Name;
ETRead.      TIntVar ::= "READ";

(:[]).   [LExp] ::= LExp ;
(:).     [LExp] ::= LExp "," [LExp];

_. LExp   ::= LExp2 ;
_. LExp2  ::= LExp3 ;
_. LExp3  ::= LExp4 ;
_. LExp4  ::= LExp5 ;
_. LExp5  ::= LExp6 ;
_. LExp6  ::= LExp7 ;
_. LExp7  ::= LExp8 ;
_. LExp8  ::= LExp9 ;
_. LExp9  ::= LExp10 ;
_. LExp10 ::= LExp11 ;
_. LExp11 ::= "(" LExp ")" ;

OUnaryPlus.   Unary_operator ::= "+" ;
OUnaryMinus.  Unary_operator ::= "-" ;
OUnaryNot.    Unary_operator ::= ".NOT." ;


-- Simple_stm ------------------------------------------------------------------
SAssign.    Simple_stm ::= Name "=" LExp;
SAsnArr.    Simple_stm ::= Name "(" [LExp] ")" "=" LExp ;


-- Simple_stm ------------------------------------------------------------------
SFunCall.    Simple_stm ::= "CALL" Name "(" [SpecLExp] ")" ;
SFunCallNil. Simple_stm ::= "CALL" Name  ;

(:[]).   [SpecLExp] ::= SpecLExp ;
(:).     [SpecLExp] ::= SpecLExp "," [SpecLExp];

SpLExpNil. SpecLExp ::= ;
SpLExpNot. SpecLExp ::= LExp;



-- Simple_stm ------------------------------------------------------------------
SGoto.     Simple_stm ::= "GO" "TO" Integer ;


-- Simple_stm ------------------------------------------------------------------
SOpen.    Simple_stm ::= "OPEN" "(" [AssignName] ")" ;

(:[]).    [AssignName] ::= AssignName ;
(:).      [AssignName] ::= AssignName "," [AssignName];

PAsgnNm.  AssignName ::= Name ;
PAsgnInt. AssignName ::= Integer ;
PAssign.  AssignName ::= Name "=" LExp;

SClose.   Simple_stm ::= "CLOSE" "(" [AssignName] ")" ;

-- Simple_stm ------------------------------------------------------------------
SDo.      Simple_stm ::= "DO" Integer DoRangePart ;

PDoRange. DoRangePart ::= Name "=" LExp "," LExp ;


-- Simple_stm ------------------------------------------------------------------
SStop.    Simple_stm ::= "STOP" ;
SStopMsg. Simple_stm ::= "STOP" SQString ;


-- Simple_stm ------------------------------------------------------------------
SEnd.     Simple_stm ::= "END" ;


-- Simple_stm ------------------------------------------------------------------
SSubr.    Simple_stm ::= "SUBROUTINE" Name "(" [SpecLExp] ")" ;
SSubrNil. Simple_stm ::= "SUBROUTINE" Name  ;

SFunct.    Simple_stm ::= "FUNCTION" Name "(" [SpecLExp] ")" ;
SFunctNil. Simple_stm ::= "FUNCTION" Name  ;


-- Simple_stm ------------------------------------------------------------------
SContinue.  Simple_stm ::= "CONTINUE" ;


-- Simple_stm ------------------------------------------------------------------
SReturn.  Simple_stm ::= "RETURN" ;


-- Simple_stm ------------------------------------------------------------------
SEquiv.   Simple_stm ::= "EQUIVALENCE" "(" Name "," NameOrArrRef ")" ;

PNOAName. NameOrArrRef ::= Name ;
PNOAArr. NameOrArrRef ::= Name "(" [LExp] ")" ;


-- Simple_stm ------------------------------------------------------------------

TInt.    Type_Spec ::= "INTEGER" ;
TFloat.  Type_Spec ::= "REAL" ;
TDouble. Type_Spec ::= "DOUBLE" ;
TChar.   Type_Spec ::= "CHARACTER" ;
TByte.   Type_Spec ::= "BYTE" ;
TLogi.   Type_Spec ::= "LOGICAL" ;

comment "//" ;

The program seemed to successfully lex and parse all the Fortran-66 source code I had handy but the TestFortran program failed (seg fault) when it came to printing out the AST (showProgram(parse_tree) or printProgram(parse_tree) ). I suspect these are just due to some null pointer problems in the AST and once I figure out my own AST tree crawler I should be able to figure these out.