coins.ffront
Class F77Scanner

java.lang.Object
  extended bycoins.ffront.Scanner
      extended bycoins.ffront.F77Scanner
All Implemented Interfaces:
Parser.yyInput

public class F77Scanner
extends Scanner


Field Summary
(package private)  IoRoot io_
           
(package private)  java.lang.String[] reserved_words
           
(package private)  java.lang.String[] reserved_words_io
           
(package private)  java.lang.String[] reserved_words_of_types
           
(package private)  java.lang.String[] reserved_words_use_with_types
           
(package private)  java.lang.String[] reserved_words2
           
 
Fields inherited from class coins.ffront.Scanner
FORMAT, FORMAT_H, lineNo, value, YYEOF, YYINITIAL
 
Constructor Summary
F77Scanner(java.io.InputStream in, IoRoot io)
           
F77Scanner(java.io.Reader in, IoRoot io)
          Constructer : Wrapper of Scanner class
 
Method Summary
protected  void dp(java.lang.String msg)
           
protected  java.lang.String erase_whitespaces(java.lang.String str)
           
protected  byte[] f77pp(java.io.Reader rin)
          preprocessor of Fortran 77 file
protected  int get_close_paren_pos(java.lang.String str)
          def(ghi)jk) ^ return this position
(package private)  java.lang.String get_next_fortran_line(java.io.BufferedReader in)
           
protected  java.lang.String is_arith_if(java.lang.String str)
           
protected  java.lang.String is_assign_stmt(java.lang.String str)
          N=X or ASSIGN(X=Y) '=' is not surrounded by paren (X=Y) is not assign statement
protected  java.lang.String is_do_stmt(java.lang.String str)
          DO L,cond,step
protected  java.lang.String is_goto_stmt(java.lang.String str)
          GOTO => GOTO N COMP_GOTO => GOTO (L,M,N) T ASSIGN_GOTO => GOTO NAME (L,M,N)
protected  java.lang.String is_if_stmt(java.lang.String str)
          block if => IF (cond) THEN arith if => IF (cond) L1,L2,L3 logic if => IF (cond) exp goto if
protected  java.lang.String is_stmt(java.lang.String str)
           
protected  java.lang.String is_typed_stmt(java.lang.String str)
          ex) TYPE INTEGER X,Y TYPE INTEGER FUNCTION X() TYPE *num FUNCTION X(..)
static void main(java.lang.String[] str)
           
protected  java.lang.String set_syntax(java.lang.String str)
           
 
Methods inherited from class coins.ffront.Scanner
advance, token, value, yybegin, yycharat, yyclose, yylength, yylex, yypushback, yyreset, yystate, yytext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

io_

IoRoot io_

reserved_words_of_types

final java.lang.String[] reserved_words_of_types

reserved_words_use_with_types

final java.lang.String[] reserved_words_use_with_types

reserved_words

final java.lang.String[] reserved_words

reserved_words_io

final java.lang.String[] reserved_words_io

reserved_words2

final java.lang.String[] reserved_words2
Constructor Detail

F77Scanner

public F77Scanner(java.io.Reader in,
                  IoRoot io)
           throws java.io.IOException,
                  java.lang.Exception
Constructer : Wrapper of Scanner class


F77Scanner

public F77Scanner(java.io.InputStream in,
                  IoRoot io)
           throws java.io.IOException,
                  java.lang.Exception
Method Detail

dp

protected void dp(java.lang.String msg)
Overrides:
dp in class Scanner

f77pp

protected byte[] f77pp(java.io.Reader rin)
                throws java.io.IOException,
                       java.lang.Exception
preprocessor of Fortran 77 file

Throws:
java.io.IOException
java.lang.Exception

get_next_fortran_line

java.lang.String get_next_fortran_line(java.io.BufferedReader in)
                                 throws java.io.IOException,
                                        java.lang.Exception
Throws:
java.io.IOException
java.lang.Exception

is_assign_stmt

protected java.lang.String is_assign_stmt(java.lang.String str)
                                   throws java.lang.Exception
N=X or ASSIGN(X=Y) '=' is not surrounded by paren (X=Y) is not assign statement

Throws:
java.lang.Exception

is_typed_stmt

protected java.lang.String is_typed_stmt(java.lang.String str)
ex) TYPE INTEGER X,Y TYPE INTEGER FUNCTION X() TYPE *num FUNCTION X(..)


is_stmt

protected java.lang.String is_stmt(java.lang.String str)

get_close_paren_pos

protected int get_close_paren_pos(java.lang.String str)
                           throws java.lang.Exception
def(ghi)jk) ^ return this position

Throws:
java.lang.Exception

is_arith_if

protected java.lang.String is_arith_if(java.lang.String str)
                                throws java.lang.Exception
Throws:
java.lang.Exception

is_if_stmt

protected java.lang.String is_if_stmt(java.lang.String str)
                               throws java.lang.Exception
block if => IF (cond) THEN arith if => IF (cond) L1,L2,L3 logic if => IF (cond) exp goto if

Throws:
java.lang.Exception

is_goto_stmt

protected java.lang.String is_goto_stmt(java.lang.String str)
GOTO => GOTO N COMP_GOTO => GOTO (L,M,N) T ASSIGN_GOTO => GOTO NAME (L,M,N)


is_do_stmt

protected java.lang.String is_do_stmt(java.lang.String str)
DO L,cond,step


erase_whitespaces

protected java.lang.String erase_whitespaces(java.lang.String str)

set_syntax

protected java.lang.String set_syntax(java.lang.String str)
                               throws java.lang.Exception
Throws:
java.lang.Exception

main

public static void main(java.lang.String[] str)
                 throws java.io.FileNotFoundException,
                        java.io.IOException,
                        java.lang.Exception
Throws:
java.io.FileNotFoundException
java.io.IOException
java.lang.Exception