mirror of
https://github.com/ksherlock/mpw-shell.git
synced 2025-01-18 07:31:25 +00:00
use updated lemon++.
This commit is contained in:
parent
56f945ce29
commit
5b343cc7dd
@ -66,10 +66,9 @@ RAGEL_TARGET(value value.rl value.cpp COMPILE_FLAGS "-p -G2")
|
||||
# need to copy all OUTPUT file to the build dir
|
||||
add_custom_command(
|
||||
OUTPUT phase2-parser.cpp phase2-parser.h phase2-parser.out
|
||||
COMMAND lemon++ -Tlempar.cxx phase2-parser.lemon
|
||||
COMMAND lemon++ phase2-parser.lemon
|
||||
COMMAND mv -f phase2-parser.cpp phase2-parser.h phase2-parser.out ${CMAKE_CURRENT_BINARY_DIR}/
|
||||
MAIN_DEPENDENCY phase2-parser.lemon
|
||||
DEPENDS lempar.cxx
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
|
35
lemon_base.h
35
lemon_base.h
@ -1,35 +0,0 @@
|
||||
#ifndef __lemon_base_h__
|
||||
#define __lemon_base_h__
|
||||
#include <cstdio>
|
||||
|
||||
template<class TokenType>
|
||||
class lemon_base {
|
||||
public:
|
||||
typedef TokenType token_type;
|
||||
|
||||
virtual ~lemon_base() = default;
|
||||
|
||||
#if 0
|
||||
virtual typename std::enable_if<std::is_copy_constructible<TokenType>::value, void>::type
|
||||
parse(int yymajor, const TokenType &yyminor) = 0;
|
||||
#endif
|
||||
|
||||
//virtual typename std::enable_if<std::is_move_constructible<TokenType>::value, void>::type
|
||||
virtual void parse(int yymajor, TokenType &&yyminor) = 0;
|
||||
virtual void trace(FILE *, const char *) = 0;
|
||||
|
||||
protected:
|
||||
virtual void parse_accept() {}
|
||||
virtual void parse_failure() {}
|
||||
virtual void stack_overflow() {}
|
||||
virtual void syntax_error(int yymajor, TokenType &yyminor) {}
|
||||
lemon_base() {}
|
||||
|
||||
private:
|
||||
lemon_base(const lemon_base &) = delete;
|
||||
lemon_base(lemon_base &&) = delete;
|
||||
lemon_base &operator=(const lemon_base &) = delete;
|
||||
lemon_base &operator=(lemon_base &&) = delete;
|
||||
};
|
||||
|
||||
#endif
|
1065
lempar.cxx
1065
lempar.cxx
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user