java_cup.anttask

Class CUPTask


public class CUPTask
extends Task

java_cup.anttask.CUPTask.java
Author:
Michael Petter, 2003 Ant-Task for CUP Parser Generator for Java -- tested with Ant 1.5.1; -- compiles with javac -classpath .:${ANT_HOME}/lib/ant.jar java_cup.anttask.CUPTask.java -- overrides org.apache.tools.ant.taskdefs.Java -- providing cool interface to CUP -- mapping all existing parameters to attributes -- trys to add new useful features to CUP, like - automatic package discovery - re-generate .java only when necessary - possibility to generate into a dest-directory my code is not perfect (in some cases it is pretty ugly :-) ), but i didn't encounter any major error until now

Method Summary

void
execute()
executes the task parses all attributes and validates options...
String
getDestdir()
Gets the value of destdir
String
getExpect()
Gets the value of expect
boolean
getForce()
Gets the value of force
String
getPackage()
Gets the value of _package
String
getParser()
Gets the value of parser
boolean
getQuiet()
Gets the value of quiet
String
getSrcfile()
Get the Srcfile value.
String
getSymbols()
Gets the value of symbols
protected String
inspect(String cupfile)
Let's search for package name
boolean
isCompact_red()
Gets the value of compact_red
boolean
isDebug()
Gets the value of debug
boolean
isDump()
Gets the value of dump
boolean
isDump_grammar()
Gets the value of dump_grammar
boolean
isDump_states()
Gets the value of dump_states
boolean
isDump_tables()
Gets the value of dump_tables
boolean
isInterface()
Gets the value of _interface
boolean
isNonterms()
Gets the value of nonterms
boolean
isNopositions()
Gets the value of nopositions
boolean
isNoscanner()
Gets the value of noscanner
boolean
isNosummary()
Gets the value of nosummary
boolean
isNowarn()
Gets the value of nowarn
boolean
isProgress()
Gets the value of progress
boolean
isTime()
Gets the value of time
void
setCompact_red(boolean argCompact_red)
Sets the value of compact_red
void
setDebug(boolean argDebug)
Sets the value of debug
void
setDestdir(String destdir)
Sets the value of destdir
void
setDump(boolean argDump)
Sets the value of dump
void
setDump_grammar(boolean argDump_grammar)
Sets the value of dump_grammar
void
setDump_states(boolean argDump_states)
Sets the value of dump_states
void
setDump_tables(boolean argDump_tables)
Sets the value of dump_tables
void
setExpect(String argExpect)
Sets the value of expect
void
setForce(boolean argforce)
Sets the value of force
void
setInterface(boolean arg_interface)
Sets the value of _interface
void
setNonterms(boolean argNonterms)
Sets the value of nonterms
void
setNopositions(boolean argNopositions)
Sets the value of nopositions
void
setNoscanner(boolean argNoscanner)
Sets the value of noscanner
void
setNosummary(boolean argNosummary)
Sets the value of nosummary
void
setNowarn(boolean argNowarn)
Sets the value of nowarn
void
setPackage(String arg_package)
Sets the value of _package
void
setParser(String argParser)
Sets the value of parser
void
setProgress(boolean argProgress)
Sets the value of progress
void
setQuiet(boolean argquiet)
Sets the value of quiet
void
setSrcfile(String newSrcfile)
Set the Srcfile value.
void
setSymbols(String argSymbols)
Sets the value of symbols
void
setTime(boolean argTime)
Sets the value of time

Method Details

execute

public void execute()
            throws BuildException
executes the task parses all attributes and validates options...

getDestdir

public String getDestdir()
Gets the value of destdir
Returns:
the value of destdir

getExpect

public String getExpect()
Gets the value of expect
Returns:
the value of expect

getForce

public boolean getForce()
Gets the value of force
Returns:
the value of force

getPackage

public String getPackage()
Gets the value of _package
Returns:
the value of _package

getParser

public String getParser()
Gets the value of parser
Returns:
the value of parser

getQuiet

public boolean getQuiet()
Gets the value of quiet
Returns:
the value of quiet

getSrcfile

public String getSrcfile()
Get the Srcfile value.
Returns:
the Srcfile value.

getSymbols

public String getSymbols()
Gets the value of symbols
Returns:
the value of symbols

inspect

protected String inspect(String cupfile)
Let's search for package name
Parameters:
cupfile - where we have to search for the package name
Returns:
the package folder structure

