N88 (automaton) BASIC そのに

eof = is EOF
ins = in '\s\t\r\n'
inc = in '()'
inw = _

@automaton lisplex in :: buf<[char]> out :: buf<[char]>:
  @local cbuf :: buf<char>

  @template nopq:
    enter:
      nop
    exit:
      nop

  @template cbufq:
    enter:
      cbuf <- EOF
    exit:
      out << cbuf

  @entry space < nopq:
    c <- in
    case c of
      eof => exit
      ins => continue
      inc => exitto closure
      inw => exitto word

  closure < cbufq:
    exitto space

  word < cbufq:
    c <- in
    case c of
      eof => exit
      ins => exitto space
      inc => exitto closure
      inw => cbuf <- c, continue

うん.ただのカオスだ.