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