Restructure bison generation to allow multiple forntends
This commit is contained in:
		@@ -6,8 +6,8 @@
 | 
			
		||||
#include <FlexLexer.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#include "tpr-parser.hpp"
 | 
			
		||||
#include "location.hh"
 | 
			
		||||
#include <tpr-parser/tpr-parser.hpp>
 | 
			
		||||
#include <tpr-parser/location.hh>
 | 
			
		||||
 | 
			
		||||
namespace tpr {
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -19,26 +19,17 @@ enum class CommandType {
 | 
			
		||||
	digio_wait,
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
struct CommandSpec {
 | 
			
		||||
	CommandType type;
 | 
			
		||||
	std::vector<bool> param_is_whole_num;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
class TprCommand {
 | 
			
		||||
private:
 | 
			
		||||
	static const CommandSpec m_specs[11];
 | 
			
		||||
 | 
			
		||||
	CommandType m_type;
 | 
			
		||||
	std::vector<float> m_parameters;
 | 
			
		||||
	bool is_whole_number(float num) const;
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
	TprCommand(CommandType type);
 | 
			
		||||
	TprCommand(CommandType type, const std::vector<float> ¶ms);
 | 
			
		||||
	TprCommand(CommandType type, const std::vector<float> &¶ms);
 | 
			
		||||
	
 | 
			
		||||
 | 
			
		||||
	bool check_command(bool print_status) const;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user