coins.ffront
Class Parser

java.lang.Object
  extended bycoins.ffront.Parser

public class Parser
extends java.lang.Object


Nested Class Summary
protected static class Parser.YyCheckClass
           
protected static class Parser.YyDefRedClass
           
protected static class Parser.YyDgotoClass
           
static class Parser.yyException
          thrown for irrecoverable syntax errors and stack overflow.
protected static class Parser.YyGindexClass
           
static interface Parser.yyInput
          must be implemented by a scanner object to supply input to the parser.
protected static class Parser.YyLenClass
           
protected static class Parser.YyLhsClass
           
protected static class Parser.YyNameClass
           
protected static class Parser.YyRindexClass
           
protected static class Parser.YySindexClass
           
protected static class Parser.YyTableClass
           
 
Field Summary
static int AND
           
static int ARITH_IF
           
static int ASSIGN
           
static int ASSIGN_GOTO
           
static int BACKSPACE
           
static int BLOCKDATA
           
static int CALL
           
static int CHAR_CONST
           
static int CHARACTER
           
static int CLOSE
           
static int COMMON
           
static int COMP_GOTO
           
static int COMPLEX
           
static int CONTINUE
           
static int DATA
           
static int DIMENSION
           
static int DO
           
static int DOUBLE_CONST
           
static int DOUBLE_PREC
           
static int DOUBLE_SLASH
           
static int ELSE
           
static int ELSE_IF
           
static int END
           
static int END_DO
           
static int END_FILE
           
static int END_IF
           
static int ENTRY
           
static int EOS
           
static int EQUAL
           
static int EQUIVALENCE
           
static int EQV
           
static int EXTERNAL
           
static int FALSE_CONST
           
(package private)  F77Hir fHir
           
static int FORMAT
           
static int FORMAT_SPECIFICATION
           
(package private)  F77Sym fSym
           
static int FUNCTION
           
static int GOTO
           
static int GREATER_OR_EQUAL
           
static int GREATER_THAN
           
static int IDENT
           
static int IF
           
static int IMPLICIT
           
static int INQUIRE
           
static int INT_CONST
           
static int INTEGER
           
static int INTRINSIC
           
static int LABEL
           
static int LABEL_DEF
           
static int LESS_OR_EQUAL
           
static int LESS_THAN
           
static int LET
           
static int LOGICAL
           
static int NEQV
           
static int NO_LABEL
           
static int NOT
           
static int NOT_EQUAL
           
static int OPEN
           
static int OR
           
static int PARAM
           
static int PAUSE
           
static int POWER
           
static int PRINT
           
static int PROGRAM
           
static int READ
           
static int REAL
           
static int REAL_CONST
           
static int RETURN
           
static int REWIND
           
static int SAVE
           
static int STOP
           
static int SUBROUTINE
           
static int THEN
           
static int TO
           
static int TRUE_CONST
           
static int UMINUS
           
static int UPLUS
           
static int WRITE
           
static int yyErrorCode
           
protected static int yyFinal
          debugging support, requires the package jay.yydebug.
(package private)  Scanner yyLex
           
protected  int yyMax
          initial size and increment of the state/value stack [default 256].
 
Constructor Summary
Parser(SymRoot sRoot, HirRoot hRoot, IoRoot iRoot, Scanner lexer)
           
 
Method Summary
 F77Hir getHir()
           
protected  java.lang.Object yyDefault(java.lang.Object first)
          executed at the beginning of a reduce action.
 void yyerror(java.lang.String message)
          simplified error message.
 void yyerror(java.lang.String message, java.lang.String[] expected)
          (syntax) error message.
protected  java.lang.String[] yyExpecting(int state)
          computes list of expected tokens on error by tracing the tables.
 java.lang.Object yyparse(Parser.yyInput yyLex)
          the generated parser.
 java.lang.Object yyparse(Parser.yyInput yyLex, java.lang.Object yydebug)
          the generated parser, with debugging messages.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fHir

F77Hir fHir

fSym

F77Sym fSym

yyLex

Scanner yyLex

REAL_CONST