isCompact_red

public boolean isCompact_red()
Gets the value of compact_red
Returns:
the value of compact_red

isDebug

public boolean isDebug()
Gets the value of debug
Returns:
the value of debug

isDump

public boolean isDump()
Gets the value of dump
Returns:
the value of dump

isDump_grammar

public boolean isDump_grammar()
Gets the value of dump_grammar
Returns:
the value of dump_grammar

isDump_states

public boolean isDump_states()
Gets the value of dump_states
Returns:
the value of dump_states

isDump_tables

public boolean isDump_tables()
Gets the value of dump_tables
Returns:
the value of dump_tables

isInterface

public boolean isInterface()
Gets the value of _interface
Returns:
the value of _interface

isNonterms

public boolean isNonterms()
Gets the value of nonterms
Returns:
the value of nonterms

isNopositions

public boolean isNopositions()
Gets the value of nopositions
Returns:
the value of nopositions

isNoscanner

public boolean isNoscanner()
Gets the value of noscanner
Returns:
the value of noscanner

isNosummary

public boolean isNosummary()
Gets the value of nosummary
Returns:
the value of nosummary

isNowarn

public boolean isNowarn()
Gets the value of nowarn
Returns:
the value of nowarn

isProgress

public boolean isProgress()
Gets the value of progress
Returns:
the value of progress

isTime

public boolean isTime()
Gets the value of time
Returns:
the value of time

setCompact_red

public void setCompact_red(boolean argCompact_red)
Sets the value of compact_red
Parameters:
argCompact_red - Value to assign to this.compact_red

setDebug

public void setDebug(boolean argDebug)
Sets the value of debug
Parameters:
argDebug - Value to assign to this.debug

setDestdir

public void setDestdir(String destdir)
Sets the value of destdir
Parameters:

setDump

public void setDump(boolean argDump)
Sets the value of dump
Parameters:
argDump - Value to assign to this.dump

setDump_grammar

public void setDump_grammar(boolean argDump_grammar)
Sets the value of dump_grammar
Parameters:
argDump_grammar - Value to assign to this.dump_grammar

setDump_states

public void setDump_states(boolean argDump_states)
Sets the value of dump_states
Parameters:
argDump_states - Value to assign to this.dump_states

setDump_tables

public void setDump_tables(boolean argDump_tables)
Sets the value of dump_tables
Parameters:
argDump_tables - Value to assign to this.dump_tables

setExpect

public void setExpect(String argExpect)
Sets the value of expect
Parameters:
argExpect - Value to assign to this.expect

setForce

public void setForce(boolean argforce)
Sets the value of force
Parameters:

setInterface

public void setInterface(boolean arg_interface)
Sets the value of _interface
Parameters:
arg_interface - Value to assign to this._interface

setNonterms

public void setNonterms(boolean argNonterms)
Sets the value of nonterms
Parameters:
argNonterms - Value to assign to this.nonterms

setNopositions

public void setNopositions(boolean argNopositions)
Sets the value of nopositions
Parameters:
argNopositions - Value to assign to this.nopositions

setNoscanner

public void setNoscanner(boolean argNoscanner)
Sets the value of noscanner
Parameters:
argNoscanner - Value to assign to this.noscanner

setNosummary

public void setNosummary(boolean argNosummary)
Sets the value of nosummary
Parameters:
argNosummary - Value to assign to this.nosummary

setNowarn

public void setNowarn(boolean argNowarn)
Sets the value of nowarn
Parameters:
argNowarn - Value to assign to this.nowarn

setPackage

public void setPackage(String arg_package)
Sets the value of _package
Parameters:
arg_package - Value to assign to this._package

setParser

public void setParser(String argParser)
Sets the value of parser
Parameters:
argParser - Value to assign to this.parser

setProgress

public void setProgress(boolean argProgress)
Sets the value of progress
Parameters:
argProgress - Value to assign to this.progress

setQuiet

public void setQuiet(boolean argquiet)
Sets the value of quiet
Parameters:

setSrcfile

public void setSrcfile(String newSrcfile)
Set the Srcfile value.
Parameters:
newSrcfile - The new Srcfile value.

setSymbols

public void setSymbols(String argSymbols)
Sets the value of symbols
Parameters:
argSymbols - Value to assign to this.symbols

setTime

public void setTime(boolean argTime)
Sets the value of time
Parameters:
argTime - Value to assign to this.time