From 85222351a826f0679b97f8929b766125a68e804b Mon Sep 17 00:00:00 2001 From: Roland Kaminski Date: Wed, 10 Jul 2024 22:21:16 +0200 Subject: [PATCH] update generated files --- .../src/input/groundtermgrammar/grammar.cc | 740 +- .../src/input/groundtermgrammar/grammar.hh | 502 +- .../src/input/groundtermgrammar/location.hh | 140 +- .../src/input/groundtermgrammar/position.hh | 4 +- .../gen/src/input/groundtermgrammar/stack.hh | 4 +- libgringo/gen/src/input/groundtermlexer.hh | 806 +- .../gen/src/input/nongroundgrammar/grammar.cc | 4233 +++--- .../gen/src/input/nongroundgrammar/grammar.hh | 756 +- .../gen/src/input/nongroundgrammar/stack.hh | 4 +- libgringo/gen/src/input/nongroundlexer.hh | 12270 ++++++++-------- 10 files changed, 10023 insertions(+), 9436 deletions(-) diff --git a/libgringo/gen/src/input/groundtermgrammar/grammar.cc b/libgringo/gen/src/input/groundtermgrammar/grammar.cc index c84f2d81e..a7a09f51b 100644 --- a/libgringo/gen/src/input/groundtermgrammar/grammar.cc +++ b/libgringo/gen/src/input/groundtermgrammar/grammar.cc @@ -1,8 +1,8 @@ -// A Bison parser, made by GNU Bison 3.3.2. +// A Bison parser, made by GNU Bison 3.8.2. // Skeleton implementation for Bison LALR(1) parsers in C++ -// Copyright (C) 2002-2015, 2018-2019 Free Software Foundation, Inc. +// Copyright (C) 2002-2015, 2018-2021 Free Software Foundation, Inc. // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ // GNU General Public License for more details. // You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// along with this program. If not, see . // As a special exception, you may create a larger work that contains // part or all of the Bison parser skeleton and distribute that work @@ -30,15 +30,16 @@ // This special exception was added by the Free Software Foundation in // version 2.2 of Bison. -// Undocumented macros, especially those whose name start with YY_, -// are private implementation details. Do not rely on them. +// DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, +// especially those whose name start with YY_ or yy_. They are +// private implementation details that can be changed or removed. // Take the name prefix into account. #define yylex GringoGroundTermGrammar_lex // First part of user prologue. -#line 39 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" // lalr1.cc:429 +#line 39 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" #include "gringo/term.hh" @@ -53,13 +54,14 @@ int GringoGroundTermGrammar_lex(void *value, void *, GroundTermParser *lexer) { } -#line 57 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/groundtermgrammar/grammar.cc" // lalr1.cc:429 +#line 58 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/groundtermgrammar/grammar.cc" + #include "grammar.hh" // Unqualified %code blocks. -#line 54 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" // lalr1.cc:435 +#line 54 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" void GroundTermGrammar::parser::error(GroundTermGrammar::parser::location_type const &, std::string const &msg) { @@ -67,7 +69,7 @@ void GroundTermGrammar::parser::error(GroundTermGrammar::parser::location_type c } -#line 71 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/groundtermgrammar/grammar.cc" // lalr1.cc:435 +#line 73 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/groundtermgrammar/grammar.cc" #ifndef YY_ @@ -82,6 +84,7 @@ void GroundTermGrammar::parser::error(GroundTermGrammar::parser::location_type c # endif #endif + // Whether we are compiled with exception support. #ifndef YY_EXCEPTIONS # if defined __GNUC__ && !defined __EXCEPTIONS @@ -112,9 +115,6 @@ void GroundTermGrammar::parser::error(GroundTermGrammar::parser::location_type c # endif -// Suppress unused-variable warnings by "using" E. -#define YYUSE(E) ((void) (E)) - // Enable debugging if requested. #if YYDEBUG @@ -140,13 +140,13 @@ void GroundTermGrammar::parser::error(GroundTermGrammar::parser::location_type c # define YY_STACK_PRINT() \ do { \ if (yydebug_) \ - yystack_print_ (); \ + yy_stack_print_ (); \ } while (false) #else // !YYDEBUG # define YYCDEBUG if (false) std::cerr -# define YY_SYMBOL_PRINT(Title, Symbol) YYUSE (Symbol) +# define YY_SYMBOL_PRINT(Title, Symbol) YY_USE (Symbol) # define YY_REDUCE_PRINT(Rule) static_cast (0) # define YY_STACK_PRINT() static_cast (0) @@ -160,57 +160,17 @@ void GroundTermGrammar::parser::error(GroundTermGrammar::parser::location_type c #define YYERROR goto yyerrorlab #define YYRECOVERING() (!!yyerrstatus_) -#line 26 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" // lalr1.cc:510 +#line 26 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" namespace Gringo { namespace Input { namespace GroundTermGrammar { -#line 166 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/groundtermgrammar/grammar.cc" // lalr1.cc:510 - - /* Return YYSTR after stripping away unnecessary quotes and - backslashes, so that it's suitable for yyerror. The heuristic is - that double-quoting is unnecessary unless the string contains an - apostrophe, a comma, or backslash (other than backslash-backslash). - YYSTR is taken from yytname. */ - std::string - parser::yytnamerr_ (const char *yystr) - { - if (*yystr == '"') - { - std::string yyr; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - else - goto append; - - append: - default: - yyr += *yyp; - break; - - case '"': - return yyr; - } - do_not_strip_quotes: ; - } - - return yystr; - } - +#line 166 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/groundtermgrammar/grammar.cc" /// Build a parser object. parser::parser (Gringo::Input::GroundTermParser *lexer_yyarg) - : #if YYDEBUG - yydebug_ (false), + : yydebug_ (false), yycdebug_ (&std::cerr), +#else + : #endif lexer (lexer_yyarg) {} @@ -221,20 +181,11 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { parser::syntax_error::~syntax_error () YY_NOEXCEPT YY_NOTHROW {} - /*---------------. - | Symbol types. | - `---------------*/ + /*---------. + | symbol. | + `---------*/ // basic_symbol. -#if 201103L <= YY_CPLUSPLUS - template - parser::basic_symbol::basic_symbol (basic_symbol&& that) - : Base (std::move (that)) - , value (std::move (that.value)) - , location (std::move (that.location)) - {} -#endif - template parser::basic_symbol::basic_symbol (const basic_symbol& that) : Base (that) @@ -252,17 +203,26 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { {} template - parser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (semantic_type) v, YY_RVREF (location_type) l) + parser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (value_type) v, YY_RVREF (location_type) l) : Base (t) , value (YY_MOVE (v)) , location (YY_MOVE (l)) {} + + template + parser::symbol_kind_type + parser::basic_symbol::type_get () const YY_NOEXCEPT + { + return this->kind (); + } + + template bool parser::basic_symbol::empty () const YY_NOEXCEPT { - return Base::type_get () == empty_symbol; + return this->kind () == symbol_kind::S_YYEMPTY; } template @@ -274,47 +234,57 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { location = YY_MOVE (s.location); } - // by_type. - parser::by_type::by_type () - : type (empty_symbol) + // by_kind. + parser::by_kind::by_kind () YY_NOEXCEPT + : kind_ (symbol_kind::S_YYEMPTY) {} #if 201103L <= YY_CPLUSPLUS - parser::by_type::by_type (by_type&& that) - : type (that.type) + parser::by_kind::by_kind (by_kind&& that) YY_NOEXCEPT + : kind_ (that.kind_) { that.clear (); } #endif - parser::by_type::by_type (const by_type& that) - : type (that.type) + parser::by_kind::by_kind (const by_kind& that) YY_NOEXCEPT + : kind_ (that.kind_) {} - parser::by_type::by_type (token_type t) - : type (yytranslate_ (t)) + parser::by_kind::by_kind (token_kind_type t) YY_NOEXCEPT + : kind_ (yytranslate_ (t)) {} + + void - parser::by_type::clear () + parser::by_kind::clear () YY_NOEXCEPT { - type = empty_symbol; + kind_ = symbol_kind::S_YYEMPTY; } void - parser::by_type::move (by_type& that) + parser::by_kind::move (by_kind& that) { - type = that.type; + kind_ = that.kind_; that.clear (); } - int - parser::by_type::type_get () const YY_NOEXCEPT + parser::symbol_kind_type + parser::by_kind::kind () const YY_NOEXCEPT + { + return kind_; + } + + + parser::symbol_kind_type + parser::by_kind::type_get () const YY_NOEXCEPT { - return type; + return this->kind (); } + // by_state. parser::by_state::by_state () YY_NOEXCEPT : state (empty_state) @@ -341,13 +311,13 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { : state (s) {} - parser::symbol_number_type - parser::by_state::type_get () const YY_NOEXCEPT + parser::symbol_kind_type + parser::by_state::kind () const YY_NOEXCEPT { if (state == empty_state) - return empty_symbol; + return symbol_kind::S_YYEMPTY; else - return yystos_[state]; + return YY_CAST (symbol_kind_type, yystos_[+state]); } parser::stack_symbol_type::stack_symbol_type () @@ -366,10 +336,19 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { : super_type (s, YY_MOVE (that.value), YY_MOVE (that.location)) { // that is emptied. - that.type = empty_symbol; + that.kind_ = symbol_kind::S_YYEMPTY; } #if YY_CPLUSPLUS < 201103L + parser::stack_symbol_type& + parser::stack_symbol_type::operator= (const stack_symbol_type& that) + { + state = that.state; + value = that.value; + location = that.location; + return *this; + } + parser::stack_symbol_type& parser::stack_symbol_type::operator= (stack_symbol_type& that) { @@ -390,29 +369,27 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { YY_SYMBOL_PRINT (yymsg, yysym); // User destructor. - YYUSE (yysym.type_get ()); + YY_USE (yysym.kind ()); } #if YYDEBUG template void - parser::yy_print_ (std::ostream& yyo, - const basic_symbol& yysym) const + parser::yy_print_ (std::ostream& yyo, const basic_symbol& yysym) const { std::ostream& yyoutput = yyo; - YYUSE (yyoutput); - symbol_number_type yytype = yysym.type_get (); -#if defined __GNUC__ && ! defined __clang__ && ! defined __ICC && __GNUC__ * 100 + __GNUC_MINOR__ <= 408 - // Avoid a (spurious) G++ 4.8 warning about "array subscript is - // below array bounds". + YY_USE (yyoutput); if (yysym.empty ()) - std::abort (); -#endif - yyo << (yytype < yyntokens_ ? "token" : "nterm") - << ' ' << yytname_[yytype] << " (" - << yysym.location << ": "; - YYUSE (yytype); - yyo << ')'; + yyo << "empty symbol"; + else + { + symbol_kind_type yykind = yysym.kind (); + yyo << (yykind < YYNTOKENS ? "token" : "nterm") + << ' ' << yysym.name () << " (" + << yysym.location << ": "; + YY_USE (yykind); + yyo << ')'; + } } #endif @@ -436,7 +413,7 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { } void - parser::yypop_ (int n) + parser::yypop_ (int n) YY_NOEXCEPT { yystack_.pop (n); } @@ -471,21 +448,21 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { parser::state_type parser::yy_lr_goto_state_ (state_type yystate, int yysym) { - int yyr = yypgoto_[yysym - yyntokens_] + yystate; + int yyr = yypgoto_[yysym - YYNTOKENS] + yystate; if (0 <= yyr && yyr <= yylast_ && yycheck_[yyr] == yystate) return yytable_[yyr]; else - return yydefgoto_[yysym - yyntokens_]; + return yydefgoto_[yysym - YYNTOKENS]; } bool - parser::yy_pact_value_is_default_ (int yyvalue) + parser::yy_pact_value_is_default_ (int yyvalue) YY_NOEXCEPT { return yyvalue == yypact_ninf_; } bool - parser::yy_table_value_is_error_ (int yyvalue) + parser::yy_table_value_is_error_ (int yyvalue) YY_NOEXCEPT { return yyvalue == yytable_ninf_; } @@ -499,7 +476,6 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { int parser::parse () { - // State. int yyn; /// Length of the RHS of the rule being reduced. int yylen = 0; @@ -535,7 +511,8 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { | yynewstate -- push a new symbol on the stack. | `-----------------------------------------------*/ yynewstate: - YYCDEBUG << "Entering state " << yystack_[0].state << '\n'; + YYCDEBUG << "Entering state " << int (yystack_[0].state) << '\n'; + YY_STACK_PRINT (); // Accept? if (yystack_[0].state == yyfinal_) @@ -549,19 +526,19 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { `-----------*/ yybackup: // Try to take a decision without lookahead. - yyn = yypact_[yystack_[0].state]; + yyn = yypact_[+yystack_[0].state]; if (yy_pact_value_is_default_ (yyn)) goto yydefault; // Read a lookahead token. if (yyla.empty ()) { - YYCDEBUG << "Reading a token: "; + YYCDEBUG << "Reading a token\n"; #if YY_EXCEPTIONS try #endif // YY_EXCEPTIONS { - yyla.type = yytranslate_ (yylex (&yyla.value, &yyla.location, lexer)); + yyla.kind_ = yytranslate_ (yylex (&yyla.value, &yyla.location, lexer)); } #if YY_EXCEPTIONS catch (const syntax_error& yyexc) @@ -574,11 +551,23 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { } YY_SYMBOL_PRINT ("Next token is", yyla); + if (yyla.kind () == symbol_kind::S_YYerror) + { + // The scanner already issued an error message, process directly + // to error recovery. But do not keep the error token as + // lookahead, it is too special and may lead us to an endless + // loop in error recovery. */ + yyla.kind_ = symbol_kind::S_YYUNDEF; + goto yyerrlab1; + } + /* If the proper action on seeing token YYLA.TYPE is to reduce or to detect an error, take that action. */ - yyn += yyla.type_get (); - if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yyla.type_get ()) - goto yydefault; + yyn += yyla.kind (); + if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yyla.kind ()) + { + goto yydefault; + } // Reduce or error. yyn = yytable_[yyn]; @@ -595,7 +584,7 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { --yyerrstatus_; // Shift the lookahead token. - yypush_ ("Shifting", yyn, YY_MOVE (yyla)); + yypush_ ("Shifting", state_type (yyn), YY_MOVE (yyla)); goto yynewstate; @@ -603,7 +592,7 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ yydefault: - yyn = yydefact_[yystack_[0].state]; + yyn = yydefact_[+yystack_[0].state]; if (yyn == 0) goto yyerrlab; goto yyreduce; @@ -643,170 +632,171 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { { switch (yyn) { - case 2: -#line 117 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" // lalr1.cc:919 - { lexer->setValue(Symbol((yystack_[0].value.value))); } -#line 650 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/groundtermgrammar/grammar.cc" // lalr1.cc:919 + case 2: // start: term +#line 117 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" + { lexer->setValue(Symbol((yystack_[0].value.value))); } +#line 639 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/groundtermgrammar/grammar.cc" break; - case 3: -#line 120 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" // lalr1.cc:919 - { (yylhs.value.value) = lexer->term(BinOp::XOR, Symbol((yystack_[2].value.value)), Symbol((yystack_[0].value.value))).rep(); } -#line 656 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/groundtermgrammar/grammar.cc" // lalr1.cc:919 + case 3: // term: term "^" term +#line 120 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" + { (yylhs.value.value) = lexer->term(BinOp::XOR, Symbol((yystack_[2].value.value)), Symbol((yystack_[0].value.value))).rep(); } +#line 645 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/groundtermgrammar/grammar.cc" break; - case 4: -#line 121 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" // lalr1.cc:919 - { (yylhs.value.value) = lexer->term(BinOp::OR, Symbol((yystack_[2].value.value)), Symbol((yystack_[0].value.value))).rep(); } -#line 662 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/groundtermgrammar/grammar.cc" // lalr1.cc:919 + case 4: // term: term "?" term +#line 121 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" + { (yylhs.value.value) = lexer->term(BinOp::OR, Symbol((yystack_[2].value.value)), Symbol((yystack_[0].value.value))).rep(); } +#line 651 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/groundtermgrammar/grammar.cc" break; - case 5: -#line 122 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" // lalr1.cc:919 - { (yylhs.value.value) = lexer->term(BinOp::AND, Symbol((yystack_[2].value.value)), Symbol((yystack_[0].value.value))).rep(); } -#line 668 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/groundtermgrammar/grammar.cc" // lalr1.cc:919 + case 5: // term: term "&" term +#line 122 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" + { (yylhs.value.value) = lexer->term(BinOp::AND, Symbol((yystack_[2].value.value)), Symbol((yystack_[0].value.value))).rep(); } +#line 657 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/groundtermgrammar/grammar.cc" break; - case 6: -#line 123 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" // lalr1.cc:919 - { (yylhs.value.value) = lexer->term(BinOp::ADD, Symbol((yystack_[2].value.value)), Symbol((yystack_[0].value.value))).rep(); } -#line 674 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/groundtermgrammar/grammar.cc" // lalr1.cc:919 + case 6: // term: term "+" term +#line 123 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" + { (yylhs.value.value) = lexer->term(BinOp::ADD, Symbol((yystack_[2].value.value)), Symbol((yystack_[0].value.value))).rep(); } +#line 663 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/groundtermgrammar/grammar.cc" break; - case 7: -#line 124 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" // lalr1.cc:919 - { (yylhs.value.value) = lexer->term(BinOp::SUB, Symbol((yystack_[2].value.value)), Symbol((yystack_[0].value.value))).rep(); } -#line 680 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/groundtermgrammar/grammar.cc" // lalr1.cc:919 + case 7: // term: term "-" term +#line 124 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" + { (yylhs.value.value) = lexer->term(BinOp::SUB, Symbol((yystack_[2].value.value)), Symbol((yystack_[0].value.value))).rep(); } +#line 669 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/groundtermgrammar/grammar.cc" break; - case 8: -#line 125 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" // lalr1.cc:919 - { (yylhs.value.value) = lexer->term(BinOp::MUL, Symbol((yystack_[2].value.value)), Symbol((yystack_[0].value.value))).rep(); } -#line 686 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/groundtermgrammar/grammar.cc" // lalr1.cc:919 + case 8: // term: term "*" term +#line 125 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" + { (yylhs.value.value) = lexer->term(BinOp::MUL, Symbol((yystack_[2].value.value)), Symbol((yystack_[0].value.value))).rep(); } +#line 675 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/groundtermgrammar/grammar.cc" break; - case 9: -#line 126 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" // lalr1.cc:919 - { (yylhs.value.value) = lexer->term(BinOp::DIV, Symbol((yystack_[2].value.value)), Symbol((yystack_[0].value.value))).rep(); } -#line 692 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/groundtermgrammar/grammar.cc" // lalr1.cc:919 + case 9: // term: term "/" term +#line 126 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" + { (yylhs.value.value) = lexer->term(BinOp::DIV, Symbol((yystack_[2].value.value)), Symbol((yystack_[0].value.value))).rep(); } +#line 681 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/groundtermgrammar/grammar.cc" break; - case 10: -#line 127 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" // lalr1.cc:919 - { (yylhs.value.value) = lexer->term(BinOp::MOD, Symbol((yystack_[2].value.value)), Symbol((yystack_[0].value.value))).rep(); } -#line 698 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/groundtermgrammar/grammar.cc" // lalr1.cc:919 + case 10: // term: term "\\" term +#line 127 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" + { (yylhs.value.value) = lexer->term(BinOp::MOD, Symbol((yystack_[2].value.value)), Symbol((yystack_[0].value.value))).rep(); } +#line 687 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/groundtermgrammar/grammar.cc" break; - case 11: -#line 128 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" // lalr1.cc:919 - { (yylhs.value.value) = lexer->term(BinOp::POW, Symbol((yystack_[2].value.value)), Symbol((yystack_[0].value.value))).rep(); } -#line 704 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/groundtermgrammar/grammar.cc" // lalr1.cc:919 + case 11: // term: term "**" term +#line 128 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" + { (yylhs.value.value) = lexer->term(BinOp::POW, Symbol((yystack_[2].value.value)), Symbol((yystack_[0].value.value))).rep(); } +#line 693 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/groundtermgrammar/grammar.cc" break; - case 12: -#line 129 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" // lalr1.cc:919 - { (yylhs.value.value) = lexer->term(UnOp::NEG, Symbol((yystack_[0].value.value))).rep(); } -#line 710 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/groundtermgrammar/grammar.cc" // lalr1.cc:919 + case 12: // term: "-" term +#line 129 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" + { (yylhs.value.value) = lexer->term(UnOp::NEG, Symbol((yystack_[0].value.value))).rep(); } +#line 699 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/groundtermgrammar/grammar.cc" break; - case 13: -#line 130 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" // lalr1.cc:919 - { (yylhs.value.value) = lexer->term(UnOp::NOT, Symbol((yystack_[0].value.value))).rep(); } -#line 716 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/groundtermgrammar/grammar.cc" // lalr1.cc:919 + case 13: // term: "~" term +#line 130 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" + { (yylhs.value.value) = lexer->term(UnOp::NOT, Symbol((yystack_[0].value.value))).rep(); } +#line 705 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/groundtermgrammar/grammar.cc" break; - case 14: -#line 131 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" // lalr1.cc:919 - { (yylhs.value.value) = Symbol::createTuple(Potassco::toSpan()).rep(); } -#line 722 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/groundtermgrammar/grammar.cc" // lalr1.cc:919 + case 14: // term: "(" ")" +#line 131 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" + { (yylhs.value.value) = Symbol::createTuple(Potassco::toSpan()).rep(); } +#line 711 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/groundtermgrammar/grammar.cc" break; - case 15: -#line 132 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" // lalr1.cc:919 - { (yylhs.value.value) = Symbol::createTuple(Potassco::toSpan()).rep(); } -#line 728 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/groundtermgrammar/grammar.cc" // lalr1.cc:919 + case 15: // term: "(" "," ")" +#line 132 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" + { (yylhs.value.value) = Symbol::createTuple(Potassco::toSpan()).rep(); } +#line 717 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/groundtermgrammar/grammar.cc" break; - case 16: -#line 133 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" // lalr1.cc:919 - { (yylhs.value.value) = lexer->tuple((yystack_[1].value.uid), false).rep(); } -#line 734 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/groundtermgrammar/grammar.cc" // lalr1.cc:919 + case 16: // term: "(" nterms ")" +#line 133 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" + { (yylhs.value.value) = lexer->tuple((yystack_[1].value.uid), false).rep(); } +#line 723 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/groundtermgrammar/grammar.cc" break; - case 17: -#line 134 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" // lalr1.cc:919 - { (yylhs.value.value) = lexer->tuple((yystack_[2].value.uid), true).rep(); } -#line 740 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/groundtermgrammar/grammar.cc" // lalr1.cc:919 + case 17: // term: "(" nterms "," ")" +#line 134 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" + { (yylhs.value.value) = lexer->tuple((yystack_[2].value.uid), true).rep(); } +#line 729 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/groundtermgrammar/grammar.cc" break; - case 18: -#line 135 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" // lalr1.cc:919 - { (yylhs.value.value) = Symbol::createFun((yystack_[3].value.str), Potassco::toSpan(lexer->terms((yystack_[1].value.uid)))).rep(); } -#line 746 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/groundtermgrammar/grammar.cc" // lalr1.cc:919 + case 18: // term: "" "(" terms ")" +#line 135 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" + { (yylhs.value.value) = Symbol::createFun((yystack_[3].value.str), Potassco::toSpan(lexer->terms((yystack_[1].value.uid)))).rep(); } +#line 735 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/groundtermgrammar/grammar.cc" break; - case 19: -#line 136 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" // lalr1.cc:919 - { (yylhs.value.value) = lexer->term(UnOp::ABS, Symbol((yystack_[1].value.value))).rep(); } -#line 752 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/groundtermgrammar/grammar.cc" // lalr1.cc:919 + case 19: // term: "|" term "|" +#line 136 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" + { (yylhs.value.value) = lexer->term(UnOp::ABS, Symbol((yystack_[1].value.value))).rep(); } +#line 741 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/groundtermgrammar/grammar.cc" break; - case 20: -#line 137 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" // lalr1.cc:919 - { (yylhs.value.value) = Symbol::createId((yystack_[0].value.str)).rep(); } -#line 758 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/groundtermgrammar/grammar.cc" // lalr1.cc:919 + case 20: // term: "" +#line 137 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" + { (yylhs.value.value) = Symbol::createId((yystack_[0].value.str)).rep(); } +#line 747 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/groundtermgrammar/grammar.cc" break; - case 21: -#line 138 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" // lalr1.cc:919 - { (yylhs.value.value) = Symbol::createNum((yystack_[0].value.num)).rep(); } -#line 764 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/groundtermgrammar/grammar.cc" // lalr1.cc:919 + case 21: // term: "" +#line 138 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" + { (yylhs.value.value) = Symbol::createNum((yystack_[0].value.num)).rep(); } +#line 753 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/groundtermgrammar/grammar.cc" break; - case 22: -#line 139 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" // lalr1.cc:919 - { (yylhs.value.value) = Symbol::createStr((yystack_[0].value.str)).rep(); } -#line 770 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/groundtermgrammar/grammar.cc" // lalr1.cc:919 + case 22: // term: "" +#line 139 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" + { (yylhs.value.value) = Symbol::createStr((yystack_[0].value.str)).rep(); } +#line 759 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/groundtermgrammar/grammar.cc" break; - case 23: -#line 140 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" // lalr1.cc:919 - { (yylhs.value.value) = Symbol::createInf().rep(); } -#line 776 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/groundtermgrammar/grammar.cc" // lalr1.cc:919 + case 23: // term: "#inf" +#line 140 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" + { (yylhs.value.value) = Symbol::createInf().rep(); } +#line 765 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/groundtermgrammar/grammar.cc" break; - case 24: -#line 141 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" // lalr1.cc:919 - { (yylhs.value.value) = Symbol::createSup().rep(); } -#line 782 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/groundtermgrammar/grammar.cc" // lalr1.cc:919 + case 24: // term: "#sup" +#line 141 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" + { (yylhs.value.value) = Symbol::createSup().rep(); } +#line 771 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/groundtermgrammar/grammar.cc" break; - case 25: -#line 145 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" // lalr1.cc:919 - { (yylhs.value.uid) = lexer->terms(lexer->terms(), Symbol((yystack_[0].value.value))); } -#line 788 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/groundtermgrammar/grammar.cc" // lalr1.cc:919 + case 25: // nterms: term +#line 145 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" + { (yylhs.value.uid) = lexer->terms(lexer->terms(), Symbol((yystack_[0].value.value))); } +#line 777 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/groundtermgrammar/grammar.cc" break; - case 26: -#line 146 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" // lalr1.cc:919 - { (yylhs.value.uid) = lexer->terms((yystack_[2].value.uid), Symbol((yystack_[0].value.value))); } -#line 794 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/groundtermgrammar/grammar.cc" // lalr1.cc:919 + case 26: // nterms: nterms "," term +#line 146 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" + { (yylhs.value.uid) = lexer->terms((yystack_[2].value.uid), Symbol((yystack_[0].value.value))); } +#line 783 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/groundtermgrammar/grammar.cc" break; - case 27: -#line 150 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" // lalr1.cc:919 - { (yylhs.value.uid) = (yystack_[0].value.uid); } -#line 800 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/groundtermgrammar/grammar.cc" // lalr1.cc:919 + case 27: // terms: nterms +#line 150 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" + { (yylhs.value.uid) = (yystack_[0].value.uid); } +#line 789 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/groundtermgrammar/grammar.cc" break; - case 28: -#line 151 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" // lalr1.cc:919 - { (yylhs.value.uid) = lexer->terms(); } -#line 806 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/groundtermgrammar/grammar.cc" // lalr1.cc:919 + case 28: // terms: %empty +#line 151 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" + { (yylhs.value.uid) = lexer->terms(); } +#line 795 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/groundtermgrammar/grammar.cc" break; -#line 810 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/groundtermgrammar/grammar.cc" // lalr1.cc:919 +#line 799 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/groundtermgrammar/grammar.cc" + default: break; } @@ -822,7 +812,6 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { YY_SYMBOL_PRINT ("-> $$ =", yylhs); yypop_ (yylen); yylen = 0; - YY_STACK_PRINT (); // Shift the result of the reduction. yypush_ (YY_NULLPTR, YY_MOVE (yylhs)); @@ -838,7 +827,9 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { if (!yyerrstatus_) { ++yynerrs_; - error (yyla.location, yysyntax_error_ (yystack_[0].state, yyla)); + context yyctx (*this, yyla); + std::string msg = yysyntax_error_ (yyctx); + error (yyla.location, YY_MOVE (msg)); } @@ -849,7 +840,7 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { error, discard it. */ // Return failure if at end of input. - if (yyla.type_get () == yyeof_) + if (yyla.kind () == symbol_kind::S_YYEOF) YYABORT; else if (!yyla.empty ()) { @@ -875,6 +866,7 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { this YYERROR. */ yypop_ (yylen); yylen = 0; + YY_STACK_PRINT (); goto yyerrlab1; @@ -883,37 +875,39 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { `-------------------------------------------------------------*/ yyerrlab1: yyerrstatus_ = 3; // Each real token shifted decrements this. - { - stack_symbol_type error_token; - for (;;) - { - yyn = yypact_[yystack_[0].state]; - if (!yy_pact_value_is_default_ (yyn)) - { - yyn += yyterror_; - if (0 <= yyn && yyn <= yylast_ && yycheck_[yyn] == yyterror_) - { - yyn = yytable_[yyn]; - if (0 < yyn) - break; - } - } + // Pop stack until we find a state that shifts the error token. + for (;;) + { + yyn = yypact_[+yystack_[0].state]; + if (!yy_pact_value_is_default_ (yyn)) + { + yyn += symbol_kind::S_YYerror; + if (0 <= yyn && yyn <= yylast_ + && yycheck_[yyn] == symbol_kind::S_YYerror) + { + yyn = yytable_[yyn]; + if (0 < yyn) + break; + } + } - // Pop the current state because it cannot handle the error token. - if (yystack_.size () == 1) - YYABORT; + // Pop the current state because it cannot handle the error token. + if (yystack_.size () == 1) + YYABORT; - yyerror_range[1].location = yystack_[0].location; - yy_destroy_ ("Error: popping", yystack_[0]); - yypop_ (); - YY_STACK_PRINT (); - } + yyerror_range[1].location = yystack_[0].location; + yy_destroy_ ("Error: popping", yystack_[0]); + yypop_ (); + YY_STACK_PRINT (); + } + { + stack_symbol_type error_token; yyerror_range[2].location = yyla.location; YYLLOC_DEFAULT (error_token.location, yyerror_range, 2); // Shift the error token. - error_token.state = yyn; + error_token.state = state_type (yyn); yypush_ ("Shifting", YY_MOVE (error_token)); } goto yynewstate; @@ -945,6 +939,7 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ yypop_ (yylen); + YY_STACK_PRINT (); while (1 < yystack_.size ()) { yy_destroy_ ("Cleanup: popping", yystack_[0]); @@ -978,18 +973,103 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { error (yyexc.location, yyexc.what ()); } - // Generate an error message. + /* Return YYSTR after stripping away unnecessary quotes and + backslashes, so that it's suitable for yyerror. The heuristic is + that double-quoting is unnecessary unless the string contains an + apostrophe, a comma, or backslash (other than backslash-backslash). + YYSTR is taken from yytname. */ std::string - parser::yysyntax_error_ (state_type yystate, const symbol_type& yyla) const + parser::yytnamerr_ (const char *yystr) { - // Number of reported tokens (one for the "unexpected", one per - // "expected"). - size_t yycount = 0; - // Its maximum. - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - // Arguments of yyformat. - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + if (*yystr == '"') + { + std::string yyr; + char const *yyp = yystr; + + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + else + goto append; + + append: + default: + yyr += *yyp; + break; + + case '"': + return yyr; + } + do_not_strip_quotes: ; + } + + return yystr; + } + + std::string + parser::symbol_name (symbol_kind_type yysymbol) + { + return yytnamerr_ (yytname_[yysymbol]); + } + + + // parser::context. + parser::context::context (const parser& yyparser, const symbol_type& yyla) + : yyparser_ (yyparser) + , yyla_ (yyla) + {} + + int + parser::context::expected_tokens (symbol_kind_type yyarg[], int yyargn) const + { + // Actual number of expected tokens + int yycount = 0; + + const int yyn = yypact_[+yyparser_.yystack_[0].state]; + if (!yy_pact_value_is_default_ (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + const int yyxbegin = yyn < 0 ? -yyn : 0; + // Stay within bounds of both yycheck and yytname. + const int yychecklim = yylast_ - yyn + 1; + const int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + for (int yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck_[yyx + yyn] == yyx && yyx != symbol_kind::S_YYerror + && !yy_table_value_is_error_ (yytable_[yyx + yyn])) + { + if (!yyarg) + ++yycount; + else if (yycount == yyargn) + return 0; + else + yyarg[yycount++] = YY_CAST (symbol_kind_type, yyx); + } + } + + if (yyarg && yycount == 0 && 0 < yyargn) + yyarg[0] = symbol_kind::S_YYEMPTY; + return yycount; + } + + + + + + + int + parser::yy_syntax_error_arguments_ (const context& yyctx, + symbol_kind_type yyarg[], int yyargn) const + { /* There are many possibilities here to consider: - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action @@ -1008,41 +1088,32 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { - Of course, the expected token list depends on states to have correct lookahead information, and it depends on the parser not to perform extra reductions after fetching a lookahead from the - scanner and before detecting a syntax error. Thus, state - merging (from LALR or IELR) and default reductions corrupt the - expected token list. However, the list is correct for - canonical LR with one exception: it will still contain any - token that will not be accepted due to an error action in a - later state. + scanner and before detecting a syntax error. Thus, state merging + (from LALR or IELR) and default reductions corrupt the expected + token list. However, the list is correct for canonical LR with + one exception: it will still contain any token that will not be + accepted due to an error action in a later state. */ - if (!yyla.empty ()) + + if (!yyctx.lookahead ().empty ()) { - int yytoken = yyla.type_get (); - yyarg[yycount++] = yytname_[yytoken]; - int yyn = yypact_[yystate]; - if (!yy_pact_value_is_default_ (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - // Stay within bounds of both yycheck and yytname. - int yychecklim = yylast_ - yyn + 1; - int yyxend = yychecklim < yyntokens_ ? yychecklim : yyntokens_; - for (int yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck_[yyx + yyn] == yyx && yyx != yyterror_ - && !yy_table_value_is_error_ (yytable_[yyx + yyn])) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - break; - } - else - yyarg[yycount++] = yytname_[yyx]; - } - } + if (yyarg) + yyarg[0] = yyctx.token (); + int yyn = yyctx.expected_tokens (yyarg ? yyarg + 1 : yyarg, yyargn - 1); + return yyn + 1; } + return 0; + } + + // Generate an error message. + std::string + parser::yysyntax_error_ (const context& yyctx) const + { + // Its maximum. + enum { YYARGS_MAX = 5 }; + // Arguments of yyformat. + symbol_kind_type yyarg[YYARGS_MAX]; + int yycount = yy_syntax_error_arguments_ (yyctx, yyarg, YYARGS_MAX); char const* yyformat = YY_NULLPTR; switch (yycount) @@ -1063,11 +1134,11 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { std::string yyres; // Argument number. - size_t yyi = 0; + std::ptrdiff_t yyi = 0; for (char const* yyp = yyformat; *yyp; ++yyp) if (yyp[0] == '%' && yyp[1] == 's' && yyi < yycount) { - yyres += yytnamerr_ (yyarg[yyi++]); + yyres += symbol_name (yyarg[yyi++]); ++yyp; } else @@ -1090,7 +1161,7 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { 20, 101, 20, 116, 89, -6, 76, 57, -6 }; - const unsigned char + const signed char parser::yydefact_[] = { 0, 0, 0, 0, 0, 24, 23, 21, 20, 22, @@ -1109,10 +1180,10 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { const signed char parser::yydefgoto_[] = { - -1, 10, 15, 16, 35 + 0, 10, 15, 16, 35 }; - const unsigned char + const signed char parser::yytable_[] = { 11, 12, 31, 17, 18, 21, 22, 30, 32, 20, @@ -1148,7 +1219,7 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { -1, -1, 13, 14, 8, 9, 10, -1, -1, 13 }; - const unsigned char + const signed char parser::yystos_[] = { 0, 5, 7, 14, 16, 17, 18, 19, 20, 21, @@ -1158,7 +1229,7 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { 26, 26, 26, 26, 26, 12, 26, 6, 12 }; - const unsigned char + const signed char parser::yyr1_[] = { 0, 24, 25, 26, 26, 26, 26, 26, 26, 26, @@ -1166,7 +1237,7 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { 26, 26, 26, 26, 26, 27, 27, 28, 28 }; - const unsigned char + const signed char parser::yyr2_[] = { 0, 2, 1, 3, 3, 3, 3, 3, 3, 3, @@ -1175,18 +1246,20 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { }; - +#if YYDEBUG || 1 // YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - // First, the terminals, then, starting at \a yyntokens_, nonterminals. + // First, the terminals, then, starting at \a YYNTOKENS, nonterminals. const char* const parser::yytname_[] = { - "\"\"", "error", "$undefined", "\"+\"", "\"&\"", "\"~\"", "\",\"", - "\"(\"", "\"\\\\\"", "\"*\"", "\"**\"", "\"?\"", "\")\"", "\"/\"", - "\"-\"", "\"^\"", "\"|\"", "\"#sup\"", "\"#inf\"", "\"\"", - "\"\"", "\"\"", "UMINUS", "UBNOT", "$accept", - "start", "term", "nterms", "terms", YY_NULLPTR + "\"\"", "error", "\"invalid token\"", "\"+\"", "\"&\"", "\"~\"", + "\",\"", "\"(\"", "\"\\\\\"", "\"*\"", "\"**\"", "\"?\"", "\")\"", + "\"/\"", "\"-\"", "\"^\"", "\"|\"", "\"#sup\"", "\"#inf\"", + "\"\"", "\"\"", "\"\"", "UMINUS", "UBNOT", + "$accept", "start", "term", "nterms", "terms", YY_NULLPTR }; +#endif + #if YYDEBUG const unsigned char @@ -1197,24 +1270,22 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { 137, 138, 139, 140, 141, 145, 146, 150, 151 }; - // Print the state stack on the debug stream. void - parser::yystack_print_ () + parser::yy_stack_print_ () const { *yycdebug_ << "Stack now"; for (stack_type::const_iterator i = yystack_.begin (), i_end = yystack_.end (); i != i_end; ++i) - *yycdebug_ << ' ' << i->state; + *yycdebug_ << ' ' << int (i->state); *yycdebug_ << '\n'; } - // Report on the debug stream that the rule \a yyrule is going to be reduced. void - parser::yy_reduce_print_ (int yyrule) + parser::yy_reduce_print_ (int yyrule) const { - unsigned yylno = yyrline_[yyrule]; + int yylno = yyrline_[yyrule]; int yynrhs = yyr2_[yyrule]; // Print the symbols being reduced, and their result. *yycdebug_ << "Reducing stack by rule " << yyrule - 1 @@ -1226,13 +1297,13 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { } #endif // YYDEBUG - parser::token_number_type - parser::yytranslate_ (int t) + parser::symbol_kind_type + parser::yytranslate_ (int t) YY_NOEXCEPT { // YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to // TOKEN-NUM as returned by yylex. static - const token_number_type + const signed char translate_table[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -1264,17 +1335,18 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 }; - const unsigned user_token_number_max_ = 278; - const token_number_type undef_token_ = 2; + // Last valid token kind. + const int code_max = 278; - if (static_cast (t) <= yyeof_) - return yyeof_; - else if (static_cast (t) <= user_token_number_max_) - return translate_table[t]; + if (t <= 0) + return symbol_kind::S_YYEOF; + else if (t <= code_max) + return static_cast (translate_table[t]); else - return undef_token_; + return symbol_kind::S_YYUNDEF; } -#line 26 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" // lalr1.cc:1242 +#line 26 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" } } } // Gringo::Input::GroundTermGrammar -#line 1281 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/groundtermgrammar/grammar.cc" // lalr1.cc:1242 +#line 1352 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/groundtermgrammar/grammar.cc" + diff --git a/libgringo/gen/src/input/groundtermgrammar/grammar.hh b/libgringo/gen/src/input/groundtermgrammar/grammar.hh index 66809a644..f08a31efb 100644 --- a/libgringo/gen/src/input/groundtermgrammar/grammar.hh +++ b/libgringo/gen/src/input/groundtermgrammar/grammar.hh @@ -1,8 +1,8 @@ -// A Bison parser, made by GNU Bison 3.3.2. +// A Bison parser, made by GNU Bison 3.8.2. // Skeleton interface for Bison LALR(1) parsers in C++ -// Copyright (C) 2002-2015, 2018-2019 Free Software Foundation, Inc. +// Copyright (C) 2002-2015, 2018-2021 Free Software Foundation, Inc. // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ // GNU General Public License for more details. // You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// along with this program. If not, see . // As a special exception, you may create a larger work that contains // part or all of the Bison parser skeleton and distribute that work @@ -32,17 +32,18 @@ /** - ** \file /mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/groundtermgrammar/grammar.hh + ** \file /home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/groundtermgrammar/grammar.hh ** Define the Gringo::Input::GroundTermGrammar::parser class. */ // C++ LALR(1) parser skeleton written by Akim Demaille. -// Undocumented macros, especially those whose name start with YY_, -// are private implementation details. Do not rely on them. +// DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, +// especially those whose name start with YY_ or yy_. They are +// private implementation details that can be changed or removed. -#ifndef YY_GRINGOGROUNDTERMGRAMMAR_MNT_SCRATCH_KAMINSKI_BUILD_CLINGO_DEBUG_LIBGRINGO_SRC_INPUT_GROUNDTERMGRAMMAR_GRAMMAR_HH_INCLUDED -# define YY_GRINGOGROUNDTERMGRAMMAR_MNT_SCRATCH_KAMINSKI_BUILD_CLINGO_DEBUG_LIBGRINGO_SRC_INPUT_GROUNDTERMGRAMMAR_GRAMMAR_HH_INCLUDED +#ifndef YY_GRINGOGROUNDTERMGRAMMAR_HOME_KAMINSKI_DOCUMENTS_GIT_POTASSCO_CLINGO_BUILD_DEBUG_LIBGRINGO_SRC_INPUT_GROUNDTERMGRAMMAR_GRAMMAR_HH_INCLUDED +# define YY_GRINGOGROUNDTERMGRAMMAR_HOME_KAMINSKI_DOCUMENTS_GIT_POTASSCO_CLINGO_BUILD_DEBUG_LIBGRINGO_SRC_INPUT_GROUNDTERMGRAMMAR_GRAMMAR_HH_INCLUDED # include // std::abort @@ -90,38 +91,42 @@ # include "location.hh" -#ifndef YY_ATTRIBUTE -# if (defined __GNUC__ \ - && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ - || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C -# define YY_ATTRIBUTE(Spec) __attribute__(Spec) +#ifndef YY_ATTRIBUTE_PURE +# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) # else -# define YY_ATTRIBUTE(Spec) /* empty */ +# define YY_ATTRIBUTE_PURE # endif #endif -#ifndef YY_ATTRIBUTE_PURE -# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) -#endif - #ifndef YY_ATTRIBUTE_UNUSED -# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) +# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) +# else +# define YY_ATTRIBUTE_UNUSED +# endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ -# define YYUSE(E) ((void) (E)) +# define YY_USE(E) ((void) (E)) #else -# define YYUSE(E) /* empty */ +# define YY_USE(E) /* empty */ #endif -#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ /* Suppress an incorrect diagnostic about yylval being uninitialized. */ -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ +#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ +# if __GNUC__ * 100 + __GNUC_MINOR__ < 407 +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") +# else +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ +# endif +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ _Pragma ("GCC diagnostic pop") #else # define YY_INITIAL_VALUE(Value) Value @@ -134,6 +139,27 @@ # define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif +#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ +# define YY_IGNORE_USELESS_CAST_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") +# define YY_IGNORE_USELESS_CAST_END \ + _Pragma ("GCC diagnostic pop") +#endif +#ifndef YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_END +#endif + +# ifndef YY_CAST +# ifdef __cplusplus +# define YY_CAST(Type, Val) static_cast (Val) +# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast (Val) +# else +# define YY_CAST(Type, Val) ((Type) (Val)) +# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) +# endif +# endif # ifndef YY_NULLPTR # if defined __cplusplus # if 201103L <= __cplusplus @@ -151,9 +177,10 @@ # define YYDEBUG 0 #endif -#line 26 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" // lalr1.cc:401 +#line 26 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" namespace Gringo { namespace Input { namespace GroundTermGrammar { -#line 157 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/groundtermgrammar/grammar.hh" // lalr1.cc:401 +#line 183 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/groundtermgrammar/grammar.hh" + @@ -161,22 +188,29 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { class parser { public: -#ifndef YYSTYPE +#ifdef YYSTYPE +# ifdef __GNUC__ +# pragma GCC message "bison: do not #define YYSTYPE in C++, use %define api.value.type" +# endif + typedef YYSTYPE value_type; +#else /// Symbol semantic values. - union semantic_type + union value_type { - #line 63 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" // lalr1.cc:401 +#line 63 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" char const *str; int num; unsigned uid; uint64_t value; -#line 176 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/groundtermgrammar/grammar.hh" // lalr1.cc:401 +#line 208 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/groundtermgrammar/grammar.hh" + }; -#else - typedef YYSTYPE semantic_type; #endif + /// Backward compatibility (Bison 3.8). + typedef value_type semantic_type; + /// Symbol locations. typedef location location_type; @@ -198,52 +232,96 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { location_type location; }; - /// Tokens. + /// Token kinds. struct token { - enum yytokentype + enum token_kind_type { - END = 0, - ADD = 258, - AND = 259, - BNOT = 260, - COMMA = 261, - LPAREN = 262, - MOD = 263, - MUL = 264, - POW = 265, - QUESTION = 266, - RPAREN = 267, - SLASH = 268, - SUB = 269, - XOR = 270, - VBAR = 271, - SUPREMUM = 272, - INFIMUM = 273, - NUMBER = 274, - IDENTIFIER = 275, - STRING = 276, - UMINUS = 277, - UBNOT = 278 + YYEMPTY = -2, + END = 0, // "" + YYerror = 256, // error + YYUNDEF = 257, // "invalid token" + ADD = 258, // "+" + AND = 259, // "&" + BNOT = 260, // "~" + COMMA = 261, // "," + LPAREN = 262, // "(" + MOD = 263, // "\\" + MUL = 264, // "*" + POW = 265, // "**" + QUESTION = 266, // "?" + RPAREN = 267, // ")" + SLASH = 268, // "/" + SUB = 269, // "-" + XOR = 270, // "^" + VBAR = 271, // "|" + SUPREMUM = 272, // "#sup" + INFIMUM = 273, // "#inf" + NUMBER = 274, // "" + IDENTIFIER = 275, // "" + STRING = 276, // "" + UMINUS = 277, // UMINUS + UBNOT = 278 // UBNOT }; + /// Backward compatibility alias (Bison 3.6). + typedef token_kind_type yytokentype; }; - /// (External) token type, as returned by yylex. - typedef token::yytokentype token_type; + /// Token kind, as returned by yylex. + typedef token::token_kind_type token_kind_type; - /// Symbol type: an internal symbol number. - typedef int symbol_number_type; + /// Backward compatibility alias (Bison 3.6). + typedef token_kind_type token_type; - /// The symbol type number to denote an empty symbol. - enum { empty_symbol = -2 }; + /// Symbol kinds. + struct symbol_kind + { + enum symbol_kind_type + { + YYNTOKENS = 24, ///< Number of tokens. + S_YYEMPTY = -2, + S_YYEOF = 0, // "" + S_YYerror = 1, // error + S_YYUNDEF = 2, // "invalid token" + S_ADD = 3, // "+" + S_AND = 4, // "&" + S_BNOT = 5, // "~" + S_COMMA = 6, // "," + S_LPAREN = 7, // "(" + S_MOD = 8, // "\\" + S_MUL = 9, // "*" + S_POW = 10, // "**" + S_QUESTION = 11, // "?" + S_RPAREN = 12, // ")" + S_SLASH = 13, // "/" + S_SUB = 14, // "-" + S_XOR = 15, // "^" + S_VBAR = 16, // "|" + S_SUPREMUM = 17, // "#sup" + S_INFIMUM = 18, // "#inf" + S_NUMBER = 19, // "" + S_IDENTIFIER = 20, // "" + S_STRING = 21, // "" + S_UMINUS = 22, // UMINUS + S_UBNOT = 23, // UBNOT + S_YYACCEPT = 24, // $accept + S_start = 25, // start + S_term = 26, // term + S_nterms = 27, // nterms + S_terms = 28 // terms + }; + }; - /// Internal symbol number for tokens (subsumed by symbol_number_type). - typedef unsigned char token_number_type; + /// (Internal) symbol kind. + typedef symbol_kind::symbol_kind_type symbol_kind_type; + + /// The number of tokens. + static const symbol_kind_type YYNTOKENS = symbol_kind::YYNTOKENS; /// A complete symbol. /// - /// Expects its Base type to provide access to the symbol type - /// via type_get (). + /// Expects its Base type to provide access to the symbol kind + /// via kind (). /// /// Provide access to semantic value and location. template @@ -253,14 +331,18 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { typedef Base super_type; /// Default constructor. - basic_symbol () + basic_symbol () YY_NOEXCEPT : value () , location () {} #if 201103L <= YY_CPLUSPLUS /// Move constructor. - basic_symbol (basic_symbol&& that); + basic_symbol (basic_symbol&& that) + : Base (std::move (that)) + , value (std::move (that.value)) + , location (std::move (that.location)) + {} #endif /// Copy constructor. @@ -271,7 +353,7 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { /// Constructor for symbols with semantic value. basic_symbol (typename Base::kind_type t, - YY_RVREF (semantic_type) v, + YY_RVREF (value_type) v, YY_RVREF (location_type) l); /// Destroy the symbol. @@ -280,12 +362,23 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { clear (); } + + /// Destroy contents, and record that is empty. - void clear () + void clear () YY_NOEXCEPT { Base::clear (); } + /// The user-facing name of this symbol. + std::string name () const YY_NOEXCEPT + { + return parser::symbol_name (this->kind ()); + } + + /// Backward compatibility (Bison 3.6). + symbol_kind_type type_get () const YY_NOEXCEPT; + /// Whether empty. bool empty () const YY_NOEXCEPT; @@ -293,7 +386,7 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { void move (basic_symbol& s); /// The semantic value. - semantic_type value; + value_type value; /// The location. location_type location; @@ -306,52 +399,63 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { }; /// Type access provider for token (enum) based symbols. - struct by_type + struct by_kind { + /// The symbol kind as needed by the constructor. + typedef token_kind_type kind_type; + /// Default constructor. - by_type (); + by_kind () YY_NOEXCEPT; #if 201103L <= YY_CPLUSPLUS /// Move constructor. - by_type (by_type&& that); + by_kind (by_kind&& that) YY_NOEXCEPT; #endif /// Copy constructor. - by_type (const by_type& that); - - /// The symbol type as needed by the constructor. - typedef token_type kind_type; + by_kind (const by_kind& that) YY_NOEXCEPT; /// Constructor from (external) token numbers. - by_type (kind_type t); + by_kind (kind_type t) YY_NOEXCEPT; + + /// Record that this symbol is empty. - void clear (); + void clear () YY_NOEXCEPT; - /// Steal the symbol type from \a that. - void move (by_type& that); + /// Steal the symbol kind from \a that. + void move (by_kind& that); /// The (internal) type number (corresponding to \a type). /// \a empty when empty. - symbol_number_type type_get () const YY_NOEXCEPT; + symbol_kind_type kind () const YY_NOEXCEPT; - /// The token. - token_type token () const YY_NOEXCEPT; + /// Backward compatibility (Bison 3.6). + symbol_kind_type type_get () const YY_NOEXCEPT; - /// The symbol type. - /// \a empty_symbol when empty. - /// An int, not token_number_type, to be able to store empty_symbol. - int type; + /// The symbol kind. + /// \a S_YYEMPTY when empty. + symbol_kind_type kind_; }; + /// Backward compatibility for a private implementation detail (Bison 3.6). + typedef by_kind by_type; + /// "External" symbols: returned by the scanner. - struct symbol_type : basic_symbol + struct symbol_type : basic_symbol {}; /// Build a parser object. parser (Gringo::Input::GroundTermParser *lexer_yyarg); virtual ~parser (); +#if 201103L <= YY_CPLUSPLUS + /// Non copyable. + parser (const parser&) = delete; + /// Non copyable. + parser& operator= (const parser&) = delete; +#endif + /// Parse. An alias for parse (). /// \returns 0 iff parsing succeeded. int operator() (); @@ -382,95 +486,125 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { /// Report a syntax error. void error (const syntax_error& err); + /// The user-facing name of the symbol whose (internal) number is + /// YYSYMBOL. No bounds checking. + static std::string symbol_name (symbol_kind_type yysymbol); + + class context + { + public: + context (const parser& yyparser, const symbol_type& yyla); + const symbol_type& lookahead () const YY_NOEXCEPT { return yyla_; } + symbol_kind_type token () const YY_NOEXCEPT { return yyla_.kind (); } + const location_type& location () const YY_NOEXCEPT { return yyla_.location; } + + /// Put in YYARG at most YYARGN of the expected tokens, and return the + /// number of tokens stored in YYARG. If YYARG is null, return the + /// number of expected tokens (guaranteed to be less than YYNTOKENS). + int expected_tokens (symbol_kind_type yyarg[], int yyargn) const; + + private: + const parser& yyparser_; + const symbol_type& yyla_; + }; + private: - /// This class is not copyable. +#if YY_CPLUSPLUS < 201103L + /// Non copyable. parser (const parser&); + /// Non copyable. parser& operator= (const parser&); +#endif - /// State numbers. - typedef int state_type; - /// Generate an error message. - /// \param yystate the state where the error occurred. - /// \param yyla the lookahead token. - virtual std::string yysyntax_error_ (state_type yystate, - const symbol_type& yyla) const; + /// Stored state numbers (used for stacks). + typedef signed char state_type; + + /// The arguments of the error message. + int yy_syntax_error_arguments_ (const context& yyctx, + symbol_kind_type yyarg[], int yyargn) const; + /// Generate an error message. + /// \param yyctx the context in which the error occurred. + virtual std::string yysyntax_error_ (const context& yyctx) const; /// Compute post-reduction state. /// \param yystate the current state /// \param yysym the nonterminal to push on the stack - state_type yy_lr_goto_state_ (state_type yystate, int yysym); + static state_type yy_lr_goto_state_ (state_type yystate, int yysym); /// Whether the given \c yypact_ value indicates a defaulted state. /// \param yyvalue the value to check - static bool yy_pact_value_is_default_ (int yyvalue); + static bool yy_pact_value_is_default_ (int yyvalue) YY_NOEXCEPT; /// Whether the given \c yytable_ value indicates a syntax error. /// \param yyvalue the value to check - static bool yy_table_value_is_error_ (int yyvalue); + static bool yy_table_value_is_error_ (int yyvalue) YY_NOEXCEPT; static const signed char yypact_ninf_; static const signed char yytable_ninf_; - /// Convert a scanner token number \a t to a symbol number. - static token_number_type yytranslate_ (int t); + /// Convert a scanner token kind \a t to a symbol kind. + /// In theory \a t should be a token_kind_type, but character literals + /// are valid, yet not members of the token_kind_type enum. + static symbol_kind_type yytranslate_ (int t) YY_NOEXCEPT; - // Tables. - // YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - // STATE-NUM. - static const signed char yypact_[]; + /// Convert the symbol name \a n to a form suitable for a diagnostic. + static std::string yytnamerr_ (const char *yystr); + + /// For a symbol, its name in clear. + static const char* const yytname_[]; - // YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. - // Performed when YYTABLE does not specify something else to do. Zero - // means the default is an error. - static const unsigned char yydefact_[]; - // YYPGOTO[NTERM-NUM]. - static const signed char yypgoto_[]; + // Tables. + // YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + // STATE-NUM. + static const signed char yypact_[]; - // YYDEFGOTO[NTERM-NUM]. - static const signed char yydefgoto_[]; + // YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + // Performed when YYTABLE does not specify something else to do. Zero + // means the default is an error. + static const signed char yydefact_[]; - // YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If - // positive, shift that token. If negative, reduce the rule whose - // number is the opposite. If YYTABLE_NINF, syntax error. - static const unsigned char yytable_[]; + // YYPGOTO[NTERM-NUM]. + static const signed char yypgoto_[]; - static const signed char yycheck_[]; + // YYDEFGOTO[NTERM-NUM]. + static const signed char yydefgoto_[]; - // YYSTOS[STATE-NUM] -- The (internal number of the) accessing - // symbol of state STATE-NUM. - static const unsigned char yystos_[]; + // YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + // positive, shift that token. If negative, reduce the rule whose + // number is the opposite. If YYTABLE_NINF, syntax error. + static const signed char yytable_[]; - // YYR1[YYN] -- Symbol number of symbol that rule YYN derives. - static const unsigned char yyr1_[]; + static const signed char yycheck_[]; - // YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. - static const unsigned char yyr2_[]; + // YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of + // state STATE-NUM. + static const signed char yystos_[]; + // YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. + static const signed char yyr1_[]; - /// Convert the symbol name \a n to a form suitable for a diagnostic. - static std::string yytnamerr_ (const char *n); + // YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. + static const signed char yyr2_[]; - /// For a symbol, its name in clear. - static const char* const yytname_[]; #if YYDEBUG - // YYRLINE[YYN] -- Source line where rule number YYN was defined. - static const unsigned char yyrline_[]; + // YYRLINE[YYN] -- Source line where rule number YYN was defined. + static const unsigned char yyrline_[]; /// Report on the debug stream that the rule \a r is going to be reduced. - virtual void yy_reduce_print_ (int r); + virtual void yy_reduce_print_ (int r) const; /// Print the state stack on the debug stream. - virtual void yystack_print_ (); + virtual void yy_stack_print_ () const; /// Debugging level. int yydebug_; /// Debug stream. std::ostream* yycdebug_; - /// \brief Display a symbol type, value and location. + /// \brief Display a symbol kind, value and location. /// \param yyo The output stream. /// \param yysym The symbol. template @@ -491,7 +625,7 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { /// Default constructor. by_state () YY_NOEXCEPT; - /// The symbol type as needed by the constructor. + /// The symbol kind as needed by the constructor. typedef state_type kind_type; /// Constructor. @@ -503,15 +637,16 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { /// Record that this symbol is empty. void clear () YY_NOEXCEPT; - /// Steal the symbol type from \a that. + /// Steal the symbol kind from \a that. void move (by_state& that); - /// The (internal) type number (corresponding to \a state). - /// \a empty_symbol when empty. - symbol_number_type type_get () const YY_NOEXCEPT; + /// The symbol kind (corresponding to \a state). + /// \a symbol_kind::S_YYEMPTY when empty. + symbol_kind_type kind () const YY_NOEXCEPT; /// The state number used to denote an empty symbol. - enum { empty_state = -1 }; + /// We use the initial state, as it does not have a value. + enum { empty_state = 0 }; /// The state. /// \a empty when empty. @@ -533,6 +668,10 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { /// Assignment, needed by push_back by some old implementations. /// Moves the contents of that. stack_symbol_type& operator= (stack_symbol_type& that); + + /// Assignment, needed by push_back by other implementations. + /// Needed by some other old implementations. + stack_symbol_type& operator= (const stack_symbol_type& that); #endif }; @@ -542,48 +681,38 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { { public: // Hide our reversed order. - typedef typename S::reverse_iterator iterator; - typedef typename S::const_reverse_iterator const_iterator; + typedef typename S::iterator iterator; + typedef typename S::const_iterator const_iterator; typedef typename S::size_type size_type; + typedef typename std::ptrdiff_t index_type; - stack (size_type n = 200) + stack (size_type n = 200) YY_NOEXCEPT : seq_ (n) {} - /// Random access. - /// - /// Index 0 returns the topmost element. - T& - operator[] (size_type i) - { - return seq_[size () - 1 - i]; - } - - /// Random access. - /// - /// Index 0 returns the topmost element. - T& - operator[] (int i) - { - return operator[] (size_type (i)); - } +#if 201103L <= YY_CPLUSPLUS + /// Non copyable. + stack (const stack&) = delete; + /// Non copyable. + stack& operator= (const stack&) = delete; +#endif /// Random access. /// /// Index 0 returns the topmost element. const T& - operator[] (size_type i) const + operator[] (index_type i) const { - return seq_[size () - 1 - i]; + return seq_[size_type (size () - 1 - i)]; } /// Random access. /// /// Index 0 returns the topmost element. - const T& - operator[] (int i) const + T& + operator[] (index_type i) { - return operator[] (size_type (i)); + return seq_[size_type (size () - 1 - i)]; } /// Steal the contents of \a t. @@ -598,7 +727,7 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { /// Pop elements from the stack. void - pop (int n = 1) YY_NOEXCEPT + pop (std::ptrdiff_t n = 1) YY_NOEXCEPT { for (; 0 < n; --n) seq_.pop_back (); @@ -612,49 +741,53 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { } /// Number of elements on the stack. - size_type + index_type size () const YY_NOEXCEPT { - return seq_.size (); + return index_type (seq_.size ()); } /// Iterator on top of the stack (going downwards). const_iterator begin () const YY_NOEXCEPT { - return seq_.rbegin (); + return seq_.begin (); } /// Bottom of the stack. const_iterator end () const YY_NOEXCEPT { - return seq_.rend (); + return seq_.end (); } /// Present a slice of the top of a stack. class slice { public: - slice (const stack& stack, int range) + slice (const stack& stack, index_type range) YY_NOEXCEPT : stack_ (stack) , range_ (range) {} const T& - operator[] (int i) const + operator[] (index_type i) const { return stack_[range_ - i]; } private: const stack& stack_; - int range_; + index_type range_; }; private: +#if YY_CPLUSPLUS < 201103L + /// Non copyable. stack (const stack&); + /// Non copyable. stack& operator= (const stack&); +#endif /// The wrapped container. S seq_; }; @@ -682,31 +815,28 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { void yypush_ (const char* m, state_type s, YY_MOVE_REF (symbol_type) sym); /// Pop \a n symbols from the stack. - void yypop_ (int n = 1); + void yypop_ (int n = 1) YY_NOEXCEPT; /// Constants. enum { - yyeof_ = 0, yylast_ = 129, ///< Last index in yytable_. yynnts_ = 5, ///< Number of nonterminal symbols. - yyfinal_ = 20, ///< Termination state number. - yyterror_ = 1, - yyerrcode_ = 256, - yyntokens_ = 24 ///< Number of tokens. + yyfinal_ = 20 ///< Termination state number. }; // User arguments. Gringo::Input::GroundTermParser *lexer; + }; -#line 26 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" // lalr1.cc:401 +#line 26 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" } } } // Gringo::Input::GroundTermGrammar -#line 708 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/groundtermgrammar/grammar.hh" // lalr1.cc:401 +#line 838 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/groundtermgrammar/grammar.hh" -#endif // !YY_GRINGOGROUNDTERMGRAMMAR_MNT_SCRATCH_KAMINSKI_BUILD_CLINGO_DEBUG_LIBGRINGO_SRC_INPUT_GROUNDTERMGRAMMAR_GRAMMAR_HH_INCLUDED +#endif // !YY_GRINGOGROUNDTERMGRAMMAR_HOME_KAMINSKI_DOCUMENTS_GIT_POTASSCO_CLINGO_BUILD_DEBUG_LIBGRINGO_SRC_INPUT_GROUNDTERMGRAMMAR_GRAMMAR_HH_INCLUDED diff --git a/libgringo/gen/src/input/groundtermgrammar/location.hh b/libgringo/gen/src/input/groundtermgrammar/location.hh index 5639d1621..ab90a41b2 100644 --- a/libgringo/gen/src/input/groundtermgrammar/location.hh +++ b/libgringo/gen/src/input/groundtermgrammar/location.hh @@ -1,8 +1,8 @@ -// A Bison parser, made by GNU Bison 3.3.2. +// A Bison parser, made by GNU Bison 3.8.2. // Locations for Bison parsers in C++ -// Copyright (C) 2002-2015, 2018-2019 Free Software Foundation, Inc. +// Copyright (C) 2002-2015, 2018-2021 Free Software Foundation, Inc. // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ // GNU General Public License for more details. // You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// along with this program. If not, see . // As a special exception, you may create a larger work that contains // part or all of the Bison parser skeleton and distribute that work @@ -31,14 +31,13 @@ // version 2.2 of Bison. /** - ** \file /mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/groundtermgrammar/location.hh + ** \file /home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/groundtermgrammar/location.hh ** Define the Gringo::Input::GroundTermGrammar::location class. */ -#ifndef YY_GRINGOGROUNDTERMGRAMMAR_MNT_SCRATCH_KAMINSKI_BUILD_CLINGO_DEBUG_LIBGRINGO_SRC_INPUT_GROUNDTERMGRAMMAR_LOCATION_HH_INCLUDED -# define YY_GRINGOGROUNDTERMGRAMMAR_MNT_SCRATCH_KAMINSKI_BUILD_CLINGO_DEBUG_LIBGRINGO_SRC_INPUT_GROUNDTERMGRAMMAR_LOCATION_HH_INCLUDED +#ifndef YY_GRINGOGROUNDTERMGRAMMAR_HOME_KAMINSKI_DOCUMENTS_GIT_POTASSCO_CLINGO_BUILD_DEBUG_LIBGRINGO_SRC_INPUT_GROUNDTERMGRAMMAR_LOCATION_HH_INCLUDED +# define YY_GRINGOGROUNDTERMGRAMMAR_HOME_KAMINSKI_DOCUMENTS_GIT_POTASSCO_CLINGO_BUILD_DEBUG_LIBGRINGO_SRC_INPUT_GROUNDTERMGRAMMAR_LOCATION_HH_INCLUDED -# include // std::max # include # include @@ -54,17 +53,23 @@ # endif # endif -#line 26 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" // location.cc:339 +#line 26 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" namespace Gringo { namespace Input { namespace GroundTermGrammar { -#line 60 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/groundtermgrammar/location.hh" // location.cc:339 +#line 59 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/groundtermgrammar/location.hh" + /// A point in a source file. class position { public: + /// Type for file name. + typedef const std::string filename_type; + /// Type for line and column numbers. + typedef int counter_type; + /// Construct a position. - explicit position (std::string* f = YY_NULLPTR, - unsigned l = 1u, - unsigned c = 1u) + explicit position (filename_type* f = YY_NULLPTR, + counter_type l = 1, + counter_type c = 1) : filename (f) , line (l) , column (c) @@ -72,9 +77,9 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { /// Initialization. - void initialize (std::string* fn = YY_NULLPTR, - unsigned l = 1u, - unsigned c = 1u) + void initialize (filename_type* fn = YY_NULLPTR, + counter_type l = 1, + counter_type c = 1) { filename = fn; line = l; @@ -84,41 +89,40 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { /** \name Line and Column related manipulators ** \{ */ /// (line related) Advance to the COUNT next lines. - void lines (int count = 1) + void lines (counter_type count = 1) { if (count) { - column = 1u; + column = 1; line = add_ (line, count, 1); } } /// (column related) Advance to the COUNT next columns. - void columns (int count = 1) + void columns (counter_type count = 1) { column = add_ (column, count, 1); } /** \} */ /// File name to which this position refers. - std::string* filename; + filename_type* filename; /// Current line number. - unsigned line; + counter_type line; /// Current column number. - unsigned column; + counter_type column; private: /// Compute max (min, lhs+rhs). - static unsigned add_ (unsigned lhs, int rhs, int min) + static counter_type add_ (counter_type lhs, counter_type rhs, counter_type min) { - return static_cast (std::max (min, - static_cast (lhs) + rhs)); + return lhs + rhs < min ? min : lhs + rhs; } }; /// Add \a width columns, in place. inline position& - operator+= (position& res, int width) + operator+= (position& res, position::counter_type width) { res.columns (width); return res; @@ -126,43 +130,25 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { /// Add \a width columns. inline position - operator+ (position res, int width) + operator+ (position res, position::counter_type width) { return res += width; } /// Subtract \a width columns, in place. inline position& - operator-= (position& res, int width) + operator-= (position& res, position::counter_type width) { return res += -width; } /// Subtract \a width columns. inline position - operator- (position res, int width) + operator- (position res, position::counter_type width) { return res -= width; } - /// Compare two position objects. - inline bool - operator== (const position& pos1, const position& pos2) - { - return (pos1.line == pos2.line - && pos1.column == pos2.column - && (pos1.filename == pos2.filename - || (pos1.filename && pos2.filename - && *pos1.filename == *pos2.filename))); - } - - /// Compare two position objects. - inline bool - operator!= (const position& pos1, const position& pos2) - { - return !(pos1 == pos2); - } - /** \brief Intercept output stream redirection. ** \param ostr the destination output stream ** \param pos a reference to the position to redirect @@ -180,6 +166,10 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { class location { public: + /// Type for file name. + typedef position::filename_type filename_type; + /// Type for line and column numbers. + typedef position::counter_type counter_type; /// Construct a location from \a b to \a e. location (const position& b, const position& e) @@ -194,18 +184,18 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { {} /// Construct a 0-width location in \a f, \a l, \a c. - explicit location (std::string* f, - unsigned l = 1u, - unsigned c = 1u) + explicit location (filename_type* f, + counter_type l = 1, + counter_type c = 1) : begin (f, l, c) , end (f, l, c) {} /// Initialization. - void initialize (std::string* f = YY_NULLPTR, - unsigned l = 1u, - unsigned c = 1u) + void initialize (filename_type* f = YY_NULLPTR, + counter_type l = 1, + counter_type c = 1) { begin.initialize (f, l, c); end = begin; @@ -221,13 +211,13 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { } /// Extend the current location to the COUNT next columns. - void columns (int count = 1) + void columns (counter_type count = 1) { end += count; } /// Extend the current location to the COUNT next lines. - void lines (int count = 1) + void lines (counter_type count = 1) { end.lines (count); } @@ -242,57 +232,49 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { }; /// Join two locations, in place. - inline location& operator+= (location& res, const location& end) + inline location& + operator+= (location& res, const location& end) { res.end = end.end; return res; } /// Join two locations. - inline location operator+ (location res, const location& end) + inline location + operator+ (location res, const location& end) { return res += end; } /// Add \a width columns to the end position, in place. - inline location& operator+= (location& res, int width) + inline location& + operator+= (location& res, location::counter_type width) { res.columns (width); return res; } /// Add \a width columns to the end position. - inline location operator+ (location res, int width) + inline location + operator+ (location res, location::counter_type width) { return res += width; } /// Subtract \a width columns to the end position, in place. - inline location& operator-= (location& res, int width) + inline location& + operator-= (location& res, location::counter_type width) { return res += -width; } /// Subtract \a width columns to the end position. - inline location operator- (location res, int width) + inline location + operator- (location res, location::counter_type width) { return res -= width; } - /// Compare two location objects. - inline bool - operator== (const location& loc1, const location& loc2) - { - return loc1.begin == loc2.begin && loc1.end == loc2.end; - } - - /// Compare two location objects. - inline bool - operator!= (const location& loc1, const location& loc2) - { - return !(loc1 == loc2); - } - /** \brief Intercept output stream redirection. ** \param ostr the destination output stream ** \param loc a reference to the location to redirect @@ -303,7 +285,8 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { std::basic_ostream& operator<< (std::basic_ostream& ostr, const location& loc) { - unsigned end_col = 0 < loc.end.column ? loc.end.column - 1 : 0; + location::counter_type end_col + = 0 < loc.end.column ? loc.end.column - 1 : 0; ostr << loc.begin; if (loc.end.filename && (!loc.begin.filename @@ -316,7 +299,8 @@ namespace Gringo { namespace Input { namespace GroundTermGrammar { return ostr; } -#line 26 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" // location.cc:339 +#line 26 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/groundtermgrammar.yy" } } } // Gringo::Input::GroundTermGrammar -#line 322 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/groundtermgrammar/location.hh" // location.cc:339 -#endif // !YY_GRINGOGROUNDTERMGRAMMAR_MNT_SCRATCH_KAMINSKI_BUILD_CLINGO_DEBUG_LIBGRINGO_SRC_INPUT_GROUNDTERMGRAMMAR_LOCATION_HH_INCLUDED +#line 305 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/groundtermgrammar/location.hh" + +#endif // !YY_GRINGOGROUNDTERMGRAMMAR_HOME_KAMINSKI_DOCUMENTS_GIT_POTASSCO_CLINGO_BUILD_DEBUG_LIBGRINGO_SRC_INPUT_GROUNDTERMGRAMMAR_LOCATION_HH_INCLUDED diff --git a/libgringo/gen/src/input/groundtermgrammar/position.hh b/libgringo/gen/src/input/groundtermgrammar/position.hh index 67f46e294..1bd8e260b 100644 --- a/libgringo/gen/src/input/groundtermgrammar/position.hh +++ b/libgringo/gen/src/input/groundtermgrammar/position.hh @@ -1,10 +1,10 @@ -// A Bison parser, made by GNU Bison 3.3.2. +// A Bison parser, made by GNU Bison 3.8.2. // Starting with Bison 3.2, this file is useless: the structure it // used to define is now defined in "location.hh". // // To get rid of this file: -// 1. add 'require "3.2"' (or newer) to your grammar file +// 1. add '%require "3.2"' (or newer) to your grammar file // 2. remove references to this file from your build system // 3. if you used to include it, include "location.hh" instead. diff --git a/libgringo/gen/src/input/groundtermgrammar/stack.hh b/libgringo/gen/src/input/groundtermgrammar/stack.hh index e9db42924..746965da8 100644 --- a/libgringo/gen/src/input/groundtermgrammar/stack.hh +++ b/libgringo/gen/src/input/groundtermgrammar/stack.hh @@ -1,8 +1,8 @@ -// A Bison parser, made by GNU Bison 3.3.2. +// A Bison parser, made by GNU Bison 3.8.2. // Starting with Bison 3.2, this file is useless: the structure it // used to define is now defined with the parser itself. // // To get rid of this file: -// 1. add 'require "3.2"' (or newer) to your grammar file +// 1. add '%require "3.2"' (or newer) to your grammar file // 2. remove references to this file from your build system. diff --git a/libgringo/gen/src/input/groundtermlexer.hh b/libgringo/gen/src/input/groundtermlexer.hh index 9d2feb85c..3545e7894 100644 --- a/libgringo/gen/src/input/groundtermlexer.hh +++ b/libgringo/gen/src/input/groundtermlexer.hh @@ -1,4 +1,4 @@ -/* Generated by re2c 1.1.1 on Mon Jan 23 17:07:01 2023 */ +/* Generated by re2c 3.1 on Sat Jun 22 13:23:28 2024 */ #line 1 "/home/kaminski/Documents/git/potassco/clingo/libgringo//src/input/groundtermlexer.xh" // {{{ MIT License @@ -39,587 +39,587 @@ start: start(); auto &value = *static_cast(pValue); -#line 43 "/mnt/scratch/kaminski/build/clingo/debug/libgringo//src/input/groundtermlexer.hh" +#line 43 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo//src/input/groundtermlexer.hh" { YYCTYPE yych; unsigned int yyaccept = 0; if ((YYLIMIT - YYCURSOR) < 9) YYFILL(9); yych = *YYCURSOR; switch (yych) { - case '\t': - case '\r': - case ' ': goto yy4; - case '\n': goto yy7; - case '"': goto yy9; - case '#': goto yy10; - case '&': goto yy11; - case '\'': - case '_': goto yy13; - case '(': goto yy14; - case ')': goto yy16; - case '*': goto yy18; - case '+': goto yy20; - case ',': goto yy22; - case '-': goto yy24; - case '/': goto yy26; - case '0': goto yy28; - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy30; - case '?': goto yy32; - case '\\': goto yy34; - case '^': goto yy36; - case 'a': - case 'b': - case 'c': - case 'd': - case 'e': - case 'f': - case 'g': - case 'h': - case 'i': - case 'j': - case 'k': - case 'l': - case 'm': - case 'n': - case 'o': - case 'p': - case 'q': - case 'r': - case 's': - case 't': - case 'u': - case 'v': - case 'w': - case 'x': - case 'y': - case 'z': goto yy38; - case '|': goto yy41; - case '~': goto yy43; - default: goto yy2; - } -yy2: + case '\t': + case '\r': + case ' ': goto yy3; + case '\n': goto yy5; + case '"': goto yy6; + case '#': goto yy7; + case '&': goto yy8; + case '\'': + case '_': goto yy9; + case '(': goto yy10; + case ')': goto yy11; + case '*': goto yy12; + case '+': goto yy14; + case ',': goto yy15; + case '-': goto yy16; + case '/': goto yy17; + case '0': goto yy18; + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy20; + case '?': goto yy21; + case '\\': goto yy22; + case '^': goto yy23; + case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + case 'g': + case 'h': + case 'i': + case 'j': + case 'k': + case 'l': + case 'm': + case 'n': + case 'o': + case 'p': + case 'q': + case 'r': + case 's': + case 't': + case 'u': + case 'v': + case 'w': + case 'x': + case 'y': + case 'z': goto yy24; + case '|': goto yy26; + case '~': goto yy27; + default: goto yy1; + } +yy1: ++YYCURSOR; -yy3: +yy2: #line 74 "/home/kaminski/Documents/git/potassco/clingo/libgringo//src/input/groundtermlexer.xh" { lexerError(string(), log); goto start; } -#line 114 "/mnt/scratch/kaminski/build/clingo/debug/libgringo//src/input/groundtermlexer.hh" -yy4: +#line 114 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo//src/input/groundtermlexer.hh" +yy3: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = *YYCURSOR; switch (yych) { - case '\t': - case '\r': - case ' ': goto yy4; - default: goto yy6; + case '\t': + case '\r': + case ' ': goto yy3; + default: goto yy4; } -yy6: +yy4: #line 51 "/home/kaminski/Documents/git/potassco/clingo/libgringo//src/input/groundtermlexer.xh" { goto start; } -#line 128 "/mnt/scratch/kaminski/build/clingo/debug/libgringo//src/input/groundtermlexer.hh" -yy7: +#line 128 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo//src/input/groundtermlexer.hh" +yy5: ++YYCURSOR; #line 52 "/home/kaminski/Documents/git/potassco/clingo/libgringo//src/input/groundtermlexer.xh" { if(eof()) return 0; step(); goto start; } -#line 133 "/mnt/scratch/kaminski/build/clingo/debug/libgringo//src/input/groundtermlexer.hh" -yy9: +#line 133 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo//src/input/groundtermlexer.hh" +yy6: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); switch (yych) { - case '\n': goto yy3; - default: goto yy46; + case '\n': goto yy2; + default: goto yy29; } -yy10: +yy7: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); switch (yych) { - case 'i': goto yy51; - case 's': goto yy52; - default: goto yy3; + case 'i': goto yy33; + case 's': goto yy34; + default: goto yy2; } -yy11: +yy8: ++YYCURSOR; #line 68 "/home/kaminski/Documents/git/potassco/clingo/libgringo//src/input/groundtermlexer.xh" { return GroundTermGrammar::parser::token::AND; } -#line 153 "/mnt/scratch/kaminski/build/clingo/debug/libgringo//src/input/groundtermlexer.hh" -yy13: +#line 153 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo//src/input/groundtermlexer.hh" +yy9: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); switch (yych) { - case '\'': - case '_': goto yy53; - case 'a': - case 'b': - case 'c': - case 'd': - case 'e': - case 'f': - case 'g': - case 'h': - case 'i': - case 'j': - case 'k': - case 'l': - case 'm': - case 'n': - case 'o': - case 'p': - case 'q': - case 'r': - case 's': - case 't': - case 'u': - case 'v': - case 'w': - case 'x': - case 'y': - case 'z': goto yy38; - default: goto yy3; + case '\'': + case '_': goto yy35; + case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + case 'g': + case 'h': + case 'i': + case 'j': + case 'k': + case 'l': + case 'm': + case 'n': + case 'o': + case 'p': + case 'q': + case 'r': + case 's': + case 't': + case 'u': + case 'v': + case 'w': + case 'x': + case 'y': + case 'z': goto yy24; + default: goto yy2; } -yy14: +yy10: ++YYCURSOR; #line 60 "/home/kaminski/Documents/git/potassco/clingo/libgringo//src/input/groundtermlexer.xh" { return GroundTermGrammar::parser::token::LPAREN; } -#line 192 "/mnt/scratch/kaminski/build/clingo/debug/libgringo//src/input/groundtermlexer.hh" -yy16: +#line 192 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo//src/input/groundtermlexer.hh" +yy11: ++YYCURSOR; #line 61 "/home/kaminski/Documents/git/potassco/clingo/libgringo//src/input/groundtermlexer.xh" { return GroundTermGrammar::parser::token::RPAREN; } -#line 197 "/mnt/scratch/kaminski/build/clingo/debug/libgringo//src/input/groundtermlexer.hh" -yy18: +#line 197 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo//src/input/groundtermlexer.hh" +yy12: yych = *++YYCURSOR; switch (yych) { - case '*': goto yy55; - default: goto yy19; + case '*': goto yy36; + default: goto yy13; } -yy19: +yy13: #line 66 "/home/kaminski/Documents/git/potassco/clingo/libgringo//src/input/groundtermlexer.xh" { return GroundTermGrammar::parser::token::MUL; } -#line 207 "/mnt/scratch/kaminski/build/clingo/debug/libgringo//src/input/groundtermlexer.hh" -yy20: +#line 207 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo//src/input/groundtermlexer.hh" +yy14: ++YYCURSOR; #line 62 "/home/kaminski/Documents/git/potassco/clingo/libgringo//src/input/groundtermlexer.xh" { return GroundTermGrammar::parser::token::ADD; } -#line 212 "/mnt/scratch/kaminski/build/clingo/debug/libgringo//src/input/groundtermlexer.hh" -yy22: +#line 212 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo//src/input/groundtermlexer.hh" +yy15: ++YYCURSOR; #line 72 "/home/kaminski/Documents/git/potassco/clingo/libgringo//src/input/groundtermlexer.xh" { return GroundTermGrammar::parser::token::COMMA; } -#line 217 "/mnt/scratch/kaminski/build/clingo/debug/libgringo//src/input/groundtermlexer.hh" -yy24: +#line 217 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo//src/input/groundtermlexer.hh" +yy16: ++YYCURSOR; #line 63 "/home/kaminski/Documents/git/potassco/clingo/libgringo//src/input/groundtermlexer.xh" { return GroundTermGrammar::parser::token::SUB; } -#line 222 "/mnt/scratch/kaminski/build/clingo/debug/libgringo//src/input/groundtermlexer.hh" -yy26: +#line 222 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo//src/input/groundtermlexer.hh" +yy17: ++YYCURSOR; #line 67 "/home/kaminski/Documents/git/potassco/clingo/libgringo//src/input/groundtermlexer.xh" { return GroundTermGrammar::parser::token::SLASH; } -#line 227 "/mnt/scratch/kaminski/build/clingo/debug/libgringo//src/input/groundtermlexer.hh" -yy28: +#line 227 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo//src/input/groundtermlexer.hh" +yy18: yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); switch (yych) { - case 'b': goto yy57; - case 'o': goto yy58; - case 'x': goto yy59; - default: goto yy29; + case 'b': goto yy37; + case 'o': goto yy38; + case 'x': goto yy39; + default: goto yy19; } -yy29: +yy19: #line 57 "/home/kaminski/Documents/git/potassco/clingo/libgringo//src/input/groundtermlexer.xh" { value.num = clingo_number(); return GroundTermGrammar::parser::token::NUMBER; } -#line 240 "/mnt/scratch/kaminski/build/clingo/debug/libgringo//src/input/groundtermlexer.hh" -yy30: +#line 240 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo//src/input/groundtermlexer.hh" +yy20: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = *YYCURSOR; switch (yych) { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy30; - default: goto yy29; - } -yy32: + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy20; + default: goto yy19; + } +yy21: ++YYCURSOR; #line 71 "/home/kaminski/Documents/git/potassco/clingo/libgringo//src/input/groundtermlexer.xh" { return GroundTermGrammar::parser::token::QUESTION; } -#line 262 "/mnt/scratch/kaminski/build/clingo/debug/libgringo//src/input/groundtermlexer.hh" -yy34: +#line 262 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo//src/input/groundtermlexer.hh" +yy22: ++YYCURSOR; #line 65 "/home/kaminski/Documents/git/potassco/clingo/libgringo//src/input/groundtermlexer.xh" { return GroundTermGrammar::parser::token::MOD; } -#line 267 "/mnt/scratch/kaminski/build/clingo/debug/libgringo//src/input/groundtermlexer.hh" -yy36: +#line 267 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo//src/input/groundtermlexer.hh" +yy23: ++YYCURSOR; #line 69 "/home/kaminski/Documents/git/potassco/clingo/libgringo//src/input/groundtermlexer.xh" { return GroundTermGrammar::parser::token::XOR; } -#line 272 "/mnt/scratch/kaminski/build/clingo/debug/libgringo//src/input/groundtermlexer.hh" -yy38: +#line 272 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo//src/input/groundtermlexer.hh" +yy24: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = *YYCURSOR; switch (yych) { - case '\'': - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - case 'A': - case 'B': - case 'C': - case 'D': - case 'E': - case 'F': - case 'G': - case 'H': - case 'I': - case 'J': - case 'K': - case 'L': - case 'M': - case 'N': - case 'O': - case 'P': - case 'Q': - case 'R': - case 'S': - case 'T': - case 'U': - case 'V': - case 'W': - case 'X': - case 'Y': - case 'Z': - case '_': - case 'a': - case 'b': - case 'c': - case 'd': - case 'e': - case 'f': - case 'g': - case 'h': - case 'i': - case 'j': - case 'k': - case 'l': - case 'm': - case 'n': - case 'o': - case 'p': - case 'q': - case 'r': - case 's': - case 't': - case 'u': - case 'v': - case 'w': - case 'x': - case 'y': - case 'z': goto yy38; - default: goto yy40; - } -yy40: + case '\'': + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + case 'G': + case 'H': + case 'I': + case 'J': + case 'K': + case 'L': + case 'M': + case 'N': + case 'O': + case 'P': + case 'Q': + case 'R': + case 'S': + case 'T': + case 'U': + case 'V': + case 'W': + case 'X': + case 'Y': + case 'Z': + case '_': + case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + case 'g': + case 'h': + case 'i': + case 'j': + case 'k': + case 'l': + case 'm': + case 'n': + case 'o': + case 'p': + case 'q': + case 'r': + case 's': + case 't': + case 'u': + case 'v': + case 'w': + case 'x': + case 'y': + case 'z': goto yy24; + default: goto yy25; + } +yy25: #line 56 "/home/kaminski/Documents/git/potassco/clingo/libgringo//src/input/groundtermlexer.xh" { value.str = String(string()).c_str(); return GroundTermGrammar::parser::token::IDENTIFIER; } -#line 347 "/mnt/scratch/kaminski/build/clingo/debug/libgringo//src/input/groundtermlexer.hh" -yy41: +#line 347 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo//src/input/groundtermlexer.hh" +yy26: ++YYCURSOR; #line 73 "/home/kaminski/Documents/git/potassco/clingo/libgringo//src/input/groundtermlexer.xh" { return GroundTermGrammar::parser::token::VBAR; } -#line 352 "/mnt/scratch/kaminski/build/clingo/debug/libgringo//src/input/groundtermlexer.hh" -yy43: +#line 352 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo//src/input/groundtermlexer.hh" +yy27: ++YYCURSOR; #line 70 "/home/kaminski/Documents/git/potassco/clingo/libgringo//src/input/groundtermlexer.xh" { return GroundTermGrammar::parser::token::BNOT; } -#line 357 "/mnt/scratch/kaminski/build/clingo/debug/libgringo//src/input/groundtermlexer.hh" -yy45: +#line 357 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo//src/input/groundtermlexer.hh" +yy28: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = *YYCURSOR; -yy46: +yy29: switch (yych) { - case '\n': goto yy47; - case '"': goto yy48; - case '\\': goto yy50; - default: goto yy45; + case '\n': goto yy30; + case '"': goto yy31; + case '\\': goto yy32; + default: goto yy28; } -yy47: +yy30: YYCURSOR = YYMARKER; switch (yyaccept) { - case 0: goto yy3; - case 1: goto yy29; - case 2: goto yy69; - default: goto yy71; + case 0: goto yy2; + case 1: goto yy19; + case 2: goto yy46; + default: goto yy48; } -yy48: +yy31: ++YYCURSOR; #line 58 "/home/kaminski/Documents/git/potassco/clingo/libgringo//src/input/groundtermlexer.xh" { value.str = String(unquote(string(1, 1)).c_str()).c_str(); return GroundTermGrammar::parser::token::STRING; } -#line 381 "/mnt/scratch/kaminski/build/clingo/debug/libgringo//src/input/groundtermlexer.hh" -yy50: +#line 381 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo//src/input/groundtermlexer.hh" +yy32: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = *YYCURSOR; switch (yych) { - case '"': - case '\\': - case 'n': goto yy45; - default: goto yy47; + case '"': + case '\\': + case 'n': goto yy28; + default: goto yy30; } -yy51: +yy33: yych = *++YYCURSOR; switch (yych) { - case 'n': goto yy60; - default: goto yy47; + case 'n': goto yy40; + default: goto yy30; } -yy52: +yy34: yych = *++YYCURSOR; switch (yych) { - case 'u': goto yy61; - default: goto yy47; + case 'u': goto yy41; + default: goto yy30; } -yy53: +yy35: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = *YYCURSOR; switch (yych) { - case '\'': - case '_': goto yy53; - case 'a': - case 'b': - case 'c': - case 'd': - case 'e': - case 'f': - case 'g': - case 'h': - case 'i': - case 'j': - case 'k': - case 'l': - case 'm': - case 'n': - case 'o': - case 'p': - case 'q': - case 'r': - case 's': - case 't': - case 'u': - case 'v': - case 'w': - case 'x': - case 'y': - case 'z': goto yy38; - default: goto yy47; + case '\'': + case '_': goto yy35; + case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + case 'g': + case 'h': + case 'i': + case 'j': + case 'k': + case 'l': + case 'm': + case 'n': + case 'o': + case 'p': + case 'q': + case 'r': + case 's': + case 't': + case 'u': + case 'v': + case 'w': + case 'x': + case 'y': + case 'z': goto yy24; + default: goto yy30; } -yy55: +yy36: ++YYCURSOR; #line 64 "/home/kaminski/Documents/git/potassco/clingo/libgringo//src/input/groundtermlexer.xh" { return GroundTermGrammar::parser::token::POW; } -#line 443 "/mnt/scratch/kaminski/build/clingo/debug/libgringo//src/input/groundtermlexer.hh" -yy57: +#line 443 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo//src/input/groundtermlexer.hh" +yy37: yych = *++YYCURSOR; switch (yych) { - case '0': - case '1': goto yy62; - default: goto yy47; + case '0': + case '1': goto yy42; + default: goto yy30; } -yy58: +yy38: yych = *++YYCURSOR; switch (yych) { - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': goto yy64; - default: goto yy47; - } -yy59: + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': goto yy43; + default: goto yy30; + } +yy39: yych = *++YYCURSOR; switch (yych) { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - case 'A': - case 'B': - case 'C': - case 'D': - case 'E': - case 'F': - case 'a': - case 'b': - case 'c': - case 'd': - case 'e': - case 'f': goto yy66; - default: goto yy47; - } -yy60: + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': goto yy44; + default: goto yy30; + } +yy40: yych = *++YYCURSOR; switch (yych) { - case 'f': goto yy68; - default: goto yy47; + case 'f': goto yy45; + default: goto yy30; } -yy61: +yy41: yych = *++YYCURSOR; switch (yych) { - case 'p': goto yy70; - default: goto yy47; + case 'p': goto yy47; + default: goto yy30; } -yy62: +yy42: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = *YYCURSOR; switch (yych) { - case '0': - case '1': goto yy62; - default: goto yy29; + case '0': + case '1': goto yy42; + default: goto yy19; } -yy64: +yy43: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = *YYCURSOR; switch (yych) { - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': goto yy64; - default: goto yy29; - } -yy66: + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': goto yy43; + default: goto yy19; + } +yy44: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = *YYCURSOR; switch (yych) { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - case 'A': - case 'B': - case 'C': - case 'D': - case 'E': - case 'F': - case 'a': - case 'b': - case 'c': - case 'd': - case 'e': - case 'f': goto yy66; - default: goto yy29; - } -yy68: + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': goto yy44; + default: goto yy19; + } +yy45: yyaccept = 2; yych = *(YYMARKER = ++YYCURSOR); switch (yych) { - case 'i': goto yy72; - default: goto yy69; + case 'i': goto yy49; + default: goto yy46; } -yy69: +yy46: #line 53 "/home/kaminski/Documents/git/potassco/clingo/libgringo//src/input/groundtermlexer.xh" { return GroundTermGrammar::parser::token::INFIMUM; } -#line 564 "/mnt/scratch/kaminski/build/clingo/debug/libgringo//src/input/groundtermlexer.hh" -yy70: +#line 564 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo//src/input/groundtermlexer.hh" +yy47: yyaccept = 3; yych = *(YYMARKER = ++YYCURSOR); switch (yych) { - case 'r': goto yy73; - default: goto yy71; + case 'r': goto yy50; + default: goto yy48; } -yy71: +yy48: #line 54 "/home/kaminski/Documents/git/potassco/clingo/libgringo//src/input/groundtermlexer.xh" { return GroundTermGrammar::parser::token::SUPREMUM; } -#line 575 "/mnt/scratch/kaminski/build/clingo/debug/libgringo//src/input/groundtermlexer.hh" -yy72: +#line 575 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo//src/input/groundtermlexer.hh" +yy49: yych = *++YYCURSOR; switch (yych) { - case 'm': goto yy74; - default: goto yy47; + case 'm': goto yy51; + default: goto yy30; } -yy73: +yy50: yych = *++YYCURSOR; switch (yych) { - case 'e': goto yy75; - default: goto yy47; + case 'e': goto yy52; + default: goto yy30; } -yy74: +yy51: yych = *++YYCURSOR; switch (yych) { - case 'u': goto yy76; - default: goto yy47; + case 'u': goto yy53; + default: goto yy30; } -yy75: +yy52: yych = *++YYCURSOR; switch (yych) { - case 'm': goto yy77; - default: goto yy47; + case 'm': goto yy54; + default: goto yy30; } -yy76: +yy53: yych = *++YYCURSOR; switch (yych) { - case 'm': goto yy78; - default: goto yy47; + case 'm': goto yy55; + default: goto yy30; } -yy77: +yy54: yych = *++YYCURSOR; switch (yych) { - case 'u': goto yy79; - default: goto yy47; + case 'u': goto yy56; + default: goto yy30; } -yy78: +yy55: ++YYCURSOR; - goto yy69; -yy79: + goto yy46; +yy56: yych = *++YYCURSOR; switch (yych) { - case 'm': goto yy80; - default: goto yy47; + case 'm': goto yy57; + default: goto yy30; } -yy80: +yy57: ++YYCURSOR; - goto yy71; + goto yy48; } #line 75 "/home/kaminski/Documents/git/potassco/clingo/libgringo//src/input/groundtermlexer.xh" diff --git a/libgringo/gen/src/input/nongroundgrammar/grammar.cc b/libgringo/gen/src/input/nongroundgrammar/grammar.cc index e4bfca37b..18c59482f 100644 --- a/libgringo/gen/src/input/nongroundgrammar/grammar.cc +++ b/libgringo/gen/src/input/nongroundgrammar/grammar.cc @@ -1,8 +1,8 @@ -// A Bison parser, made by GNU Bison 3.3.2. +// A Bison parser, made by GNU Bison 3.8.2. // Skeleton implementation for Bison LALR(1) parsers in C++ -// Copyright (C) 2002-2015, 2018-2019 Free Software Foundation, Inc. +// Copyright (C) 2002-2015, 2018-2021 Free Software Foundation, Inc. // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ // GNU General Public License for more details. // You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// along with this program. If not, see . // As a special exception, you may create a larger work that contains // part or all of the Bison parser skeleton and distribute that work @@ -30,15 +30,16 @@ // This special exception was added by the Free Software Foundation in // version 2.2 of Bison. -// Undocumented macros, especially those whose name start with YY_, -// are private implementation details. Do not rely on them. +// DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, +// especially those whose name start with YY_ or yy_. They are +// private implementation details that can be changed or removed. // Take the name prefix into account. #define yylex GringoNonGroundGrammar_lex // First part of user prologue. -#line 58 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:429 +#line 58 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" #include "gringo/input/nongroundparser.hh" @@ -76,13 +77,14 @@ int GringoNonGroundGrammar_lex(void *value, Gringo::Location* loc, NonGroundPars } -#line 80 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:429 +#line 81 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" + #include "grammar.hh" // Unqualified %code blocks. -#line 96 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:435 +#line 96 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" void NonGroundGrammar::parser::error(DefaultLocation const &l, std::string const &msg) { @@ -90,7 +92,7 @@ void NonGroundGrammar::parser::error(DefaultLocation const &l, std::string const } -#line 94 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:435 +#line 96 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" #ifndef YY_ @@ -105,6 +107,7 @@ void NonGroundGrammar::parser::error(DefaultLocation const &l, std::string const # endif #endif + // Whether we are compiled with exception support. #ifndef YY_EXCEPTIONS # if defined __GNUC__ && !defined __EXCEPTIONS @@ -135,9 +138,6 @@ void NonGroundGrammar::parser::error(DefaultLocation const &l, std::string const # endif -// Suppress unused-variable warnings by "using" E. -#define YYUSE(E) ((void) (E)) - // Enable debugging if requested. #if YYDEBUG @@ -163,13 +163,13 @@ void NonGroundGrammar::parser::error(DefaultLocation const &l, std::string const # define YY_STACK_PRINT() \ do { \ if (yydebug_) \ - yystack_print_ (); \ + yy_stack_print_ (); \ } while (false) #else // !YYDEBUG # define YYCDEBUG if (false) std::cerr -# define YY_SYMBOL_PRINT(Title, Symbol) YYUSE (Symbol) +# define YY_SYMBOL_PRINT(Title, Symbol) YY_USE (Symbol) # define YY_REDUCE_PRINT(Rule) static_cast (0) # define YY_STACK_PRINT() static_cast (0) @@ -183,57 +183,17 @@ void NonGroundGrammar::parser::error(DefaultLocation const &l, std::string const #define YYERROR goto yyerrorlab #define YYRECOVERING() (!!yyerrstatus_) -#line 28 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:510 +#line 28 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" namespace Gringo { namespace Input { namespace NonGroundGrammar { -#line 189 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:510 - - /* Return YYSTR after stripping away unnecessary quotes and - backslashes, so that it's suitable for yyerror. The heuristic is - that double-quoting is unnecessary unless the string contains an - apostrophe, a comma, or backslash (other than backslash-backslash). - YYSTR is taken from yytname. */ - std::string - parser::yytnamerr_ (const char *yystr) - { - if (*yystr == '"') - { - std::string yyr; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - else - goto append; - - append: - default: - yyr += *yyp; - break; - - case '"': - return yyr; - } - do_not_strip_quotes: ; - } - - return yystr; - } - +#line 189 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" /// Build a parser object. parser::parser (Gringo::Input::NonGroundParser *lexer_yyarg) - : #if YYDEBUG - yydebug_ (false), + : yydebug_ (false), yycdebug_ (&std::cerr), +#else + : #endif lexer (lexer_yyarg) {} @@ -244,20 +204,11 @@ namespace Gringo { namespace Input { namespace NonGroundGrammar { parser::syntax_error::~syntax_error () YY_NOEXCEPT YY_NOTHROW {} - /*---------------. - | Symbol types. | - `---------------*/ + /*---------. + | symbol. | + `---------*/ // basic_symbol. -#if 201103L <= YY_CPLUSPLUS - template - parser::basic_symbol::basic_symbol (basic_symbol&& that) - : Base (std::move (that)) - , value (std::move (that.value)) - , location (std::move (that.location)) - {} -#endif - template parser::basic_symbol::basic_symbol (const basic_symbol& that) : Base (that) @@ -275,17 +226,26 @@ namespace Gringo { namespace Input { namespace NonGroundGrammar { {} template - parser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (semantic_type) v, YY_RVREF (location_type) l) + parser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (value_type) v, YY_RVREF (location_type) l) : Base (t) , value (YY_MOVE (v)) , location (YY_MOVE (l)) {} + + template + parser::symbol_kind_type + parser::basic_symbol::type_get () const YY_NOEXCEPT + { + return this->kind (); + } + + template bool parser::basic_symbol::empty () const YY_NOEXCEPT { - return Base::type_get () == empty_symbol; + return this->kind () == symbol_kind::S_YYEMPTY; } template @@ -297,47 +257,57 @@ namespace Gringo { namespace Input { namespace NonGroundGrammar { location = YY_MOVE (s.location); } - // by_type. - parser::by_type::by_type () - : type (empty_symbol) + // by_kind. + parser::by_kind::by_kind () YY_NOEXCEPT + : kind_ (symbol_kind::S_YYEMPTY) {} #if 201103L <= YY_CPLUSPLUS - parser::by_type::by_type (by_type&& that) - : type (that.type) + parser::by_kind::by_kind (by_kind&& that) YY_NOEXCEPT + : kind_ (that.kind_) { that.clear (); } #endif - parser::by_type::by_type (const by_type& that) - : type (that.type) + parser::by_kind::by_kind (const by_kind& that) YY_NOEXCEPT + : kind_ (that.kind_) {} - parser::by_type::by_type (token_type t) - : type (yytranslate_ (t)) + parser::by_kind::by_kind (token_kind_type t) YY_NOEXCEPT + : kind_ (yytranslate_ (t)) {} + + void - parser::by_type::clear () + parser::by_kind::clear () YY_NOEXCEPT { - type = empty_symbol; + kind_ = symbol_kind::S_YYEMPTY; } void - parser::by_type::move (by_type& that) + parser::by_kind::move (by_kind& that) { - type = that.type; + kind_ = that.kind_; that.clear (); } - int - parser::by_type::type_get () const YY_NOEXCEPT + parser::symbol_kind_type + parser::by_kind::kind () const YY_NOEXCEPT + { + return kind_; + } + + + parser::symbol_kind_type + parser::by_kind::type_get () const YY_NOEXCEPT { - return type; + return this->kind (); } + // by_state. parser::by_state::by_state () YY_NOEXCEPT : state (empty_state) @@ -364,13 +334,13 @@ namespace Gringo { namespace Input { namespace NonGroundGrammar { : state (s) {} - parser::symbol_number_type - parser::by_state::type_get () const YY_NOEXCEPT + parser::symbol_kind_type + parser::by_state::kind () const YY_NOEXCEPT { if (state == empty_state) - return empty_symbol; + return symbol_kind::S_YYEMPTY; else - return yystos_[state]; + return YY_CAST (symbol_kind_type, yystos_[+state]); } parser::stack_symbol_type::stack_symbol_type () @@ -389,10 +359,19 @@ namespace Gringo { namespace Input { namespace NonGroundGrammar { : super_type (s, YY_MOVE (that.value), YY_MOVE (that.location)) { // that is emptied. - that.type = empty_symbol; + that.kind_ = symbol_kind::S_YYEMPTY; } #if YY_CPLUSPLUS < 201103L + parser::stack_symbol_type& + parser::stack_symbol_type::operator= (const stack_symbol_type& that) + { + state = that.state; + value = that.value; + location = that.location; + return *this; + } + parser::stack_symbol_type& parser::stack_symbol_type::operator= (stack_symbol_type& that) { @@ -413,29 +392,27 @@ namespace Gringo { namespace Input { namespace NonGroundGrammar { YY_SYMBOL_PRINT (yymsg, yysym); // User destructor. - YYUSE (yysym.type_get ()); + YY_USE (yysym.kind ()); } #if YYDEBUG template void - parser::yy_print_ (std::ostream& yyo, - const basic_symbol& yysym) const + parser::yy_print_ (std::ostream& yyo, const basic_symbol& yysym) const { std::ostream& yyoutput = yyo; - YYUSE (yyoutput); - symbol_number_type yytype = yysym.type_get (); -#if defined __GNUC__ && ! defined __clang__ && ! defined __ICC && __GNUC__ * 100 + __GNUC_MINOR__ <= 408 - // Avoid a (spurious) G++ 4.8 warning about "array subscript is - // below array bounds". + YY_USE (yyoutput); if (yysym.empty ()) - std::abort (); -#endif - yyo << (yytype < yyntokens_ ? "token" : "nterm") - << ' ' << yytname_[yytype] << " (" - << yysym.location << ": "; - YYUSE (yytype); - yyo << ')'; + yyo << "empty symbol"; + else + { + symbol_kind_type yykind = yysym.kind (); + yyo << (yykind < YYNTOKENS ? "token" : "nterm") + << ' ' << yysym.name () << " (" + << yysym.location << ": "; + YY_USE (yykind); + yyo << ')'; + } } #endif @@ -459,7 +436,7 @@ namespace Gringo { namespace Input { namespace NonGroundGrammar { } void - parser::yypop_ (int n) + parser::yypop_ (int n) YY_NOEXCEPT { yystack_.pop (n); } @@ -494,21 +471,21 @@ namespace Gringo { namespace Input { namespace NonGroundGrammar { parser::state_type parser::yy_lr_goto_state_ (state_type yystate, int yysym) { - int yyr = yypgoto_[yysym - yyntokens_] + yystate; + int yyr = yypgoto_[yysym - YYNTOKENS] + yystate; if (0 <= yyr && yyr <= yylast_ && yycheck_[yyr] == yystate) return yytable_[yyr]; else - return yydefgoto_[yysym - yyntokens_]; + return yydefgoto_[yysym - YYNTOKENS]; } bool - parser::yy_pact_value_is_default_ (int yyvalue) + parser::yy_pact_value_is_default_ (int yyvalue) YY_NOEXCEPT { return yyvalue == yypact_ninf_; } bool - parser::yy_table_value_is_error_ (int yyvalue) + parser::yy_table_value_is_error_ (int yyvalue) YY_NOEXCEPT { return yyvalue == yytable_ninf_; } @@ -522,7 +499,6 @@ namespace Gringo { namespace Input { namespace NonGroundGrammar { int parser::parse () { - // State. int yyn; /// Length of the RHS of the rule being reduced. int yylen = 0; @@ -558,7 +534,8 @@ namespace Gringo { namespace Input { namespace NonGroundGrammar { | yynewstate -- push a new symbol on the stack. | `-----------------------------------------------*/ yynewstate: - YYCDEBUG << "Entering state " << yystack_[0].state << '\n'; + YYCDEBUG << "Entering state " << int (yystack_[0].state) << '\n'; + YY_STACK_PRINT (); // Accept? if (yystack_[0].state == yyfinal_) @@ -572,19 +549,19 @@ namespace Gringo { namespace Input { namespace NonGroundGrammar { `-----------*/ yybackup: // Try to take a decision without lookahead. - yyn = yypact_[yystack_[0].state]; + yyn = yypact_[+yystack_[0].state]; if (yy_pact_value_is_default_ (yyn)) goto yydefault; // Read a lookahead token. if (yyla.empty ()) { - YYCDEBUG << "Reading a token: "; + YYCDEBUG << "Reading a token\n"; #if YY_EXCEPTIONS try #endif // YY_EXCEPTIONS { - yyla.type = yytranslate_ (yylex (&yyla.value, &yyla.location, lexer)); + yyla.kind_ = yytranslate_ (yylex (&yyla.value, &yyla.location, lexer)); } #if YY_EXCEPTIONS catch (const syntax_error& yyexc) @@ -597,11 +574,23 @@ namespace Gringo { namespace Input { namespace NonGroundGrammar { } YY_SYMBOL_PRINT ("Next token is", yyla); + if (yyla.kind () == symbol_kind::S_YYerror) + { + // The scanner already issued an error message, process directly + // to error recovery. But do not keep the error token as + // lookahead, it is too special and may lead us to an endless + // loop in error recovery. */ + yyla.kind_ = symbol_kind::S_YYUNDEF; + goto yyerrlab1; + } + /* If the proper action on seeing token YYLA.TYPE is to reduce or to detect an error, take that action. */ - yyn += yyla.type_get (); - if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yyla.type_get ()) - goto yydefault; + yyn += yyla.kind (); + if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yyla.kind ()) + { + goto yydefault; + } // Reduce or error. yyn = yytable_[yyn]; @@ -618,7 +607,7 @@ namespace Gringo { namespace Input { namespace NonGroundGrammar { --yyerrstatus_; // Shift the lookahead token. - yypush_ ("Shifting", yyn, YY_MOVE (yyla)); + yypush_ ("Shifting", state_type (yyn), YY_MOVE (yyla)); goto yynewstate; @@ -626,7 +615,7 @@ namespace Gringo { namespace Input { namespace NonGroundGrammar { | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ yydefault: - yyn = yydefact_[yystack_[0].state]; + yyn = yydefact_[+yystack_[0].state]; if (yyn == 0) goto yyerrlab; goto yyreduce; @@ -666,1784 +655,1785 @@ namespace Gringo { namespace Input { namespace NonGroundGrammar { { switch (yyn) { - case 7: -#line 331 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { lexer->parseError(yylhs.location, "syntax error, unexpected ."); } -#line 673 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 7: // statement: "." +#line 327 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { lexer->parseError(yylhs.location, "syntax error, unexpected ."); } +#line 662 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 10: -#line 337 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.str) = (yystack_[0].value.str); } -#line 679 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 10: // identifier: "" +#line 333 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.str) = (yystack_[0].value.str); } +#line 668 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 11: -#line 338 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.str) = (yystack_[0].value.str); } -#line 685 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 11: // identifier: "default" +#line 334 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.str) = (yystack_[0].value.str); } +#line 674 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 12: -#line 339 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.str) = (yystack_[0].value.str); } -#line 691 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 12: // identifier: "override" +#line 335 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.str) = (yystack_[0].value.str); } +#line 680 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 13: -#line 346 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, BinOp::XOR, (yystack_[2].value.term), (yystack_[0].value.term)); } -#line 697 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 13: // constterm: constterm "^" constterm +#line 342 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, BinOp::XOR, (yystack_[2].value.term), (yystack_[0].value.term)); } +#line 686 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 14: -#line 347 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, BinOp::OR, (yystack_[2].value.term), (yystack_[0].value.term)); } -#line 703 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 14: // constterm: constterm "?" constterm +#line 343 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, BinOp::OR, (yystack_[2].value.term), (yystack_[0].value.term)); } +#line 692 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 15: -#line 348 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, BinOp::AND, (yystack_[2].value.term), (yystack_[0].value.term)); } -#line 709 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 15: // constterm: constterm "&" constterm +#line 344 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, BinOp::AND, (yystack_[2].value.term), (yystack_[0].value.term)); } +#line 698 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 16: -#line 349 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, BinOp::ADD, (yystack_[2].value.term), (yystack_[0].value.term)); } -#line 715 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 16: // constterm: constterm "+" constterm +#line 345 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, BinOp::ADD, (yystack_[2].value.term), (yystack_[0].value.term)); } +#line 704 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 17: -#line 350 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, BinOp::SUB, (yystack_[2].value.term), (yystack_[0].value.term)); } -#line 721 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 17: // constterm: constterm "-" constterm +#line 346 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, BinOp::SUB, (yystack_[2].value.term), (yystack_[0].value.term)); } +#line 710 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 18: -#line 351 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, BinOp::MUL, (yystack_[2].value.term), (yystack_[0].value.term)); } -#line 727 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 18: // constterm: constterm "*" constterm +#line 347 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, BinOp::MUL, (yystack_[2].value.term), (yystack_[0].value.term)); } +#line 716 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 19: -#line 352 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, BinOp::DIV, (yystack_[2].value.term), (yystack_[0].value.term)); } -#line 733 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 19: // constterm: constterm "/" constterm +#line 348 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, BinOp::DIV, (yystack_[2].value.term), (yystack_[0].value.term)); } +#line 722 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 20: -#line 353 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, BinOp::MOD, (yystack_[2].value.term), (yystack_[0].value.term)); } -#line 739 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 20: // constterm: constterm "\\" constterm +#line 349 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, BinOp::MOD, (yystack_[2].value.term), (yystack_[0].value.term)); } +#line 728 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 21: -#line 354 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, BinOp::POW, (yystack_[2].value.term), (yystack_[0].value.term)); } -#line 745 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 21: // constterm: constterm "**" constterm +#line 350 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, BinOp::POW, (yystack_[2].value.term), (yystack_[0].value.term)); } +#line 734 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 22: -#line 355 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, UnOp::NEG, (yystack_[0].value.term)); } -#line 751 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 22: // constterm: "-" constterm +#line 351 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, UnOp::NEG, (yystack_[0].value.term)); } +#line 740 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 23: -#line 356 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, UnOp::NOT, (yystack_[0].value.term)); } -#line 757 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 23: // constterm: "~" constterm +#line 352 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, UnOp::NOT, (yystack_[0].value.term)); } +#line 746 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 24: -#line 357 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, BUILDER.termvec(), false); } -#line 763 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 24: // constterm: "(" ")" +#line 353 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, BUILDER.termvec(), false); } +#line 752 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 25: -#line 358 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, BUILDER.termvec(), true); } -#line 769 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 25: // constterm: "(" "," ")" +#line 354 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, BUILDER.termvec(), true); } +#line 758 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 26: -#line 359 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, (yystack_[1].value.termvec), false); } -#line 775 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 26: // constterm: "(" consttermvec ")" +#line 355 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, (yystack_[1].value.termvec), false); } +#line 764 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 27: -#line 360 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, (yystack_[2].value.termvec), true); } -#line 781 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 27: // constterm: "(" consttermvec "," ")" +#line 356 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, (yystack_[2].value.termvec), true); } +#line 770 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 28: -#line 361 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, String::fromRep((yystack_[3].value.str)), (yystack_[1].value.termvecvec), false); } -#line 787 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 28: // constterm: identifier "(" constargvec ")" +#line 357 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, String::fromRep((yystack_[3].value.str)), (yystack_[1].value.termvecvec), false); } +#line 776 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 29: -#line 362 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, String::fromRep((yystack_[3].value.str)), (yystack_[1].value.termvecvec), true); } -#line 793 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 29: // constterm: "@" identifier "(" constargvec ")" +#line 358 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, String::fromRep((yystack_[3].value.str)), (yystack_[1].value.termvecvec), true); } +#line 782 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 30: -#line 363 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, UnOp::ABS, (yystack_[1].value.term)); } -#line 799 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 30: // constterm: "|" constterm "|" +#line 359 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, UnOp::ABS, (yystack_[1].value.term)); } +#line 788 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 31: -#line 364 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, Symbol::createId(String::fromRep((yystack_[0].value.str)))); } -#line 805 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 31: // constterm: identifier +#line 360 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, Symbol::createId(String::fromRep((yystack_[0].value.str)))); } +#line 794 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 32: -#line 365 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, String::fromRep((yystack_[0].value.str)), BUILDER.termvecvec(BUILDER.termvecvec(), BUILDER.termvec()), true); } -#line 811 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 32: // constterm: "@" identifier +#line 361 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, String::fromRep((yystack_[0].value.str)), BUILDER.termvecvec(BUILDER.termvecvec(), BUILDER.termvec()), true); } +#line 800 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 33: -#line 366 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, Symbol::createNum((yystack_[0].value.num))); } -#line 817 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 33: // constterm: "" +#line 362 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, Symbol::createNum((yystack_[0].value.num))); } +#line 806 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 34: -#line 367 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, Symbol::createStr(String::fromRep((yystack_[0].value.str)))); } -#line 823 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 34: // constterm: "" +#line 363 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, Symbol::createStr(String::fromRep((yystack_[0].value.str)))); } +#line 812 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 35: -#line 368 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, Symbol::createInf()); } -#line 829 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 35: // constterm: "#inf" +#line 364 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, Symbol::createInf()); } +#line 818 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 36: -#line 369 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, Symbol::createSup()); } -#line 835 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 36: // constterm: "#sup" +#line 365 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, Symbol::createSup()); } +#line 824 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 37: -#line 375 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.termvec) = BUILDER.termvec(BUILDER.termvec(), (yystack_[0].value.term)); } -#line 841 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 37: // consttermvec: constterm +#line 371 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.termvec) = BUILDER.termvec(BUILDER.termvec(), (yystack_[0].value.term)); } +#line 830 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 38: -#line 376 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.termvec) = BUILDER.termvec((yystack_[2].value.termvec), (yystack_[0].value.term)); } -#line 847 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 38: // consttermvec: consttermvec "," constterm +#line 372 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.termvec) = BUILDER.termvec((yystack_[2].value.termvec), (yystack_[0].value.term)); } +#line 836 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 39: -#line 380 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.termvecvec) = BUILDER.termvecvec(BUILDER.termvecvec(), (yystack_[0].value.termvec)); } -#line 853 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 39: // constargvec: consttermvec +#line 376 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.termvecvec) = BUILDER.termvecvec(BUILDER.termvecvec(), (yystack_[0].value.termvec)); } +#line 842 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 40: -#line 381 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.termvecvec) = BUILDER.termvecvec(BUILDER.termvecvec(), BUILDER.termvec()); } -#line 859 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 40: // constargvec: %empty +#line 377 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.termvecvec) = BUILDER.termvecvec(BUILDER.termvecvec(), BUILDER.termvec()); } +#line 848 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 41: -#line 387 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, (yystack_[2].value.term), (yystack_[0].value.term)); } -#line 865 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 41: // term: term ".." term +#line 383 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, (yystack_[2].value.term), (yystack_[0].value.term)); } +#line 854 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 42: -#line 388 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, BinOp::XOR, (yystack_[2].value.term), (yystack_[0].value.term)); } -#line 871 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 42: // term: term "^" term +#line 384 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, BinOp::XOR, (yystack_[2].value.term), (yystack_[0].value.term)); } +#line 860 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 43: -#line 389 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, BinOp::OR, (yystack_[2].value.term), (yystack_[0].value.term)); } -#line 877 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 43: // term: term "?" term +#line 385 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, BinOp::OR, (yystack_[2].value.term), (yystack_[0].value.term)); } +#line 866 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 44: -#line 390 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, BinOp::AND, (yystack_[2].value.term), (yystack_[0].value.term)); } -#line 883 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 44: // term: term "&" term +#line 386 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, BinOp::AND, (yystack_[2].value.term), (yystack_[0].value.term)); } +#line 872 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 45: -#line 391 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, BinOp::ADD, (yystack_[2].value.term), (yystack_[0].value.term)); } -#line 889 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 45: // term: term "+" term +#line 387 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, BinOp::ADD, (yystack_[2].value.term), (yystack_[0].value.term)); } +#line 878 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 46: -#line 392 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, BinOp::SUB, (yystack_[2].value.term), (yystack_[0].value.term)); } -#line 895 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 46: // term: term "-" term +#line 388 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, BinOp::SUB, (yystack_[2].value.term), (yystack_[0].value.term)); } +#line 884 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 47: -#line 393 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, BinOp::MUL, (yystack_[2].value.term), (yystack_[0].value.term)); } -#line 901 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 47: // term: term "*" term +#line 389 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, BinOp::MUL, (yystack_[2].value.term), (yystack_[0].value.term)); } +#line 890 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 48: -#line 394 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, BinOp::DIV, (yystack_[2].value.term), (yystack_[0].value.term)); } -#line 907 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 48: // term: term "/" term +#line 390 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, BinOp::DIV, (yystack_[2].value.term), (yystack_[0].value.term)); } +#line 896 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 49: -#line 395 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, BinOp::MOD, (yystack_[2].value.term), (yystack_[0].value.term)); } -#line 913 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 49: // term: term "\\" term +#line 391 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, BinOp::MOD, (yystack_[2].value.term), (yystack_[0].value.term)); } +#line 902 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 50: -#line 396 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, BinOp::POW, (yystack_[2].value.term), (yystack_[0].value.term)); } -#line 919 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 50: // term: term "**" term +#line 392 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, BinOp::POW, (yystack_[2].value.term), (yystack_[0].value.term)); } +#line 908 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 51: -#line 397 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, UnOp::NEG, (yystack_[0].value.term)); } -#line 925 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 51: // term: "-" term +#line 393 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, UnOp::NEG, (yystack_[0].value.term)); } +#line 914 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 52: -#line 398 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, UnOp::NOT, (yystack_[0].value.term)); } -#line 931 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 52: // term: "~" term +#line 394 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, UnOp::NOT, (yystack_[0].value.term)); } +#line 920 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 53: -#line 399 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.pool(yylhs.location, (yystack_[1].value.termvec)); } -#line 937 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 53: // term: "(" tuplevec ")" +#line 395 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.pool(yylhs.location, (yystack_[1].value.termvec)); } +#line 926 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 54: -#line 400 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, String::fromRep((yystack_[3].value.str)), (yystack_[1].value.termvecvec), false); } -#line 943 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 54: // term: identifier "(" argvec ")" +#line 396 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, String::fromRep((yystack_[3].value.str)), (yystack_[1].value.termvecvec), false); } +#line 932 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 55: -#line 401 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, String::fromRep((yystack_[3].value.str)), (yystack_[1].value.termvecvec), true); } -#line 949 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 55: // term: "@" identifier "(" argvec ")" +#line 397 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, String::fromRep((yystack_[3].value.str)), (yystack_[1].value.termvecvec), true); } +#line 938 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 56: -#line 402 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, UnOp::ABS, (yystack_[1].value.termvec)); } -#line 955 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 56: // term: "|" unaryargvec "|" +#line 398 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, UnOp::ABS, (yystack_[1].value.termvec)); } +#line 944 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 57: -#line 403 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, Symbol::createId(String::fromRep((yystack_[0].value.str)))); } -#line 961 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 57: // term: identifier +#line 399 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, Symbol::createId(String::fromRep((yystack_[0].value.str)))); } +#line 950 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 58: -#line 404 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, String::fromRep((yystack_[0].value.str)), BUILDER.termvecvec(BUILDER.termvecvec(), BUILDER.termvec()), true); } -#line 967 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 58: // term: "@" identifier +#line 400 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, String::fromRep((yystack_[0].value.str)), BUILDER.termvecvec(BUILDER.termvecvec(), BUILDER.termvec()), true); } +#line 956 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 59: -#line 405 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, Symbol::createNum((yystack_[0].value.num))); } -#line 973 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 59: // term: "" +#line 401 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, Symbol::createNum((yystack_[0].value.num))); } +#line 962 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 60: -#line 406 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, Symbol::createStr(String::fromRep((yystack_[0].value.str)))); } -#line 979 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 60: // term: "" +#line 402 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, Symbol::createStr(String::fromRep((yystack_[0].value.str)))); } +#line 968 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 61: -#line 407 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, Symbol::createInf()); } -#line 985 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 61: // term: "#inf" +#line 403 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, Symbol::createInf()); } +#line 974 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 62: -#line 408 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, Symbol::createSup()); } -#line 991 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 62: // term: "#sup" +#line 404 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, Symbol::createSup()); } +#line 980 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 63: -#line 409 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, String::fromRep((yystack_[0].value.str))); } -#line 997 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 63: // term: "" +#line 405 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, String::fromRep((yystack_[0].value.str))); } +#line 986 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 64: -#line 410 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, String("_")); } -#line 1003 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 64: // term: "" +#line 406 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, String("_")); } +#line 992 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 65: -#line 416 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.termvec) = BUILDER.termvec(BUILDER.termvec(), (yystack_[0].value.term)); } -#line 1009 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 65: // unaryargvec: term +#line 412 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.termvec) = BUILDER.termvec(BUILDER.termvec(), (yystack_[0].value.term)); } +#line 998 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 66: -#line 417 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.termvec) = BUILDER.termvec((yystack_[2].value.termvec), (yystack_[0].value.term)); } -#line 1015 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 66: // unaryargvec: unaryargvec ";" term +#line 413 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.termvec) = BUILDER.termvec((yystack_[2].value.termvec), (yystack_[0].value.term)); } +#line 1004 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 67: -#line 423 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.termvec) = BUILDER.termvec(BUILDER.termvec(), (yystack_[0].value.term)); } -#line 1021 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 67: // ntermvec: term +#line 419 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.termvec) = BUILDER.termvec(BUILDER.termvec(), (yystack_[0].value.term)); } +#line 1010 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 68: -#line 424 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.termvec) = BUILDER.termvec((yystack_[2].value.termvec), (yystack_[0].value.term)); } -#line 1027 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 68: // ntermvec: ntermvec "," term +#line 420 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.termvec) = BUILDER.termvec((yystack_[2].value.termvec), (yystack_[0].value.term)); } +#line 1016 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 69: -#line 428 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.termvec) = (yystack_[0].value.termvec); } -#line 1033 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 69: // termvec: ntermvec +#line 424 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.termvec) = (yystack_[0].value.termvec); } +#line 1022 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 70: -#line 429 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.termvec) = BUILDER.termvec(); } -#line 1039 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 70: // termvec: %empty +#line 425 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.termvec) = BUILDER.termvec(); } +#line 1028 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 71: -#line 433 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, (yystack_[1].value.termvec), true); } -#line 1045 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 71: // tuple: ntermvec "," +#line 429 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, (yystack_[1].value.termvec), true); } +#line 1034 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 72: -#line 434 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, (yystack_[0].value.termvec), false); } -#line 1051 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 72: // tuple: ntermvec +#line 430 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, (yystack_[0].value.termvec), false); } +#line 1040 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 73: -#line 435 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, BUILDER.termvec(), true); } -#line 1057 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 73: // tuple: "," +#line 431 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, BUILDER.termvec(), true); } +#line 1046 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 74: -#line 436 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.term(yylhs.location, BUILDER.termvec(), false); } -#line 1063 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 74: // tuple: %empty +#line 432 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.term(yylhs.location, BUILDER.termvec(), false); } +#line 1052 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 75: -#line 439 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.termvec) = BUILDER.termvec(BUILDER.termvec(), (yystack_[1].value.term)); } -#line 1069 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 75: // tuplevec_sem: tuple ";" +#line 435 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.termvec) = BUILDER.termvec(BUILDER.termvec(), (yystack_[1].value.term)); } +#line 1058 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 76: -#line 440 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.termvec) = BUILDER.termvec((yystack_[2].value.termvec), (yystack_[1].value.term)); } -#line 1075 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 76: // tuplevec_sem: tuplevec_sem tuple ";" +#line 436 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.termvec) = BUILDER.termvec((yystack_[2].value.termvec), (yystack_[1].value.term)); } +#line 1064 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 77: -#line 443 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.termvec) = BUILDER.termvec(BUILDER.termvec(), (yystack_[0].value.term)); } -#line 1081 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 77: // tuplevec: tuple +#line 439 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.termvec) = BUILDER.termvec(BUILDER.termvec(), (yystack_[0].value.term)); } +#line 1070 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 78: -#line 444 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.termvec) = BUILDER.termvec((yystack_[1].value.termvec), (yystack_[0].value.term)); } -#line 1087 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 78: // tuplevec: tuplevec_sem tuple +#line 440 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.termvec) = BUILDER.termvec((yystack_[1].value.termvec), (yystack_[0].value.term)); } +#line 1076 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 79: -#line 447 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.termvecvec) = BUILDER.termvecvec(BUILDER.termvecvec(), (yystack_[0].value.termvec)); } -#line 1093 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 79: // argvec: termvec +#line 443 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.termvecvec) = BUILDER.termvecvec(BUILDER.termvecvec(), (yystack_[0].value.termvec)); } +#line 1082 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 80: -#line 448 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.termvecvec) = BUILDER.termvecvec((yystack_[2].value.termvecvec), (yystack_[0].value.termvec)); } -#line 1099 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 80: // argvec: argvec ";" termvec +#line 444 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.termvecvec) = BUILDER.termvecvec((yystack_[2].value.termvecvec), (yystack_[0].value.termvec)); } +#line 1088 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 81: -#line 452 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.termvecvec) = BUILDER.termvecvec(BUILDER.termvecvec(), BUILDER.termvec(BUILDER.termvec(BUILDER.termvec(), (yystack_[2].value.term)), (yystack_[0].value.term))); } -#line 1105 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 81: // binaryargvec: term "," term +#line 448 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.termvecvec) = BUILDER.termvecvec(BUILDER.termvecvec(), BUILDER.termvec(BUILDER.termvec(BUILDER.termvec(), (yystack_[2].value.term)), (yystack_[0].value.term))); } +#line 1094 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 82: -#line 453 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.termvecvec) = BUILDER.termvecvec((yystack_[4].value.termvecvec), BUILDER.termvec(BUILDER.termvec(BUILDER.termvec(), (yystack_[2].value.term)), (yystack_[0].value.term))); } -#line 1111 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 82: // binaryargvec: binaryargvec ";" term "," term +#line 449 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.termvecvec) = BUILDER.termvecvec((yystack_[4].value.termvecvec), BUILDER.termvec(BUILDER.termvec(BUILDER.termvec(), (yystack_[2].value.term)), (yystack_[0].value.term))); } +#line 1100 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 83: -#line 463 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.rel) = Relation::GT; } -#line 1117 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 83: // cmp: ">" +#line 459 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.rel) = Relation::GT; } +#line 1106 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 84: -#line 464 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.rel) = Relation::LT; } -#line 1123 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 84: // cmp: "<" +#line 460 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.rel) = Relation::LT; } +#line 1112 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 85: -#line 465 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.rel) = Relation::GEQ; } -#line 1129 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 85: // cmp: ">=" +#line 461 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.rel) = Relation::GEQ; } +#line 1118 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 86: -#line 466 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.rel) = Relation::LEQ; } -#line 1135 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 86: // cmp: "<=" +#line 462 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.rel) = Relation::LEQ; } +#line 1124 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 87: -#line 467 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.rel) = Relation::EQ; } -#line 1141 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 87: // cmp: "=" +#line 463 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.rel) = Relation::EQ; } +#line 1130 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 88: -#line 468 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.rel) = Relation::NEQ; } -#line 1147 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 88: // cmp: "!=" +#line 464 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.rel) = Relation::NEQ; } +#line 1136 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 89: -#line 472 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.predRep(yylhs.location, false, String::fromRep((yystack_[0].value.str)), BUILDER.termvecvec(BUILDER.termvecvec(), BUILDER.termvec())); } -#line 1153 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 89: // atom: identifier +#line 468 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.predRep(yylhs.location, false, String::fromRep((yystack_[0].value.str)), BUILDER.termvecvec(BUILDER.termvecvec(), BUILDER.termvec())); } +#line 1142 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 90: -#line 473 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.predRep(yylhs.location, false, String::fromRep((yystack_[3].value.str)), (yystack_[1].value.termvecvec)); } -#line 1159 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 90: // atom: identifier "(" argvec ")" +#line 469 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.predRep(yylhs.location, false, String::fromRep((yystack_[3].value.str)), (yystack_[1].value.termvecvec)); } +#line 1148 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 91: -#line 474 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.predRep(yylhs.location, true, String::fromRep((yystack_[0].value.str)), BUILDER.termvecvec(BUILDER.termvecvec(), BUILDER.termvec())); } -#line 1165 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 91: // atom: "-" identifier +#line 470 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.predRep(yylhs.location, true, String::fromRep((yystack_[0].value.str)), BUILDER.termvecvec(BUILDER.termvecvec(), BUILDER.termvec())); } +#line 1154 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 92: -#line 475 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.term) = BUILDER.predRep(yylhs.location, true, String::fromRep((yystack_[3].value.str)), (yystack_[1].value.termvecvec)); } -#line 1171 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 92: // atom: "-" identifier "(" argvec ")" +#line 471 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.term) = BUILDER.predRep(yylhs.location, true, String::fromRep((yystack_[3].value.str)), (yystack_[1].value.termvecvec)); } +#line 1160 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 93: -#line 479 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.rellitvec) = BUILDER.rellitvec(yylhs.location, (yystack_[1].value.rel), (yystack_[0].value.term)); } -#line 1177 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 93: // rellitvec: cmp term +#line 475 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.rellitvec) = BUILDER.rellitvec(yylhs.location, (yystack_[1].value.rel), (yystack_[0].value.term)); } +#line 1166 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 94: -#line 480 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.rellitvec) = BUILDER.rellitvec(yylhs.location, (yystack_[2].value.rellitvec), (yystack_[1].value.rel), (yystack_[0].value.term)); } -#line 1183 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 94: // rellitvec: rellitvec cmp term +#line 476 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.rellitvec) = BUILDER.rellitvec(yylhs.location, (yystack_[2].value.rellitvec), (yystack_[1].value.rel), (yystack_[0].value.term)); } +#line 1172 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 95: -#line 484 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.lit) = BUILDER.boollit(yylhs.location, true); } -#line 1189 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 95: // literal: "#true" +#line 480 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.lit) = BUILDER.boollit(yylhs.location, true); } +#line 1178 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 96: -#line 485 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.lit) = BUILDER.boollit(yylhs.location, false); } -#line 1195 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 96: // literal: "not" "#true" +#line 481 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.lit) = BUILDER.boollit(yylhs.location, false); } +#line 1184 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 97: -#line 486 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.lit) = BUILDER.boollit(yylhs.location, true); } -#line 1201 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 97: // literal: "not" "not" "#true" +#line 482 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.lit) = BUILDER.boollit(yylhs.location, true); } +#line 1190 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 98: -#line 487 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.lit) = BUILDER.boollit(yylhs.location, false); } -#line 1207 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 98: // literal: "#false" +#line 483 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.lit) = BUILDER.boollit(yylhs.location, false); } +#line 1196 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 99: -#line 488 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.lit) = BUILDER.boollit(yylhs.location, true); } -#line 1213 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 99: // literal: "not" "#false" +#line 484 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.lit) = BUILDER.boollit(yylhs.location, true); } +#line 1202 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 100: -#line 489 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.lit) = BUILDER.boollit(yylhs.location, false); } -#line 1219 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 100: // literal: "not" "not" "#false" +#line 485 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.lit) = BUILDER.boollit(yylhs.location, false); } +#line 1208 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 101: -#line 490 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.lit) = BUILDER.predlit(yylhs.location, NAF::POS, (yystack_[0].value.term)); } -#line 1225 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 101: // literal: atom +#line 486 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.lit) = BUILDER.predlit(yylhs.location, NAF::POS, (yystack_[0].value.term)); } +#line 1214 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 102: -#line 491 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.lit) = BUILDER.predlit(yylhs.location, NAF::NOT, (yystack_[0].value.term)); } -#line 1231 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 102: // literal: "not" atom +#line 487 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.lit) = BUILDER.predlit(yylhs.location, NAF::NOT, (yystack_[0].value.term)); } +#line 1220 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 103: -#line 492 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.lit) = BUILDER.predlit(yylhs.location, NAF::NOTNOT, (yystack_[0].value.term)); } -#line 1237 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 103: // literal: "not" "not" atom +#line 488 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.lit) = BUILDER.predlit(yylhs.location, NAF::NOTNOT, (yystack_[0].value.term)); } +#line 1226 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 104: -#line 493 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.lit) = BUILDER.rellit(yylhs.location, NAF::POS, (yystack_[1].value.term), (yystack_[0].value.rellitvec)); } -#line 1243 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 104: // literal: term rellitvec +#line 489 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.lit) = BUILDER.rellit(yylhs.location, NAF::POS, (yystack_[1].value.term), (yystack_[0].value.rellitvec)); } +#line 1232 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 105: -#line 494 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.lit) = BUILDER.rellit(yylhs.location, NAF::NOT, (yystack_[1].value.term), (yystack_[0].value.rellitvec)); } -#line 1249 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 105: // literal: "not" term rellitvec +#line 490 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.lit) = BUILDER.rellit(yylhs.location, NAF::NOT, (yystack_[1].value.term), (yystack_[0].value.rellitvec)); } +#line 1238 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 106: -#line 495 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.lit) = BUILDER.rellit(yylhs.location, NAF::NOTNOT, (yystack_[1].value.term), (yystack_[0].value.rellitvec)); } -#line 1255 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 106: // literal: "not" "not" term rellitvec +#line 491 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.lit) = BUILDER.rellit(yylhs.location, NAF::NOTNOT, (yystack_[1].value.term), (yystack_[0].value.rellitvec)); } +#line 1244 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 107: -#line 503 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.litvec) = BUILDER.litvec(BUILDER.litvec(), (yystack_[0].value.lit)); } -#line 1261 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 107: // nlitvec: literal +#line 499 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.litvec) = BUILDER.litvec(BUILDER.litvec(), (yystack_[0].value.lit)); } +#line 1250 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 108: -#line 504 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.litvec) = BUILDER.litvec((yystack_[2].value.litvec), (yystack_[0].value.lit)); } -#line 1267 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 108: // nlitvec: nlitvec "," literal +#line 500 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.litvec) = BUILDER.litvec((yystack_[2].value.litvec), (yystack_[0].value.lit)); } +#line 1256 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 109: -#line 508 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.litvec) = (yystack_[0].value.litvec); } -#line 1273 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 109: // litvec: nlitvec +#line 504 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.litvec) = (yystack_[0].value.litvec); } +#line 1262 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 110: -#line 509 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.litvec) = BUILDER.litvec(); } -#line 1279 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 110: // litvec: %empty +#line 505 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.litvec) = BUILDER.litvec(); } +#line 1268 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 111: -#line 513 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.litvec) = (yystack_[0].value.litvec); } -#line 1285 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 111: // optcondition: ":" litvec +#line 509 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.litvec) = (yystack_[0].value.litvec); } +#line 1274 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 112: -#line 514 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.litvec) = BUILDER.litvec(); } -#line 1291 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 112: // optcondition: %empty +#line 510 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.litvec) = BUILDER.litvec(); } +#line 1280 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 113: -#line 518 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.fun) = AggregateFunction::SUM; } -#line 1297 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 113: // aggregatefunction: "#sum" +#line 514 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.fun) = AggregateFunction::SUM; } +#line 1286 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 114: -#line 519 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.fun) = AggregateFunction::SUMP; } -#line 1303 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 114: // aggregatefunction: "#sum+" +#line 515 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.fun) = AggregateFunction::SUMP; } +#line 1292 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 115: -#line 520 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.fun) = AggregateFunction::MIN; } -#line 1309 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 115: // aggregatefunction: "#min" +#line 516 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.fun) = AggregateFunction::MIN; } +#line 1298 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 116: -#line 521 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.fun) = AggregateFunction::MAX; } -#line 1315 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 116: // aggregatefunction: "#max" +#line 517 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.fun) = AggregateFunction::MAX; } +#line 1304 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 117: -#line 522 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.fun) = AggregateFunction::COUNT; } -#line 1321 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 117: // aggregatefunction: "#count" +#line 518 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.fun) = AggregateFunction::COUNT; } +#line 1310 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 118: -#line 528 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.bodyaggrelem) = { BUILDER.termvec(), (yystack_[0].value.litvec) }; } -#line 1327 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 118: // bodyaggrelem: ":" litvec +#line 524 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.bodyaggrelem) = { BUILDER.termvec(), (yystack_[0].value.litvec) }; } +#line 1316 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 119: -#line 529 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.bodyaggrelem) = { (yystack_[1].value.termvec), (yystack_[0].value.litvec) }; } -#line 1333 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 119: // bodyaggrelem: ntermvec optcondition +#line 525 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.bodyaggrelem) = { (yystack_[1].value.termvec), (yystack_[0].value.litvec) }; } +#line 1322 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 120: -#line 533 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.bodyaggrelemvec) = BUILDER.bodyaggrelemvec(BUILDER.bodyaggrelemvec(), (yystack_[0].value.bodyaggrelem).first, (yystack_[0].value.bodyaggrelem).second); } -#line 1339 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 120: // bodyaggrelemvec: bodyaggrelem +#line 529 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.bodyaggrelemvec) = BUILDER.bodyaggrelemvec(BUILDER.bodyaggrelemvec(), (yystack_[0].value.bodyaggrelem).first, (yystack_[0].value.bodyaggrelem).second); } +#line 1328 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 121: -#line 534 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.bodyaggrelemvec) = BUILDER.bodyaggrelemvec((yystack_[2].value.bodyaggrelemvec), (yystack_[0].value.bodyaggrelem).first, (yystack_[0].value.bodyaggrelem).second); } -#line 1345 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 121: // bodyaggrelemvec: bodyaggrelemvec ";" bodyaggrelem +#line 530 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.bodyaggrelemvec) = BUILDER.bodyaggrelemvec((yystack_[2].value.bodyaggrelemvec), (yystack_[0].value.bodyaggrelem).first, (yystack_[0].value.bodyaggrelem).second); } +#line 1334 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 122: -#line 540 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.lbodyaggrelem) = { (yystack_[1].value.lit), (yystack_[0].value.litvec) }; } -#line 1351 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 122: // altbodyaggrelem: literal optcondition +#line 536 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.lbodyaggrelem) = { (yystack_[1].value.lit), (yystack_[0].value.litvec) }; } +#line 1340 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 123: -#line 544 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.condlitlist) = BUILDER.condlitvec(BUILDER.condlitvec(), (yystack_[0].value.lbodyaggrelem).first, (yystack_[0].value.lbodyaggrelem).second); } -#line 1357 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 123: // altbodyaggrelemvec: altbodyaggrelem +#line 540 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.condlitlist) = BUILDER.condlitvec(BUILDER.condlitvec(), (yystack_[0].value.lbodyaggrelem).first, (yystack_[0].value.lbodyaggrelem).second); } +#line 1346 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 124: -#line 545 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.condlitlist) = BUILDER.condlitvec((yystack_[2].value.condlitlist), (yystack_[0].value.lbodyaggrelem).first, (yystack_[0].value.lbodyaggrelem).second); } -#line 1363 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 124: // altbodyaggrelemvec: altbodyaggrelemvec ";" altbodyaggrelem +#line 541 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.condlitlist) = BUILDER.condlitvec((yystack_[2].value.condlitlist), (yystack_[0].value.lbodyaggrelem).first, (yystack_[0].value.lbodyaggrelem).second); } +#line 1352 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 125: -#line 551 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.aggr) = { AggregateFunction::COUNT, true, BUILDER.condlitvec() }; } -#line 1369 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 125: // bodyaggregate: "{" "}" +#line 547 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.aggr) = { AggregateFunction::COUNT, true, BUILDER.condlitvec() }; } +#line 1358 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 126: -#line 552 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.aggr) = { AggregateFunction::COUNT, true, (yystack_[1].value.condlitlist) }; } -#line 1375 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 126: // bodyaggregate: "{" altbodyaggrelemvec "}" +#line 548 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.aggr) = { AggregateFunction::COUNT, true, (yystack_[1].value.condlitlist) }; } +#line 1364 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 127: -#line 553 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.aggr) = { (yystack_[2].value.fun), false, BUILDER.bodyaggrelemvec() }; } -#line 1381 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 127: // bodyaggregate: aggregatefunction "{" "}" +#line 549 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.aggr) = { (yystack_[2].value.fun), false, BUILDER.bodyaggrelemvec() }; } +#line 1370 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 128: -#line 554 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.aggr) = { (yystack_[3].value.fun), false, (yystack_[1].value.bodyaggrelemvec) }; } -#line 1387 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 128: // bodyaggregate: aggregatefunction "{" bodyaggrelemvec "}" +#line 550 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.aggr) = { (yystack_[3].value.fun), false, (yystack_[1].value.bodyaggrelemvec) }; } +#line 1376 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 129: -#line 558 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.bound) = { Relation::LEQ, (yystack_[0].value.term) }; } -#line 1393 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 129: // upper: term +#line 554 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.bound) = { Relation::LEQ, (yystack_[0].value.term) }; } +#line 1382 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 130: -#line 559 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.bound) = { (yystack_[1].value.rel), (yystack_[0].value.term) }; } -#line 1399 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 130: // upper: cmp term +#line 555 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.bound) = { (yystack_[1].value.rel), (yystack_[0].value.term) }; } +#line 1388 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 131: -#line 560 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.bound) = { Relation::LEQ, TermUid(-1) }; } -#line 1405 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 131: // upper: %empty +#line 556 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.bound) = { Relation::LEQ, TermUid(-1) }; } +#line 1394 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 132: -#line 564 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.uid) = lexer->aggregate((yystack_[1].value.aggr).fun, (yystack_[1].value.aggr).choice, (yystack_[1].value.aggr).elems, lexer->boundvec(Relation::LEQ, (yystack_[2].value.term), (yystack_[0].value.bound).rel, (yystack_[0].value.bound).term)); } -#line 1411 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 132: // lubodyaggregate: term bodyaggregate upper +#line 560 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.uid) = lexer->aggregate((yystack_[1].value.aggr).fun, (yystack_[1].value.aggr).choice, (yystack_[1].value.aggr).elems, lexer->boundvec(Relation::LEQ, (yystack_[2].value.term), (yystack_[0].value.bound).rel, (yystack_[0].value.bound).term)); } +#line 1400 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 133: -#line 565 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.uid) = lexer->aggregate((yystack_[1].value.aggr).fun, (yystack_[1].value.aggr).choice, (yystack_[1].value.aggr).elems, lexer->boundvec((yystack_[2].value.rel), (yystack_[3].value.term), (yystack_[0].value.bound).rel, (yystack_[0].value.bound).term)); } -#line 1417 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 133: // lubodyaggregate: term cmp bodyaggregate upper +#line 561 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.uid) = lexer->aggregate((yystack_[1].value.aggr).fun, (yystack_[1].value.aggr).choice, (yystack_[1].value.aggr).elems, lexer->boundvec((yystack_[2].value.rel), (yystack_[3].value.term), (yystack_[0].value.bound).rel, (yystack_[0].value.bound).term)); } +#line 1406 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 134: -#line 566 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.uid) = lexer->aggregate((yystack_[1].value.aggr).fun, (yystack_[1].value.aggr).choice, (yystack_[1].value.aggr).elems, lexer->boundvec(Relation::LEQ, TermUid(-1), (yystack_[0].value.bound).rel, (yystack_[0].value.bound).term)); } -#line 1423 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 134: // lubodyaggregate: bodyaggregate upper +#line 562 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.uid) = lexer->aggregate((yystack_[1].value.aggr).fun, (yystack_[1].value.aggr).choice, (yystack_[1].value.aggr).elems, lexer->boundvec(Relation::LEQ, TermUid(-1), (yystack_[0].value.bound).rel, (yystack_[0].value.bound).term)); } +#line 1412 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 135: -#line 567 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.uid) = lexer->aggregate((yystack_[0].value.theoryAtom)); } -#line 1429 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 135: // lubodyaggregate: theory_atom +#line 563 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.uid) = lexer->aggregate((yystack_[0].value.theoryAtom)); } +#line 1418 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 136: -#line 573 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.headaggrelemvec) = BUILDER.headaggrelemvec((yystack_[5].value.headaggrelemvec), (yystack_[3].value.termvec), (yystack_[1].value.lit), (yystack_[0].value.litvec)); } -#line 1435 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 136: // headaggrelemvec: headaggrelemvec ";" termvec ":" literal optcondition +#line 569 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.headaggrelemvec) = BUILDER.headaggrelemvec((yystack_[5].value.headaggrelemvec), (yystack_[3].value.termvec), (yystack_[1].value.lit), (yystack_[0].value.litvec)); } +#line 1424 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 137: -#line 574 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.headaggrelemvec) = BUILDER.headaggrelemvec(BUILDER.headaggrelemvec(), (yystack_[3].value.termvec), (yystack_[1].value.lit), (yystack_[0].value.litvec)); } -#line 1441 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 137: // headaggrelemvec: termvec ":" literal optcondition +#line 570 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.headaggrelemvec) = BUILDER.headaggrelemvec(BUILDER.headaggrelemvec(), (yystack_[3].value.termvec), (yystack_[1].value.lit), (yystack_[0].value.litvec)); } +#line 1430 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 138: -#line 578 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.condlitlist) = BUILDER.condlitvec(BUILDER.condlitvec(), (yystack_[1].value.lit), (yystack_[0].value.litvec)); } -#line 1447 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 138: // altheadaggrelemvec: literal optcondition +#line 574 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.condlitlist) = BUILDER.condlitvec(BUILDER.condlitvec(), (yystack_[1].value.lit), (yystack_[0].value.litvec)); } +#line 1436 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 139: -#line 579 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.condlitlist) = BUILDER.condlitvec((yystack_[3].value.condlitlist), (yystack_[1].value.lit), (yystack_[0].value.litvec)); } -#line 1453 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 139: // altheadaggrelemvec: altheadaggrelemvec ";" literal optcondition +#line 575 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.condlitlist) = BUILDER.condlitvec((yystack_[3].value.condlitlist), (yystack_[1].value.lit), (yystack_[0].value.litvec)); } +#line 1442 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 140: -#line 585 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.aggr) = { (yystack_[2].value.fun), false, BUILDER.headaggrelemvec() }; } -#line 1459 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 140: // headaggregate: aggregatefunction "{" "}" +#line 581 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.aggr) = { (yystack_[2].value.fun), false, BUILDER.headaggrelemvec() }; } +#line 1448 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 141: -#line 586 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.aggr) = { (yystack_[3].value.fun), false, (yystack_[1].value.headaggrelemvec) }; } -#line 1465 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 141: // headaggregate: aggregatefunction "{" headaggrelemvec "}" +#line 582 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.aggr) = { (yystack_[3].value.fun), false, (yystack_[1].value.headaggrelemvec) }; } +#line 1454 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 142: -#line 587 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.aggr) = { AggregateFunction::COUNT, true, BUILDER.condlitvec()}; } -#line 1471 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 142: // headaggregate: "{" "}" +#line 583 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.aggr) = { AggregateFunction::COUNT, true, BUILDER.condlitvec()}; } +#line 1460 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 143: -#line 588 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.aggr) = { AggregateFunction::COUNT, true, (yystack_[1].value.condlitlist)}; } -#line 1477 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 143: // headaggregate: "{" altheadaggrelemvec "}" +#line 584 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.aggr) = { AggregateFunction::COUNT, true, (yystack_[1].value.condlitlist)}; } +#line 1466 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 144: -#line 592 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.uid) = lexer->aggregate((yystack_[1].value.aggr).fun, (yystack_[1].value.aggr).choice, (yystack_[1].value.aggr).elems, lexer->boundvec(Relation::LEQ, (yystack_[2].value.term), (yystack_[0].value.bound).rel, (yystack_[0].value.bound).term)); } -#line 1483 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 144: // luheadaggregate: term headaggregate upper +#line 588 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.uid) = lexer->aggregate((yystack_[1].value.aggr).fun, (yystack_[1].value.aggr).choice, (yystack_[1].value.aggr).elems, lexer->boundvec(Relation::LEQ, (yystack_[2].value.term), (yystack_[0].value.bound).rel, (yystack_[0].value.bound).term)); } +#line 1472 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 145: -#line 593 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.uid) = lexer->aggregate((yystack_[1].value.aggr).fun, (yystack_[1].value.aggr).choice, (yystack_[1].value.aggr).elems, lexer->boundvec((yystack_[2].value.rel), (yystack_[3].value.term), (yystack_[0].value.bound).rel, (yystack_[0].value.bound).term)); } -#line 1489 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 145: // luheadaggregate: term cmp headaggregate upper +#line 589 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.uid) = lexer->aggregate((yystack_[1].value.aggr).fun, (yystack_[1].value.aggr).choice, (yystack_[1].value.aggr).elems, lexer->boundvec((yystack_[2].value.rel), (yystack_[3].value.term), (yystack_[0].value.bound).rel, (yystack_[0].value.bound).term)); } +#line 1478 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 146: -#line 594 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.uid) = lexer->aggregate((yystack_[1].value.aggr).fun, (yystack_[1].value.aggr).choice, (yystack_[1].value.aggr).elems, lexer->boundvec(Relation::LEQ, TermUid(-1), (yystack_[0].value.bound).rel, (yystack_[0].value.bound).term)); } -#line 1495 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 146: // luheadaggregate: headaggregate upper +#line 590 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.uid) = lexer->aggregate((yystack_[1].value.aggr).fun, (yystack_[1].value.aggr).choice, (yystack_[1].value.aggr).elems, lexer->boundvec(Relation::LEQ, TermUid(-1), (yystack_[0].value.bound).rel, (yystack_[0].value.bound).term)); } +#line 1484 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 147: -#line 595 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.uid) = lexer->aggregate((yystack_[0].value.theoryAtom)); } -#line 1501 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 147: // luheadaggregate: theory_atom +#line 591 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.uid) = lexer->aggregate((yystack_[0].value.theoryAtom)); } +#line 1490 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 148: -#line 602 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.lbodyaggrelem) = { (yystack_[2].value.lit), (yystack_[0].value.litvec) }; } -#line 1507 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 148: // conjunction: literal ":" litvec +#line 598 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.lbodyaggrelem) = { (yystack_[2].value.lit), (yystack_[0].value.litvec) }; } +#line 1496 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 151: -#line 616 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.condlitlist) = BUILDER.condlitvec((yystack_[2].value.condlitlist), (yystack_[1].value.lit), BUILDER.litvec()); } -#line 1513 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 151: // disjunctionsep: disjunctionsep literal "," +#line 612 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.condlitlist) = BUILDER.condlitvec((yystack_[2].value.condlitlist), (yystack_[1].value.lit), BUILDER.litvec()); } +#line 1502 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 152: -#line 617 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.condlitlist) = BUILDER.condlitvec((yystack_[2].value.condlitlist), (yystack_[1].value.lit), BUILDER.litvec()); } -#line 1519 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 152: // disjunctionsep: disjunctionsep literal dsym +#line 613 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.condlitlist) = BUILDER.condlitvec((yystack_[2].value.condlitlist), (yystack_[1].value.lit), BUILDER.litvec()); } +#line 1508 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 153: -#line 618 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.condlitlist) = BUILDER.condlitvec((yystack_[3].value.condlitlist), (yystack_[2].value.lit), BUILDER.litvec()); } -#line 1525 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 153: // disjunctionsep: disjunctionsep literal ":" ";" +#line 614 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.condlitlist) = BUILDER.condlitvec((yystack_[3].value.condlitlist), (yystack_[2].value.lit), BUILDER.litvec()); } +#line 1514 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 154: -#line 619 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.condlitlist) = BUILDER.condlitvec((yystack_[4].value.condlitlist), (yystack_[3].value.lit), (yystack_[1].value.litvec)); } -#line 1531 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 154: // disjunctionsep: disjunctionsep literal ":" nlitvec dsym +#line 615 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.condlitlist) = BUILDER.condlitvec((yystack_[4].value.condlitlist), (yystack_[3].value.lit), (yystack_[1].value.litvec)); } +#line 1520 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 155: -#line 620 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.condlitlist) = BUILDER.condlitvec(BUILDER.condlitvec(), (yystack_[1].value.lit), BUILDER.litvec()); } -#line 1537 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 155: // disjunctionsep: literal "," +#line 616 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.condlitlist) = BUILDER.condlitvec(BUILDER.condlitvec(), (yystack_[1].value.lit), BUILDER.litvec()); } +#line 1526 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 156: -#line 621 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.condlitlist) = BUILDER.condlitvec(BUILDER.condlitvec(), (yystack_[1].value.lit), BUILDER.litvec()); } -#line 1543 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 156: // disjunctionsep: literal dsym +#line 617 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.condlitlist) = BUILDER.condlitvec(BUILDER.condlitvec(), (yystack_[1].value.lit), BUILDER.litvec()); } +#line 1532 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 157: -#line 622 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.condlitlist) = BUILDER.condlitvec(BUILDER.condlitvec(), (yystack_[3].value.lit), (yystack_[1].value.litvec)); } -#line 1549 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 157: // disjunctionsep: literal ":" nlitvec dsym +#line 618 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.condlitlist) = BUILDER.condlitvec(BUILDER.condlitvec(), (yystack_[3].value.lit), (yystack_[1].value.litvec)); } +#line 1538 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 158: -#line 623 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.condlitlist) = BUILDER.condlitvec(BUILDER.condlitvec(), (yystack_[2].value.lit), BUILDER.litvec()); } -#line 1555 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 158: // disjunctionsep: literal ":" ";" +#line 619 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.condlitlist) = BUILDER.condlitvec(BUILDER.condlitvec(), (yystack_[2].value.lit), BUILDER.litvec()); } +#line 1544 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 159: -#line 627 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.condlitlist) = BUILDER.condlitvec((yystack_[2].value.condlitlist), (yystack_[1].value.lit), (yystack_[0].value.litvec)); } -#line 1561 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 159: // disjunction: disjunctionsep literal optcondition +#line 623 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.condlitlist) = BUILDER.condlitvec((yystack_[2].value.condlitlist), (yystack_[1].value.lit), (yystack_[0].value.litvec)); } +#line 1550 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 160: -#line 628 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.condlitlist) = BUILDER.condlitvec(BUILDER.condlitvec(), (yystack_[2].value.lit), (yystack_[0].value.litvec)); } -#line 1567 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 160: // disjunction: literal ":" litvec +#line 624 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.condlitlist) = BUILDER.condlitvec(BUILDER.condlitvec(), (yystack_[2].value.lit), (yystack_[0].value.litvec)); } +#line 1556 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 161: -#line 635 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.body) = BUILDER.bodylit((yystack_[2].value.body), (yystack_[1].value.lit)); } -#line 1573 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 161: // bodycomma: bodycomma literal "," +#line 631 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.body) = BUILDER.bodylit((yystack_[2].value.body), (yystack_[1].value.lit)); } +#line 1562 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 162: -#line 636 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.body) = BUILDER.bodylit((yystack_[2].value.body), (yystack_[1].value.lit)); } -#line 1579 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 162: // bodycomma: bodycomma literal ";" +#line 632 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.body) = BUILDER.bodylit((yystack_[2].value.body), (yystack_[1].value.lit)); } +#line 1568 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 163: -#line 637 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.body) = lexer->bodyaggregate((yystack_[2].value.body), yystack_[1].location, NAF::POS, (yystack_[1].value.uid)); } -#line 1585 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 163: // bodycomma: bodycomma lubodyaggregate "," +#line 633 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.body) = lexer->bodyaggregate((yystack_[2].value.body), yystack_[1].location, NAF::POS, (yystack_[1].value.uid)); } +#line 1574 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 164: -#line 638 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.body) = lexer->bodyaggregate((yystack_[2].value.body), yystack_[1].location, NAF::POS, (yystack_[1].value.uid)); } -#line 1591 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 164: // bodycomma: bodycomma lubodyaggregate ";" +#line 634 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.body) = lexer->bodyaggregate((yystack_[2].value.body), yystack_[1].location, NAF::POS, (yystack_[1].value.uid)); } +#line 1580 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 165: -#line 639 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.body) = lexer->bodyaggregate((yystack_[3].value.body), yystack_[1].location + yystack_[2].location, NAF::NOT, (yystack_[1].value.uid)); } -#line 1597 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 165: // bodycomma: bodycomma "not" lubodyaggregate "," +#line 635 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.body) = lexer->bodyaggregate((yystack_[3].value.body), yystack_[1].location + yystack_[2].location, NAF::NOT, (yystack_[1].value.uid)); } +#line 1586 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 166: -#line 640 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.body) = lexer->bodyaggregate((yystack_[3].value.body), yystack_[1].location + yystack_[2].location, NAF::NOT, (yystack_[1].value.uid)); } -#line 1603 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 166: // bodycomma: bodycomma "not" lubodyaggregate ";" +#line 636 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.body) = lexer->bodyaggregate((yystack_[3].value.body), yystack_[1].location + yystack_[2].location, NAF::NOT, (yystack_[1].value.uid)); } +#line 1592 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 167: -#line 641 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.body) = lexer->bodyaggregate((yystack_[4].value.body), yystack_[1].location + yystack_[3].location, NAF::NOTNOT, (yystack_[1].value.uid)); } -#line 1609 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 167: // bodycomma: bodycomma "not" "not" lubodyaggregate "," +#line 637 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.body) = lexer->bodyaggregate((yystack_[4].value.body), yystack_[1].location + yystack_[3].location, NAF::NOTNOT, (yystack_[1].value.uid)); } +#line 1598 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 168: -#line 642 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.body) = lexer->bodyaggregate((yystack_[4].value.body), yystack_[1].location + yystack_[3].location, NAF::NOTNOT, (yystack_[1].value.uid)); } -#line 1615 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 168: // bodycomma: bodycomma "not" "not" lubodyaggregate ";" +#line 638 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.body) = lexer->bodyaggregate((yystack_[4].value.body), yystack_[1].location + yystack_[3].location, NAF::NOTNOT, (yystack_[1].value.uid)); } +#line 1604 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 169: -#line 643 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.body) = BUILDER.conjunction((yystack_[2].value.body), yystack_[1].location, (yystack_[1].value.lbodyaggrelem).first, (yystack_[1].value.lbodyaggrelem).second); } -#line 1621 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 169: // bodycomma: bodycomma conjunction ";" +#line 639 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.body) = BUILDER.conjunction((yystack_[2].value.body), yystack_[1].location, (yystack_[1].value.lbodyaggrelem).first, (yystack_[1].value.lbodyaggrelem).second); } +#line 1610 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 170: -#line 644 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.body) = BUILDER.body(); } -#line 1627 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 170: // bodycomma: %empty +#line 640 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.body) = BUILDER.body(); } +#line 1616 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 171: -#line 648 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.body) = BUILDER.bodylit((yystack_[2].value.body), (yystack_[1].value.lit)); } -#line 1633 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 171: // bodydot: bodycomma literal "." +#line 644 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.body) = BUILDER.bodylit((yystack_[2].value.body), (yystack_[1].value.lit)); } +#line 1622 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 172: -#line 649 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.body) = lexer->bodyaggregate((yystack_[2].value.body), yystack_[1].location, NAF::POS, (yystack_[1].value.uid)); } -#line 1639 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 172: // bodydot: bodycomma lubodyaggregate "." +#line 645 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.body) = lexer->bodyaggregate((yystack_[2].value.body), yystack_[1].location, NAF::POS, (yystack_[1].value.uid)); } +#line 1628 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 173: -#line 650 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.body) = lexer->bodyaggregate((yystack_[3].value.body), yystack_[1].location + yystack_[2].location, NAF::NOT, (yystack_[1].value.uid)); } -#line 1645 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 173: // bodydot: bodycomma "not" lubodyaggregate "." +#line 646 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.body) = lexer->bodyaggregate((yystack_[3].value.body), yystack_[1].location + yystack_[2].location, NAF::NOT, (yystack_[1].value.uid)); } +#line 1634 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 174: -#line 651 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.body) = lexer->bodyaggregate((yystack_[4].value.body), yystack_[1].location + yystack_[3].location, NAF::NOTNOT, (yystack_[1].value.uid)); } -#line 1651 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 174: // bodydot: bodycomma "not" "not" lubodyaggregate "." +#line 647 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.body) = lexer->bodyaggregate((yystack_[4].value.body), yystack_[1].location + yystack_[3].location, NAF::NOTNOT, (yystack_[1].value.uid)); } +#line 1640 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 175: -#line 652 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.body) = BUILDER.conjunction((yystack_[2].value.body), yystack_[1].location, (yystack_[1].value.lbodyaggrelem).first, (yystack_[1].value.lbodyaggrelem).second); } -#line 1657 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 175: // bodydot: bodycomma conjunction "." +#line 648 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.body) = BUILDER.conjunction((yystack_[2].value.body), yystack_[1].location, (yystack_[1].value.lbodyaggrelem).first, (yystack_[1].value.lbodyaggrelem).second); } +#line 1646 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 176: -#line 656 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.body) = BUILDER.body(); } -#line 1663 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 176: // bodyconddot: "." +#line 652 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.body) = BUILDER.body(); } +#line 1652 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 177: -#line 657 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.body) = BUILDER.body(); } -#line 1669 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 177: // bodyconddot: ":" "." +#line 653 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.body) = BUILDER.body(); } +#line 1658 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 178: -#line 658 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.body) = (yystack_[0].value.body); } -#line 1675 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 178: // bodyconddot: ":" bodydot +#line 654 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.body) = (yystack_[0].value.body); } +#line 1664 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 179: -#line 661 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.head) = BUILDER.headlit((yystack_[0].value.lit)); } -#line 1681 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 179: // head: literal +#line 657 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.head) = BUILDER.headlit((yystack_[0].value.lit)); } +#line 1670 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 180: -#line 662 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.head) = BUILDER.disjunction(yylhs.location, (yystack_[0].value.condlitlist)); } -#line 1687 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 180: // head: disjunction +#line 658 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.head) = BUILDER.disjunction(yylhs.location, (yystack_[0].value.condlitlist)); } +#line 1676 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 181: -#line 663 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.head) = lexer->headaggregate(yylhs.location, (yystack_[0].value.uid)); } -#line 1693 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 181: // head: luheadaggregate +#line 659 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.head) = lexer->headaggregate(yylhs.location, (yystack_[0].value.uid)); } +#line 1682 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 182: -#line 667 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { BUILDER.rule(yylhs.location, (yystack_[1].value.head)); } -#line 1699 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 182: // statement: head "." +#line 663 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { BUILDER.rule(yylhs.location, (yystack_[1].value.head)); } +#line 1688 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 183: -#line 668 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { BUILDER.rule(yylhs.location, (yystack_[2].value.head)); } -#line 1705 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 183: // statement: head ":-" "." +#line 664 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { BUILDER.rule(yylhs.location, (yystack_[2].value.head)); } +#line 1694 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 184: -#line 669 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { BUILDER.rule(yylhs.location, (yystack_[2].value.head), (yystack_[0].value.body)); } -#line 1711 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 184: // statement: head ":-" bodydot +#line 665 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { BUILDER.rule(yylhs.location, (yystack_[2].value.head), (yystack_[0].value.body)); } +#line 1700 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 185: -#line 670 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { BUILDER.rule(yylhs.location, BUILDER.headlit(BUILDER.boollit(yylhs.location, false)), (yystack_[0].value.body)); } -#line 1717 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 185: // statement: ":-" bodydot +#line 666 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { BUILDER.rule(yylhs.location, BUILDER.headlit(BUILDER.boollit(yylhs.location, false)), (yystack_[0].value.body)); } +#line 1706 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 186: -#line 671 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { BUILDER.rule(yylhs.location, BUILDER.headlit(BUILDER.boollit(yylhs.location, false)), BUILDER.body()); } -#line 1723 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 186: // statement: ":-" "." +#line 667 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { BUILDER.rule(yylhs.location, BUILDER.headlit(BUILDER.boollit(yylhs.location, false)), BUILDER.body()); } +#line 1712 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 187: -#line 677 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.termvec) = (yystack_[0].value.termvec); } -#line 1729 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 187: // optimizetuple: "," ntermvec +#line 673 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.termvec) = (yystack_[0].value.termvec); } +#line 1718 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 188: -#line 678 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.termvec) = BUILDER.termvec(); } -#line 1735 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 188: // optimizetuple: %empty +#line 674 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.termvec) = BUILDER.termvec(); } +#line 1724 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 189: -#line 682 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.termpair) = {(yystack_[2].value.term), (yystack_[0].value.term)}; } -#line 1741 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 189: // optimizeweight: term "@" term +#line 678 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.termpair) = {(yystack_[2].value.term), (yystack_[0].value.term)}; } +#line 1730 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 190: -#line 683 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.termpair) = {(yystack_[0].value.term), BUILDER.term(yylhs.location, Symbol::createNum(0))}; } -#line 1747 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 190: // optimizeweight: term +#line 679 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.termpair) = {(yystack_[0].value.term), BUILDER.term(yylhs.location, Symbol::createNum(0))}; } +#line 1736 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 191: -#line 687 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.body) = BUILDER.bodylit(BUILDER.body(), (yystack_[0].value.lit)); } -#line 1753 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 191: // optimizelitvec: literal +#line 683 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.body) = BUILDER.bodylit(BUILDER.body(), (yystack_[0].value.lit)); } +#line 1742 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 192: -#line 688 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.body) = BUILDER.bodylit((yystack_[2].value.body), (yystack_[0].value.lit)); } -#line 1759 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 192: // optimizelitvec: optimizelitvec "," literal +#line 684 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.body) = BUILDER.bodylit((yystack_[2].value.body), (yystack_[0].value.lit)); } +#line 1748 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 193: -#line 692 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.body) = (yystack_[0].value.body); } -#line 1765 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 193: // optimizecond: ":" optimizelitvec +#line 688 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.body) = (yystack_[0].value.body); } +#line 1754 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 194: -#line 693 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.body) = BUILDER.body(); } -#line 1771 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 194: // optimizecond: ":" +#line 689 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.body) = BUILDER.body(); } +#line 1760 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 195: -#line 694 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { (yylhs.value.body) = BUILDER.body(); } -#line 1777 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 195: // optimizecond: %empty +#line 690 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { (yylhs.value.body) = BUILDER.body(); } +#line 1766 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 196: -#line 698 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { BUILDER.optimize(yylhs.location, (yystack_[2].value.termpair).first, (yystack_[2].value.termpair).second, (yystack_[1].value.termvec), (yystack_[4].value.body)); } -#line 1783 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 196: // statement: ":~" bodydot "[" optimizeweight optimizetuple "]" +#line 694 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { BUILDER.optimize(yylhs.location, (yystack_[2].value.termpair).first, (yystack_[2].value.termpair).second, (yystack_[1].value.termvec), (yystack_[4].value.body)); } +#line 1772 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 197: -#line 699 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { BUILDER.optimize(yylhs.location, (yystack_[2].value.termpair).first, (yystack_[2].value.termpair).second, (yystack_[1].value.termvec), BUILDER.body()); } -#line 1789 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 197: // statement: ":~" "." "[" optimizeweight optimizetuple "]" +#line 695 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { BUILDER.optimize(yylhs.location, (yystack_[2].value.termpair).first, (yystack_[2].value.termpair).second, (yystack_[1].value.termvec), BUILDER.body()); } +#line 1778 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 198: -#line 703 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { BUILDER.optimize(yylhs.location, BUILDER.term(yystack_[2].location, UnOp::NEG, (yystack_[2].value.termpair).first), (yystack_[2].value.termpair).second, (yystack_[1].value.termvec), (yystack_[0].value.body)); } -#line 1795 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 198: // maxelemlist: optimizeweight optimizetuple optimizecond +#line 699 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { BUILDER.optimize(yylhs.location, BUILDER.term(yystack_[2].location, UnOp::NEG, (yystack_[2].value.termpair).first), (yystack_[2].value.termpair).second, (yystack_[1].value.termvec), (yystack_[0].value.body)); } +#line 1784 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 199: -#line 704 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { BUILDER.optimize(yylhs.location, BUILDER.term(yystack_[2].location, UnOp::NEG, (yystack_[2].value.termpair).first), (yystack_[2].value.termpair).second, (yystack_[1].value.termvec), (yystack_[0].value.body)); } -#line 1801 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 199: // maxelemlist: maxelemlist ";" optimizeweight optimizetuple optimizecond +#line 700 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { BUILDER.optimize(yylhs.location, BUILDER.term(yystack_[2].location, UnOp::NEG, (yystack_[2].value.termpair).first), (yystack_[2].value.termpair).second, (yystack_[1].value.termvec), (yystack_[0].value.body)); } +#line 1790 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 200: -#line 708 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { BUILDER.optimize(yylhs.location, (yystack_[2].value.termpair).first, (yystack_[2].value.termpair).second, (yystack_[1].value.termvec), (yystack_[0].value.body)); } -#line 1807 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 200: // minelemlist: optimizeweight optimizetuple optimizecond +#line 704 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { BUILDER.optimize(yylhs.location, (yystack_[2].value.termpair).first, (yystack_[2].value.termpair).second, (yystack_[1].value.termvec), (yystack_[0].value.body)); } +#line 1796 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 201: -#line 709 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { BUILDER.optimize(yylhs.location, (yystack_[2].value.termpair).first, (yystack_[2].value.termpair).second, (yystack_[1].value.termvec), (yystack_[0].value.body)); } -#line 1813 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 201: // minelemlist: minelemlist ";" optimizeweight optimizetuple optimizecond +#line 705 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { BUILDER.optimize(yylhs.location, (yystack_[2].value.termpair).first, (yystack_[2].value.termpair).second, (yystack_[1].value.termvec), (yystack_[0].value.body)); } +#line 1802 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 206: -#line 722 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { BUILDER.showsig(yylhs.location, Sig(String::fromRep((yystack_[3].value.str)), (yystack_[1].value.num), false)); } -#line 1819 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 206: // statement: "#showsig" identifier "/" "" "." +#line 718 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { BUILDER.showsig(yylhs.location, Sig(String::fromRep((yystack_[3].value.str)), (yystack_[1].value.num), false)); } +#line 1808 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 207: -#line 723 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { BUILDER.showsig(yylhs.location, Sig(String::fromRep((yystack_[3].value.str)), (yystack_[1].value.num), true)); } -#line 1825 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 207: // statement: "#showsig" "-" identifier "/" "" "." +#line 719 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { BUILDER.showsig(yylhs.location, Sig(String::fromRep((yystack_[3].value.str)), (yystack_[1].value.num), true)); } +#line 1814 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 208: -#line 724 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { BUILDER.showsig(yylhs.location, Sig("", 0, false)); } -#line 1831 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 208: // statement: "#show" "." +#line 720 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { BUILDER.showsig(yylhs.location, Sig("", 0, false)); } +#line 1820 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 209: -#line 725 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { BUILDER.show(yylhs.location, (yystack_[2].value.term), (yystack_[0].value.body)); } -#line 1837 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 209: // statement: "#show" term ":" bodydot +#line 721 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { BUILDER.show(yylhs.location, (yystack_[2].value.term), (yystack_[0].value.body)); } +#line 1826 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 210: -#line 726 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { BUILDER.show(yylhs.location, (yystack_[1].value.term), BUILDER.body()); } -#line 1843 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 210: // statement: "#show" term "." +#line 722 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { BUILDER.show(yylhs.location, (yystack_[1].value.term), BUILDER.body()); } +#line 1832 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 211: -#line 732 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { BUILDER.defined(yylhs.location, Sig(String::fromRep((yystack_[3].value.str)), (yystack_[1].value.num), false)); } -#line 1849 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 211: // statement: "#defined" identifier "/" "" "." +#line 728 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { BUILDER.defined(yylhs.location, Sig(String::fromRep((yystack_[3].value.str)), (yystack_[1].value.num), false)); } +#line 1838 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 212: -#line 733 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { BUILDER.defined(yylhs.location, Sig(String::fromRep((yystack_[3].value.str)), (yystack_[1].value.num), true)); } -#line 1855 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 212: // statement: "#defined" "-" identifier "/" "" "." +#line 729 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { BUILDER.defined(yylhs.location, Sig(String::fromRep((yystack_[3].value.str)), (yystack_[1].value.num), true)); } +#line 1844 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 213: -#line 738 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { BUILDER.edge(yylhs.location, (yystack_[2].value.termvecvec), (yystack_[0].value.body)); } -#line 1861 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 213: // statement: "#edge" "(" binaryargvec ")" bodyconddot +#line 734 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { BUILDER.edge(yylhs.location, (yystack_[2].value.termvecvec), (yystack_[0].value.body)); } +#line 1850 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 214: -#line 744 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { BUILDER.heuristic(yylhs.location, (yystack_[8].value.term), (yystack_[7].value.body), (yystack_[5].value.term), (yystack_[3].value.term), (yystack_[1].value.term)); } -#line 1867 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 214: // statement: "#heuristic" atom bodyconddot "[" term "@" term "," term "]" +#line 740 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { BUILDER.heuristic(yylhs.location, (yystack_[8].value.term), (yystack_[7].value.body), (yystack_[5].value.term), (yystack_[3].value.term), (yystack_[1].value.term)); } +#line 1856 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 215: -#line 745 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { BUILDER.heuristic(yylhs.location, (yystack_[6].value.term), (yystack_[5].value.body), (yystack_[3].value.term), BUILDER.term(yylhs.location, Symbol::createNum(0)), (yystack_[1].value.term)); } -#line 1873 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 215: // statement: "#heuristic" atom bodyconddot "[" term "," term "]" +#line 741 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { BUILDER.heuristic(yylhs.location, (yystack_[6].value.term), (yystack_[5].value.body), (yystack_[3].value.term), BUILDER.term(yylhs.location, Symbol::createNum(0)), (yystack_[1].value.term)); } +#line 1862 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 216: -#line 751 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { BUILDER.project(yylhs.location, Sig(String::fromRep((yystack_[3].value.str)), (yystack_[1].value.num), false)); } -#line 1879 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 216: // statement: "#project" identifier "/" "" "." +#line 747 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { BUILDER.project(yylhs.location, Sig(String::fromRep((yystack_[3].value.str)), (yystack_[1].value.num), false)); } +#line 1868 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 217: -#line 752 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { BUILDER.project(yylhs.location, Sig(String::fromRep((yystack_[3].value.str)), (yystack_[1].value.num), true)); } -#line 1885 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 217: // statement: "#project" "-" identifier "/" "" "." +#line 748 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { BUILDER.project(yylhs.location, Sig(String::fromRep((yystack_[3].value.str)), (yystack_[1].value.num), true)); } +#line 1874 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 218: -#line 753 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { BUILDER.project(yylhs.location, (yystack_[1].value.term), (yystack_[0].value.body)); } -#line 1891 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 218: // statement: "#project" atom bodyconddot +#line 749 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { BUILDER.project(yylhs.location, (yystack_[1].value.term), (yystack_[0].value.body)); } +#line 1880 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 219: -#line 759 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { BUILDER.define(yylhs.location, String::fromRep((yystack_[2].value.str)), (yystack_[0].value.term), false, LOGGER); } -#line 1897 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 219: // define: identifier "=" constterm +#line 755 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { BUILDER.define(yylhs.location, String::fromRep((yystack_[2].value.str)), (yystack_[0].value.term), false, LOGGER); } +#line 1886 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 220: -#line 763 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { lexer->storeComments(); } -#line 1903 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 220: // storecomment: %empty +#line 759 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { lexer->storeComments(); } +#line 1892 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 221: -#line 766 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { BUILDER.define(yylhs.location, String::fromRep((yystack_[4].value.str)), (yystack_[2].value.term), true, LOGGER); lexer->flushComments(); } -#line 1909 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 221: // statement: "#const" identifier "=" constterm "." storecomment +#line 762 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { BUILDER.define(yylhs.location, String::fromRep((yystack_[4].value.str)), (yystack_[2].value.term), true, LOGGER); lexer->flushComments(); } +#line 1898 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 222: -#line 767 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { lexer->flushComments(); BUILDER.define(yylhs.location, String::fromRep((yystack_[7].value.str)), (yystack_[5].value.term), true, LOGGER); } -#line 1915 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 222: // statement: "#const" identifier "=" constterm "." storecomment "[" "default" "]" +#line 763 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { lexer->flushComments(); BUILDER.define(yylhs.location, String::fromRep((yystack_[7].value.str)), (yystack_[5].value.term), true, LOGGER); } +#line 1904 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 223: -#line 768 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { lexer->flushComments(); BUILDER.define(yylhs.location, String::fromRep((yystack_[7].value.str)), (yystack_[5].value.term), false, LOGGER); } -#line 1921 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 223: // statement: "#const" identifier "=" constterm "." storecomment "[" "override" "]" +#line 764 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" + { lexer->flushComments(); BUILDER.define(yylhs.location, String::fromRep((yystack_[7].value.str)), (yystack_[5].value.term), false, LOGGER); } +#line 1910 "/home/kaminski/Documents/git/potassco/clingo/build/debug/libgringo/src/input/nongroundgrammar/grammar.cc" break; - case 224: -#line 774 "/home/kaminski/Documents/git/potassco/clingo/libgringo/src/input/nongroundgrammar.yy" // lalr1.cc:919 - { BUILDER.script(yylhs.location, String::fromRep((yystack_[3].value.str)), String::fromRep((yystack_[1].value.str))); } -#line 1927 "/mnt/scratch/kaminski/build/clingo/debug/libgringo/src/input/nongroundgrammar/grammar.cc" // lalr1.cc:919 + case 224: // statement: "