public static final int REAL_CONST
See Also:
Constant Field Values

CHAR_CONST

public static final int CHAR_CONST
See Also:
Constant Field Values

INT_CONST

public static final int INT_CONST
See Also:
Constant Field Values

DOUBLE_CONST

public static final int DOUBLE_CONST
See Also:
Constant Field Values

IDENT

public static final int IDENT
See Also:
Constant Field Values

LABEL_DEF

public static final int LABEL_DEF
See Also:
Constant Field Values

LABEL

public static final int LABEL
See Also:
Constant Field Values

EOS

public static final int EOS
See Also:
Constant Field Values

NO_LABEL

public static final int NO_LABEL
See Also:
Constant Field Values

TRUE_CONST

public static final int TRUE_CONST
See Also:
Constant Field Values

FALSE_CONST

public static final int FALSE_CONST
See Also:
Constant Field Values

INTEGER

public static final int INTEGER
See Also:
Constant Field Values

REAL

public static final int REAL
See Also:
Constant Field Values

COMPLEX

public static final int COMPLEX
See Also:
Constant Field Values

DOUBLE_PREC

public static final int DOUBLE_PREC
See Also:
Constant Field Values

LOGICAL

public static final int LOGICAL
See Also:
Constant Field Values

CHARACTER

public static final int CHARACTER
See Also:
Constant Field Values

PARAM

public static final int PARAM
See Also:
Constant Field Values

LET

public static final int LET
See Also:
Constant Field Values

ARITH_IF

public static final int ARITH_IF
See Also:
Constant Field Values

IF

public static final int IF
See Also:
Constant Field Values

ASSIGN

public static final int ASSIGN
See Also:
Constant Field Values

BLOCKDATA

public static final int BLOCKDATA
See Also:
Constant Field Values

CALL

public static final int CALL
See Also:
Constant Field Values

CLOSE

public static final int CLOSE
See Also:
Constant Field Values

COMMON

public static final int COMMON
See Also:
Constant Field Values

CONTINUE

public static final int CONTINUE
See Also:
Constant Field Values

DATA

public static final int DATA
See Also:
Constant Field Values

DIMENSION

public static final int DIMENSION
See Also:
Constant Field Values

DO

public static final int DO
See Also:
Constant Field Values

END_DO

public static final int END_DO
See Also:
Constant Field Values

ELSE

public static final int ELSE
See Also:
Constant Field Values

ELSE_IF

public static final int ELSE_IF
See Also:
Constant Field Values

END

public static final int END
See Also:
Constant Field Values

END_FILE

public static final int END_FILE
See Also:
Constant Field Values

END_IF

public static final int END_IF
See Also:
Constant Field Values

ENTRY

public static final int ENTRY
See Also:
Constant Field Values

EQUIVALENCE

public static final int EQUIVALENCE
See Also:
Constant Field Values

EXTERNAL

public static final int EXTERNAL
See Also:
Constant Field Values

FORMAT

public static final int FORMAT
See Also:
Constant Field Values

FUNCTION

public static final int FUNCTION
See Also:
Constant Field Values

GOTO

public static final int GOTO
See Also:
Constant Field Values

ASSIGN_GOTO

public static final int ASSIGN_GOTO
See Also:
Constant Field Values

COMP_GOTO

public static final int COMP_GOTO
See Also:
Constant Field Values

IMPLICIT

public static final int IMPLICIT
See Also:
Constant Field Values

INTRINSIC

public static final int INTRINSIC
See Also:
Constant Field Values

PAUSE

public static final int PAUSE
See Also:
Constant Field Values

PRINT

public static final int PRINT
See Also:
Constant Field Values

PROGRAM

public static final int PROGRAM
See Also:
Constant Field Values

READ

public static final int READ
See Also:
Constant Field Values

RETURN

public static final int RETURN
See Also:
Constant Field Values

SAVE

public static final int SAVE
See Also:
Constant Field Values

STOP

public static final int STOP
See Also:
Constant Field Values

SUBROUTINE

public static final int SUBROUTINE
See Also:
Constant Field Values

