public class RemusParser extends Parser
cfgInstance, dictionary, numRules, parseTree, ruleSet
Constructor and Description |
---|
RemusParser(File inFile)
Creates a new instance of RemusParser
|
RemusParser(InputStream inStream)
Creates a new instance of RemusParser
|
RemusParser(String fileName)
Creates a new instance of RemusParser
|
Modifier and Type | Method and Description |
---|---|
protected void |
generateRuleSet()
Generates the array of production rules that define the CFG
|
static void |
main(String[] args)
Main method for testing of parser
|
applyRules, getToken, parse, run
public RemusParser(String fileName) throws FileNotFoundException
fileName
- path to the file to be parsedFileNotFoundException
public RemusParser(File inFile) throws FileNotFoundException
inFile
- File object from which context free grammar instance is to be readFileNotFoundException
public RemusParser(InputStream inStream)
inStream
- InputStream from which context free grammar instance is to be readprotected void generateRuleSet()
generateRuleSet
in class Parser
public static void main(String[] args)
args
- the command line arguments