javacc-7.0.1.examples.JJTreeExamples.cpp.eg4.ParserVisitor.h Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of javacc Show documentation
Show all versions of javacc Show documentation
JavaCC is a parser/scanner generator for Java.
/* Generated By:JavaCC: Do not edit this line. ParserVisitor.h Version 7.0.1 */
#pragma once
#include "JavaCC.h"
#include "ParserTree.h"
namespace EG4 {
class ParserVisitor
{
public:
virtual void* visit(const SimpleNode *node, void* data) = 0;
virtual void* visit(const ASTStart *node, void* data) = 0;
virtual void* visit(const ASTAdd *node, void* data) = 0;
virtual void* visit(const ASTMult *node, void* data) = 0;
virtual void* visit(const ASTMyOtherID *node, void* data) = 0;
virtual void* visit(const ASTInteger *node, void* data) = 0;
virtual ~ParserVisitor() { }
};
class ParserDefaultVisitor : public ParserVisitor {
public:
virtual void* defaultVisit(const SimpleNode *node, void* data) = 0;
virtual void* visit(const SimpleNode *node, void* data) {
return defaultVisit(node, data);
}
virtual void* visit(const ASTStart *node, void* data) {
return defaultVisit(node, data);
}
virtual void* visit(const ASTAdd *node, void* data) {
return defaultVisit(node, data);
}
virtual void* visit(const ASTMult *node, void* data) {
return defaultVisit(node, data);
}
virtual void* visit(const ASTMyOtherID *node, void* data) {
return defaultVisit(node, data);
}
virtual void* visit(const ASTInteger *node, void* data) {
return defaultVisit(node, data);
}
~ParserDefaultVisitor() { }
};
}
/* JavaCC - OriginalChecksum=9b9390dba6b1256afbf1926edc39ea7f (do not edit this line) */