
lex.c  study for rz35

mylex
  skipblank
  if eof return 
  if token return
  switch CH
    letter: while isletterordigit
              getc
            copytoken
            return ID
     digit: while isdigit
              getc
            copytoken
            return NUM
     quote: do
              getc
              if \n doline
            while not quote 
            copytoken
            return STRING

skipblank
  loop
    while blank
      if \n doline
      getc
    skipcomment

doline
  line++

getc

27 Aug 2011

                