Rz scanner processor, using indent as block

use indentation to replace { } and \n for ;
it reduces the number of lines
similar to Som

when there is an input token
  if colstack is empty pushcol out token return
  if old line out token return
  else new line
    pushcol
    if new == old popcol out token return
    if new > old out { out token return
    while new < old
      out }  popcol
    out token return

one can assume there is one col in colstack and 
the first line can be eliminated.

26 Aug 2011

other things that I improve the code

1. get rid of "unget" by using one char look ahead (at "skipblank")

new:

  // check comment, *cp lookahead one char
  if( CH != '/' || *cp != '/' ) break;

old:

  if( CH != '/' ) break;
  getC();
  if( CH != '/' ) { unget(); break; }

2.  simplify logic in "mylex".  now there are only two states (new/old) instead of four (as in Som lex).

3.  extend "mylex" to use \n as ";"

28 Aug 2011


version 3.5  contains bug concerning the static array, another bug involves logical and/or.  Both are fixed in the update.

4 Sept 2011


	


      