|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object scale.frontend.Parser
public abstract class Parser
This is the base class for all source code parsers.
$Id: Parser.java,v 1.9 2007-09-20 18:49:42 burrill Exp $
Copyright 2008 by the
Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
Field Summary | |
---|---|
protected java.lang.String |
extension
|
protected Scale |
top
|
Constructor Summary | |
---|---|
Parser(Scale top,
java.lang.String extension)
|
Method Summary | |
---|---|
static Parser |
getParser(java.lang.String filename,
Scale top)
Return the parser to use for the specified file. |
abstract SourceLanguage |
getSourceLanguage()
Return the correct source langauge instance for this parser. |
abstract CallGraph |
parse(java.lang.String name,
Suite suite,
Vector<java.lang.String> macroText)
Parse the specified file. |
static void |
runPreprocessor(java.io.PrintStream out,
java.lang.String filename,
Scale top)
Return the reader to use for the specified file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Scale top
protected java.lang.String extension
Constructor Detail |
---|
public Parser(Scale top, java.lang.String extension)
Method Detail |
---|
public abstract 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.
name
- the name of the Clef AST (i.e., the file name)suite
- is the collection of call graphsmacroText
- is null
or is used to collect macro
definitions as text strings
public static Parser getParser(java.lang.String filename, Scale top)
public static void runPreprocessor(java.io.PrintStream out, java.lang.String filename, Scale top) throws java.io.IOException
java.io.IOException
public abstract SourceLanguage getSourceLanguage()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |