|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object scale.frontend.Parser scale.frontend.fortran.F95
public class F95
This is the parser for the F95 version of CFortran, including f77, f90, and f95.
$Id: F95.java,v 1.80 2007-10-17 13:39:58 burrill Exp $
Copyright 2008 by the
Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
While the name of the class is F95, it currently only implements the F77 standard.
.f90
or .f95
, free-form input is assumed.
Otherwise, fixed-form input is assumed. (Free-form input has not
been tested.) In fixed-form input, all blanks are eliminated and
all alphabetical characters are converted to lower case, before
syntactical scanning is performed.
null
) that the
scan was not successful and resets the scan to the point at which
it started. If the method has scanned far enough to know that it
is scanning the appropriate construct and encounters something that
does not conform, it throws an InvalidException
. For
example, consider the following statement:
COMMON/abcx,y,zThe
nextCommonStmt
method knows that this is a COMMON
statement once the '/' has been encountered. Thus, it throws an
exception when the ',' is encountered. For
DO10J=1,Nthe
nextAssignmentStmt
method returns
null
when the comma is encountered.
Field Summary | |
---|---|
static java.lang.String |
blankCommonName
The name of blank common. |
static boolean |
classTrace
|
static int |
F77
Allow F77 features. |
static int |
F90
Allow F90 features. |
static int |
F95
Allow F96 features. |
static boolean |
fullError
|
Fields inherited from class scale.frontend.Parser |
---|
extension, top |
Constructor Summary | |
---|---|
F95(Scale top,
java.lang.String extension)
|
Method Summary | |
---|---|
void |
callback(int callback,
Expression exp,
BlockStmt bs)
Called by ImpliedDo to generate code for implied-do loops. |
protected VariableDecl |
genTemp(Type t)
Create a new temporary variable for use by the optimized code. |
SourceLanguage |
getSourceLanguage()
Return the correct source langauge instance for this parser. |
protected int |
getStringLength(Type type)
Return the Fortran CHARACTER type length or -1 if it is not a Fortran CHARACTER type. |
CallGraph |
parse(java.lang.String name,
Suite suite,
Vector<java.lang.String> macroText)
Parse the specified Fortran file. |
void |
setColumn(int column)
Set the source line scan position. |
Methods inherited from class scale.frontend.Parser |
---|
getParser, runPreprocessor |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static boolean classTrace
public static boolean fullError
public static final int F77
public static final int F90
public static final int F95
public static final java.lang.String blankCommonName
Constructor Detail |
---|
public F95(Scale top, java.lang.String extension)
top
- specifies the top level class of the compilerextension
- specifies the file extension of the file to be parsedMethod Detail |
---|
public SourceLanguage getSourceLanguage()
getSourceLanguage
in class Parser
protected VariableDecl genTemp(Type t)
public CallGraph parse(java.lang.String name, Suite suite, Vector<java.lang.String> macroText)
macroText
is not
null
, the set of defined macros is added to it.
parse
in class Parser
name
- the name of the Clef AST (i.e., the file name)suite
- is the collection of call graphsmacroText
- is null
or has macro definitions as
text added
protected int getStringLength(Type type)
public final void setColumn(int column)
Keywords
public void callback(int callback, Expression exp, BlockStmt bs) throws InvalidException
InvalidException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |