Skip to content
Snippets Groups Projects
Commit e286eeab authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Fix compilation after PEGTL update

parent 10e253d8
Branches
Tags
No related merge requests found
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
namespace language namespace language
{ {
using namespace tao::language; using namespace language;
// clang-format off // clang-format off
...@@ -76,10 +76,10 @@ struct grammar ...@@ -76,10 +76,10 @@ struct grammar
// clang-format on // clang-format on
template< typename Rule > template< typename Rule >
struct action : nothing< Rule > {}; struct my_action : nothing< Rule > {};
template<> template<>
struct action< integer > struct my_action< integer >
{ {
template< typename Input > template< typename Input >
static void apply( const Input& in, std::string& v ) static void apply( const Input& in, std::string& v )
...@@ -93,7 +93,7 @@ struct action< integer > ...@@ -93,7 +93,7 @@ struct action< integer >
}; };
template<> template<>
struct action< real > struct my_action< real >
{ {
template< typename Input > template< typename Input >
static void apply( const Input& in, std::string& v ) static void apply( const Input& in, std::string& v )
...@@ -136,7 +136,7 @@ void parser(const std::string& filename) { ...@@ -136,7 +136,7 @@ void parser(const std::string& filename) {
std::cout << "grammar_issues=" << grammar_issues << '\n'; std::cout << "grammar_issues=" << grammar_issues << '\n';
language::read_input in(filename); language::read_input in(filename);
try { try {
language::parse< language::grammar, language::action//, language::errors language::parse< language::grammar, language::my_action//, language::errors
>( in, name ); >( in, name );
} }
catch(const language::parse_error& e) { catch(const language::parse_error& e) {
...@@ -146,7 +146,7 @@ void parser(const std::string& filename) { ...@@ -146,7 +146,7 @@ void parser(const std::string& filename) {
<< rang::style::reset << rang::style::reset
<< rang::fgB::red << "error: " << rang::fg::reset << rang::fgB::red << "error: " << rang::fg::reset
<< rang::style::bold << e.what() << rang::style::reset << '\n' << rang::style::bold << e.what() << rang::style::reset << '\n'
<< in.line_as_string( p ) << '\n' << in.line_at( p ) << '\n'
<< std::string( p.byte_in_line, ' ' ) << std::string( p.byte_in_line, ' ' )
<< rang::fgB::yellow << '^' << rang::fg::reset << rang::fgB::yellow << '^' << rang::fg::reset
<< std::endl; << std::endl;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment