LCOV - code coverage report
Current view: top level - buildbot/coverage/build/src/parser - tokens.cpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 9 102 8.8 %
Date: 2025-03-25 12:42:10 Functions: 1 1 100.0 %
Branches: 6 87 6.9 %

           Branch data     Line data    Source code
       1                 :            : /******************************************************************************
       2                 :            :  * Top contributors (to current version):
       3                 :            :  *   Andrew Reynolds, Haniel Barbosa
       4                 :            :  *
       5                 :            :  * This file is part of the cvc5 project.
       6                 :            :  *
       7                 :            :  * Copyright (c) 2009-2025 by the authors listed in the file AUTHORS
       8                 :            :  * in the top-level source directory and their institutional affiliations.
       9                 :            :  * All rights reserved.  See the file COPYING in the top-level source
      10                 :            :  * directory for licensing information.
      11                 :            :  * ****************************************************************************
      12                 :            :  *
      13                 :            :  * Definitions of SMT2 tokens.
      14                 :            :  */
      15                 :            : 
      16                 :            : #include "parser/tokens.h"
      17                 :            : 
      18                 :            : #include <iostream>
      19                 :            : 
      20                 :            : namespace cvc5 {
      21                 :            : namespace parser {
      22                 :            : 
      23                 :         18 : std::ostream& operator<<(std::ostream& o, Token t)
      24                 :            : {
      25 [ +  - ][ -  - ]:         18 :   switch (t)
         [ -  - ][ -  - ]
         [ -  - ][ -  - ]
         [ -  - ][ +  - ]
         [ -  - ][ -  - ]
         [ -  - ][ -  - ]
         [ -  - ][ -  - ]
         [ -  - ][ -  - ]
         [ -  - ][ -  - ]
         [ -  - ][ -  - ]
         [ -  - ][ -  - ]
         [ -  - ][ -  - ]
         [ -  - ][ -  - ]
         [ -  - ][ -  - ]
         [ -  - ][ -  + ]
         [ -  - ][ -  + ]
         [ -  - ][ -  - ]
         [ -  - ][ -  - ]
         [ -  + ][ -  - ]
         [ -  - ][ -  - ]
         [ +  - ][ -  - ]
            [ -  - ][ - ]
      26                 :            :   {
      27                 :          2 :     case Token::EOF_TOK: o << "EOF_TOK"; break;
      28                 :          0 :     case Token::ALPHA: o << "ALPHA"; break;
      29                 :          0 :     case Token::ASSERT_TOK: o << "ASSERT_TOK"; break;
      30                 :          0 :     case Token::ASSUME_TOK: o << "ASSUME_TOK"; break;
      31                 :          0 :     case Token::AS_TOK: o << "AS_TOK"; break;
      32                 :          0 :     case Token::ATTRIBUTE_TOK: o << "ATTRIBUTE_TOK"; break;
      33                 :          0 :     case Token::BINARY_LITERAL: o << "BINARY_LITERAL"; break;
      34                 :          0 :     case Token::BLOCK_MODEL_TOK: o << "BLOCK_MODEL_TOK"; break;
      35                 :          0 :     case Token::BLOCK_MODEL_VALUES_TOK: o << "BLOCK_MODEL_VALUES_TOK"; break;
      36                 :          0 :     case Token::CHECK_SAT_ASSUMING_TOK: o << "CHECK_SAT_ASSUMING_TOK"; break;
      37                 :          0 :     case Token::CHECK_SAT_TOK: o << "CHECK_SAT_TOK"; break;
      38                 :          0 :     case Token::CHECK_SYNTH_NEXT_TOK: o << "CHECK_SYNTH_NEXT_TOK"; break;
      39                 :          0 :     case Token::CHECK_SYNTH_TOK: o << "CHECK_SYNTH_TOK"; break;
      40                 :          0 :     case Token::CONSTRAINT_TOK: o << "CONSTRAINT_TOK"; break;
      41                 :          1 :     case Token::DECIMAL_LITERAL: o << "DECIMAL_LITERAL"; break;
      42                 :          0 :     case Token::DECLARE_CODATATYPES_TOK: o << "DECLARE_CODATATYPES_TOK"; break;
      43                 :          0 :     case Token::DECLARE_CODATATYPE_TOK: o << "DECLARE_CODATATYPE_TOK"; break;
      44                 :          0 :     case Token::DECLARE_CONST_TOK: o << "DECLARE_CONST_TOK"; break;
      45                 :          0 :     case Token::DECLARE_DATATYPES_TOK: o << "DECLARE_DATATYPES_TOK"; break;
      46                 :          0 :     case Token::DECLARE_DATATYPE_TOK: o << "DECLARE_DATATYPE_TOK"; break;
      47                 :          0 :     case Token::DECLARE_FUN_TOK: o << "DECLARE_FUN_TOK"; break;
      48                 :          0 :     case Token::DECLARE_HEAP_TOK: o << "DECLARE_HEAP_TOK"; break;
      49                 :          0 :     case Token::DECLARE_ORACLE_FUN_TOK: o << "DECLARE_ORACLE_FUN_TOK"; break;
      50                 :          0 :     case Token::DECLARE_POOL_TOK: o << "DECLARE_POOL_TOK"; break;
      51                 :          0 :     case Token::DECLARE_SORT_TOK: o << "DECLARE_SORT_TOK"; break;
      52                 :          0 :     case Token::DECLARE_VAR_TOK: o << "DECLARE_VAR_TOK"; break;
      53                 :          0 :     case Token::DEFINE_CONST_TOK: o << "DEFINE_CONST_TOK"; break;
      54                 :          0 :     case Token::DEFINE_FUNS_REC_TOK: o << "DEFINE_FUNS_REC_TOK"; break;
      55                 :          0 :     case Token::DEFINE_FUN_REC_TOK: o << "DEFINE_FUN_REC_TOK"; break;
      56                 :          0 :     case Token::DEFINE_FUN_TOK: o << "DEFINE_FUN_TOK"; break;
      57                 :          0 :     case Token::DEFINE_SORT_TOK: o << "DEFINE_SORT_TOK"; break;
      58                 :          0 :     case Token::ECHO_TOK: o << "ECHO_TOK"; break;
      59                 :          0 :     case Token::EXIT_TOK: o << "EXIT_TOK"; break;
      60                 :          0 :     case Token::FIELD_LITERAL: o << "FIELD_LITERAL"; break;
      61                 :          0 :     case Token::FIND_SYNTH_TOK: o << "FIND_SYNTH_TOK"; break;
      62                 :          0 :     case Token::FIND_SYNTH_NEXT_TOK: o << "FIND_SYNTH_NEXT_TOK"; break;
      63                 :          0 :     case Token::GET_ABDUCT_NEXT_TOK: o << "GET_ABDUCT_NEXT_TOK"; break;
      64                 :          0 :     case Token::GET_ABDUCT_TOK: o << "GET_ABDUCT_TOK"; break;
      65                 :          0 :     case Token::GET_ASSERTIONS_TOK: o << "GET_ASSERTIONS_TOK"; break;
      66                 :          0 :     case Token::GET_ASSIGNMENT_TOK: o << "GET_ASSIGNMENT_TOK"; break;
      67                 :          0 :     case Token::GET_DIFFICULTY_TOK: o << "GET_DIFFICULTY_TOK"; break;
      68                 :          0 :     case Token::GET_INFO_TOK: o << "GET_INFO_TOK"; break;
      69                 :          0 :     case Token::GET_INTERPOL_NEXT_TOK: o << "GET_INTERPOL_NEXT_TOK"; break;
      70                 :          0 :     case Token::GET_INTERPOL_TOK: o << "GET_INTERPOL_TOK"; break;
      71                 :          0 :     case Token::GET_LEARNED_LITERALS_TOK:
      72                 :          0 :       o << "GET_LEARNED_LITERALS_TOK";
      73                 :          0 :       break;
      74                 :          0 :     case Token::GET_MODEL_TOK: o << "GET_MODEL_TOK"; break;
      75                 :          0 :     case Token::GET_OPTION_TOK: o << "GET_OPTION_TOK"; break;
      76                 :          0 :     case Token::GET_PROOF_TOK: o << "GET_PROOF_TOK"; break;
      77                 :          0 :     case Token::GET_QE_DISJUNCT_TOK: o << "GET_QE_DISJUNCT_TOK"; break;
      78                 :          0 :     case Token::GET_QE_TOK: o << "GET_QE_TOK"; break;
      79                 :          0 :     case Token::GET_TIMEOUT_CORE_TOK: o << "GET_TIMEOUT_CORE_TOK"; break;
      80                 :          0 :     case Token::GET_TIMEOUT_CORE_ASSUMING_TOK:
      81                 :          0 :       o << "GET_TIMEOUT_CORE_ASSUMING_TOK";
      82                 :          0 :       break;
      83                 :          0 :     case Token::GET_UNSAT_ASSUMPTIONS_TOK:
      84                 :          0 :       o << "GET_UNSAT_ASSUMPTIONS_TOK";
      85                 :          0 :       break;
      86                 :          0 :     case Token::GET_UNSAT_CORE_TOK: o << "GET_UNSAT_CORE_TOK"; break;
      87                 :          0 :     case Token::GET_UNSAT_CORE_LEMMAS_TOK:
      88                 :          0 :       o << "GET_UNSAT_CORE_LEMMAS_TOK";
      89                 :          0 :       break;
      90                 :          0 :     case Token::GET_VALUE_TOK: o << "GET_VALUE_TOK"; break;
      91                 :          0 :     case Token::HEX_LITERAL: o << "HEX_LITERAL"; break;
      92                 :          0 :     case Token::INCLUDE_TOK: o << "INCLUDE_TOK"; break;
      93                 :          0 :     case Token::INDEX_TOK: o << "INDEX_TOK"; break;
      94                 :          1 :     case Token::INTEGER_LITERAL: o << "INTEGER_LITERAL"; break;
      95                 :          0 :     case Token::INV_CONSTRAINT_TOK: o << "INV_CONSTRAINT_TOK"; break;
      96                 :          0 :     case Token::KEYWORD: o << "KEYWORD"; break;
      97                 :          0 :     case Token::LET_TOK: o << "LET_TOK"; break;
      98                 :          3 :     case Token::LPAREN_TOK: o << "LPAREN_TOK"; break;
      99                 :          0 :     case Token::MATCH_TOK: o << "MATCH_TOK"; break;
     100                 :          0 :     case Token::NUMERAL: o << "NUMERAL"; break;
     101                 :          0 :     case Token::PAR_TOK: o << "PAR_TOK"; break;
     102                 :          0 :     case Token::POP_TOK: o << "POP_TOK"; break;
     103                 :          0 :     case Token::PUSH_TOK: o << "PUSH_TOK"; break;
     104                 :          0 :     case Token::QUOTED_SYMBOL: o << "QUOTED_SYMBOL"; break;
     105                 :          0 :     case Token::RATIONAL_LITERAL: o << "RATIONAL_LITERAL"; break;
     106                 :          0 :     case Token::RESET_ASSERTIONS_TOK: o << "RESET_ASSERTIONS_TOK"; break;
     107                 :          0 :     case Token::RESET_TOK: o << "RESET_TOK"; break;
     108                 :          6 :     case Token::RPAREN_TOK: o << "RPAREN_TOK"; break;
     109                 :          0 :     case Token::SET_FEATURE_TOK: o << "SET_FEATURE_TOK"; break;
     110                 :          0 :     case Token::SET_INFO_TOK: o << "SET_INFO_TOK"; break;
     111                 :          0 :     case Token::SET_LOGIC_TOK: o << "SET_LOGIC_TOK"; break;
     112                 :          0 :     case Token::SET_OPTION_TOK: o << "SET_OPTION_TOK"; break;
     113                 :          0 :     case Token::SIMPLIFY_TOK: o << "SIMPLIFY_TOK"; break;
     114                 :          0 :     case Token::STRING_LITERAL: o << "STRING_LITERAL"; break;
     115                 :          5 :     case Token::SYMBOL: o << "SYMBOL"; break;
     116                 :          0 :     case Token::SYNTH_FUN_TOK: o << "SYNTH_FUN_TOK"; break;
     117                 :          0 :     case Token::SYNTH_INV_TOK: o << "SYNTH_INV_TOK"; break;
     118                 :          0 :     case Token::UNTERMINATED_QUOTED_SYMBOL:
     119                 :          0 :       o << "UNTERMINATED_QUOTED_SYMBOL";
     120                 :          0 :       break;
     121                 :          0 :     case Token::UNTERMINATED_STRING_LITERAL:
     122                 :          0 :       o << "UNTERMINATED_STRING_LITERAL";
     123                 :          0 :       break;
     124                 :          0 :     case Token::NONE: o << "NONE"; break;
     125                 :          0 :     default: o << "Unknown Token (" << unsigned(t) << ")"; break;
     126                 :            :   }
     127                 :         18 :   return o;
     128                 :            : }
     129                 :            : 
     130                 :            : }  // namespace parser
     131                 :            : }  // namespace cvc5

Generated by: LCOV version 1.14