THEN

public static final int THEN
See Also:
Constant Field Values

TO

public static final int TO
See Also:
Constant Field Values

WRITE

public static final int WRITE
See Also:
Constant Field Values

OPEN

public static final int OPEN
See Also:
Constant Field Values

INQUIRE

public static final int INQUIRE
See Also:
Constant Field Values

BACKSPACE

public static final int BACKSPACE
See Also:
Constant Field Values

REWIND

public static final int REWIND
See Also:
Constant Field Values

AND

public static final int AND
See Also:
Constant Field Values

OR

public static final int OR
See Also:
Constant Field Values

NEQV

public static final int NEQV
See Also:
Constant Field Values

EQV

public static final int EQV
See Also:
Constant Field Values

NOT

public static final int NOT
See Also:
Constant Field Values

EQUAL

public static final int EQUAL
See Also:
Constant Field Values

LESS_THAN

public static final int LESS_THAN
See Also:
Constant Field Values

GREATER_THAN

public static final int GREATER_THAN
See Also:
Constant Field Values

LESS_OR_EQUAL

public static final int LESS_OR_EQUAL
See Also:
Constant Field Values

GREATER_OR_EQUAL

public static final int GREATER_OR_EQUAL
See Also:
Constant Field Values

NOT_EQUAL

public static final int NOT_EQUAL
See Also:
Constant Field Values

POWER

public static final int POWER
See Also:
Constant Field Values

DOUBLE_SLASH

public static final int DOUBLE_SLASH
See Also:
Constant Field Values

FORMAT_SPECIFICATION

public static final int FORMAT_SPECIFICATION
See Also:
Constant Field Values

UMINUS

public static final int UMINUS
See Also:
Constant Field Values

UPLUS

public static final int UPLUS
See Also:
Constant Field Values

yyErrorCode

public static final int yyErrorCode
See Also:
Constant Field Values

yyFinal

protected static final int yyFinal
debugging support, requires the package jay.yydebug. Set to null to suppress debugging messages.

See Also:
Constant Field Values

yyMax

protected int yyMax
initial size and increment of the state/value stack [default 256]. This is not final so that it can be overwritten outside of invocations of yyparse().

Constructor Detail

Parser

public Parser(SymRoot sRoot,
              HirRoot hRoot,
              IoRoot iRoot,
              Scanner lexer)
Method Detail

getHir

public F77Hir getHir()

yyerror

public void yyerror(java.lang.String message)
simplified error message.

See Also:
yyerror

yyerror

public void yyerror(java.lang.String message,
                    java.lang.String[] expected)
(syntax) error message. Can be overwritten to control message format.

Parameters:
message - text to be displayed.
expected - vector of acceptable tokens, if available.

yyExpecting

protected java.lang.String[] yyExpecting(int state)
computes list of expected tokens on error by tracing the tables.

Parameters:
state - for which to compute the list.
Returns:
list of token names.

yyparse

public java.lang.Object yyparse(Parser.yyInput yyLex,
                                java.lang.Object yydebug)
                         throws java.io.IOException,
                                Parser.yyException
the generated parser, with debugging messages. Maintains a state and a value stack, currently with fixed maximum size.

Parameters:
yyLex - scanner.
yydebug - debug message writer implementing yyDebug, or null.
Returns:
result of the last reduction, if any.
Throws:
Parser.yyException - on irrecoverable parse error.
java.io.IOException

yyDefault

protected java.lang.Object yyDefault(java.lang.Object first)
executed at the beginning of a reduce action. Used as $$ = yyDefault($1), prior to the user-specified action, if any. Can be overwritten to provide deep copy, etc.

Parameters:
first - value for $1, or null.
Returns:
first.

yyparse

public java.lang.Object yyparse(Parser.yyInput yyLex)
                         throws java.io.IOException,
                                Parser.yyException
the generated parser. Maintains a state and a value stack, currently with fixed maximum size.

Parameters:
yyLex - scanner.
Returns:
result of the last reduction, if any.
Throws:
Parser.yyException - on irrecoverable parse error.
java.io.IOException