statements are no longer interpreted in rlgen-dot. Since they have no meaning
in this generator, it is best to ignore them.
git-svn-id: http://svn.complang.org/ragel/trunk@107
052ea7fc-9027-0410-9066-
f65837a77df0
void CodeGenData::writeStatement( InputLoc &loc, int nargs, char **args )
{
- /* Force a newline. */
+ /* FIXME: This should be moved to the virtual functions in the code
+ * generators.
+ *
+ * Force a newline. */
out << "\n";
genLineDirective( out );
/* Invoked by the parser when the root element is opened. */
ostream *openOutput( char *inputFile )
{
- if ( hostLangType != CCode && hostLangType != DCode )
+ if ( hostLangType != CCode && hostLangType != DCode ) {
error() << "this code generator is for C and D only" << endl;
+ exit(1);
+ }
/* If the output format is code and no output file name is given, then
* make a default. */
{
}
+/* Override this so that write statement processing is ignored */
+void GraphvizDotGen::writeStatement( InputLoc &, int, char ** )
+{
+}
+
std::ostream &GraphvizDotGen::KEY( Key key )
{
if ( displayPrintables && key.isPrintable() ) {
void writeDotFile( );
virtual void finishRagelDef();
+ virtual void writeStatement( InputLoc &, int, char ** );
private:
/* Writing labels and actions. */
/* Invoked by the parser when the root element is opened. */
ostream *openOutput( char *inputFile )
{
- if ( hostLangType != JavaCode )
+ if ( hostLangType != JavaCode ) {
error() << "this code generator is for Java only" << endl;
+ exit(1);
+ }
/* If the output format is code and no output file name is given, then
* make a default. */
/* Invoked by the parser when the root element is opened. */
ostream *openOutput( char *inputFile )
{
- if ( hostLangType != RubyCode )
+ if ( hostLangType != RubyCode ) {
error() << "this code generator is for Ruby only" << endl;
+ exit(1);
+ }
/* If the output format is code and no output file name is given, then
* make a default. */