LCOV - code coverage report
Current view: top level - /mnt/build/buildbot/bld/build-lcov/gcc/m2/gm2-compiler-boot - M2Reserved.c (source / functions) Coverage Total Hit
Test: gcc.info Lines: 93.5 % 201 188
Test Date: 2024-12-21 13:15:12 Functions: 50.0 % 6 3
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: - 0 0

             Branch data     Line data    Source code
       1                 :             : /* do not edit automatically generated by mc from M2Reserved.  */
       2                 :             : /* M2Reserved.mod determines is a token is a reserved word.
       3                 :             : 
       4                 :             : Copyright (C) 2001-2024 Free Software Foundation, Inc.
       5                 :             : Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
       6                 :             : 
       7                 :             : This file is part of GNU Modula-2.
       8                 :             : 
       9                 :             : GNU Modula-2 is free software; you can redistribute it and/or modify
      10                 :             : it under the terms of the GNU General Public License as published by
      11                 :             : the Free Software Foundation; either version 3, or (at your option)
      12                 :             : any later version.
      13                 :             : 
      14                 :             : GNU Modula-2 is distributed in the hope that it will be useful, but
      15                 :             : WITHOUT ANY WARRANTY; without even the implied warranty of
      16                 :             : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      17                 :             : General Public License for more details.
      18                 :             : 
      19                 :             : You should have received a copy of the GNU General Public License
      20                 :             : along with GNU Modula-2; see the file COPYING3.  If not see
      21                 :             : <http://www.gnu.org/licenses/>.  */
      22                 :             : 
      23                 :             : #include "config.h"
      24                 :             : #include "system.h"
      25                 :             : #include <stdbool.h>
      26                 :             : #   if !defined (PROC_D)
      27                 :             : #      define PROC_D
      28                 :             :        typedef void (*PROC_t) (void);
      29                 :             :        typedef struct { PROC_t proc; } PROC;
      30                 :             : #   endif
      31                 :             : 
      32                 :             : #   if !defined (TRUE)
      33                 :             : #      define TRUE (1==1)
      34                 :             : #   endif
      35                 :             : 
      36                 :             : #   if !defined (FALSE)
      37                 :             : #      define FALSE (1==0)
      38                 :             : #   endif
      39                 :             : 
      40                 :             : #define _M2Reserved_C
      41                 :             : 
      42                 :             : #include "GM2Reserved.h"
      43                 :             : #   include "GSymbolKey.h"
      44                 :             : #   include "GNameKey.h"
      45                 :             : #   include "GASCII.h"
      46                 :             : 
      47                 :             : #   define eof (char) 032
      48                 :             : static SymbolKey_SymbolTree NameTotok;
      49                 :             : static SymbolKey_SymbolTree tokToName;
      50                 :             : 
      51                 :             : /*
      52                 :             :    IsReserved - returns TRUE if the symbol, Name, is a reserved word.
      53                 :             :                 If TRUE it also sets tok to the appropriate enumerated
      54                 :             :                 value. It will set tok to eoftok if appropriate.
      55                 :             : */
      56                 :             : 
      57                 :             : extern "C" bool M2Reserved_IsReserved (NameKey_Name n, M2Reserved_toktype *tok);
      58                 :             : 
      59                 :             : /*
      60                 :             :    tokToTok - returns a Tok given the enumerated variable, t.
      61                 :             : */
      62                 :             : 
      63                 :             : extern "C" NameKey_Name M2Reserved_tokToTok (M2Reserved_toktype t);
      64                 :             : 
      65                 :             : /*
      66                 :             :    AddKeyword - adds the Name and enumerated value of a keyword
      67                 :             :                 into the binary tree.
      68                 :             : */
      69                 :             : 
      70                 :             : static void AddKeyword (NameKey_Name n, M2Reserved_toktype tok);
      71                 :             : 
      72                 :             : /*
      73                 :             :    AddKeyword - adds the Name and enumerated value of a keyword
      74                 :             :                 into the binary tree.
      75                 :             : */
      76                 :             : 
      77                 :             : static void Init (void);
      78                 :             : 
      79                 :             : 
      80                 :             : /*
      81                 :             :    AddKeyword - adds the Name and enumerated value of a keyword
      82                 :             :                 into the binary tree.
      83                 :             : */
      84                 :             : 
      85                 :     1209720 : static void AddKeyword (NameKey_Name n, M2Reserved_toktype tok)
      86                 :             : {
      87                 :     1209720 :   SymbolKey_PutSymKey (NameTotok, n, static_cast<unsigned int> (tok));
      88                 :     1209720 :   SymbolKey_PutSymKey (tokToName, (NameKey_Name) (tok), n);
      89                 :     1209720 : }
      90                 :             : 
      91                 :             : 
      92                 :             : /*
      93                 :             :    AddKeyword - adds the Name and enumerated value of a keyword
      94                 :             :                 into the binary tree.
      95                 :             : */
      96                 :             : 
      97                 :       14232 : static void Init (void)
      98                 :             : {
      99                 :       14232 :   typedef struct Init__T1_a Init__T1;
     100                 :             : 
     101                 :       14232 :   struct Init__T1_a { char array[1+1]; };
     102                 :       14232 :   Init__T1 a;
     103                 :             : 
     104                 :       14232 :   SymbolKey_InitTree (&NameTotok);
     105                 :       14232 :   SymbolKey_InitTree (&tokToName);
     106                 :       14232 :   M2Reserved_NulTok = NameKey_NulName;
     107                 :       14232 :   M2Reserved_PlusTok = NameKey_MakeKey ((const char *) "+", 1);
     108                 :       14232 :   AddKeyword (M2Reserved_PlusTok, M2Reserved_plustok);
     109                 :       14232 :   M2Reserved_MinusTok = NameKey_MakeKey ((const char *) "-", 1);
     110                 :       14232 :   AddKeyword (M2Reserved_MinusTok, M2Reserved_minustok);
     111                 :       14232 :   M2Reserved_TimesTok = NameKey_MakeKey ((const char *) "*", 1);
     112                 :       14232 :   AddKeyword (M2Reserved_TimesTok, M2Reserved_timestok);
     113                 :       14232 :   M2Reserved_DivideTok = NameKey_MakeKey ((const char *) "/", 1);
     114                 :       14232 :   AddKeyword (M2Reserved_DivideTok, M2Reserved_dividetok);
     115                 :       14232 :   M2Reserved_BecomesTok = NameKey_MakeKey ((const char *) ":=", 2);
     116                 :       14232 :   AddKeyword (M2Reserved_BecomesTok, M2Reserved_becomestok);
     117                 :       14232 :   M2Reserved_AmbersandTok = NameKey_MakeKey ((const char *) "&", 1);
     118                 :       14232 :   AddKeyword (M2Reserved_AmbersandTok, M2Reserved_ambersandtok);
     119                 :       14232 :   M2Reserved_PeriodTok = NameKey_MakeKey ((const char *) ".", 1);
     120                 :       14232 :   AddKeyword (M2Reserved_PeriodTok, M2Reserved_periodtok);
     121                 :       14232 :   M2Reserved_CommaTok = NameKey_MakeKey ((const char *) ",", 1);
     122                 :       14232 :   AddKeyword (M2Reserved_CommaTok, M2Reserved_commatok);
     123                 :       14232 :   M2Reserved_SemiColonTok = NameKey_MakeKey ((const char *) ";", 1);
     124                 :       14232 :   AddKeyword (M2Reserved_SemiColonTok, M2Reserved_semicolontok);
     125                 :       14232 :   M2Reserved_LParaTok = NameKey_MakeKey ((const char *) "(", 1);
     126                 :       14232 :   AddKeyword (M2Reserved_LParaTok, M2Reserved_lparatok);
     127                 :       14232 :   M2Reserved_LSBraTok = NameKey_MakeKey ((const char *) "[", 1);
     128                 :       14232 :   AddKeyword (M2Reserved_LSBraTok, M2Reserved_lsbratok);
     129                 :       14232 :   M2Reserved_LCBraTok = NameKey_MakeKey ((const char *) "{", 1);
     130                 :       14232 :   AddKeyword (M2Reserved_LCBraTok, M2Reserved_lcbratok);
     131                 :       14232 :   M2Reserved_UpArrowTok = NameKey_MakeKey ((const char *) "^", 1);
     132                 :       14232 :   AddKeyword (M2Reserved_UpArrowTok, M2Reserved_uparrowtok);
     133                 :       14232 :   M2Reserved_SingleQuoteTok = NameKey_MakeKey ((const char *) "'", 1);
     134                 :       14232 :   AddKeyword (M2Reserved_SingleQuoteTok, M2Reserved_singlequotetok);
     135                 :       14232 :   M2Reserved_EqualTok = NameKey_MakeKey ((const char *) "=", 1);
     136                 :       14232 :   AddKeyword (M2Reserved_EqualTok, M2Reserved_equaltok);
     137                 :       14232 :   M2Reserved_HashTok = NameKey_MakeKey ((const char *) "#", 1);
     138                 :       14232 :   AddKeyword (M2Reserved_HashTok, M2Reserved_hashtok);
     139                 :       14232 :   M2Reserved_LessTok = NameKey_MakeKey ((const char *) "<", 1);
     140                 :       14232 :   AddKeyword (M2Reserved_LessTok, M2Reserved_lesstok);
     141                 :       14232 :   M2Reserved_GreaterTok = NameKey_MakeKey ((const char *) ">", 1);
     142                 :       14232 :   AddKeyword (M2Reserved_GreaterTok, M2Reserved_greatertok);
     143                 :       14232 :   M2Reserved_LessGreaterTok = NameKey_MakeKey ((const char *) "<>", 2);
     144                 :       14232 :   AddKeyword (M2Reserved_LessGreaterTok, M2Reserved_lessgreatertok);
     145                 :       14232 :   M2Reserved_LessEqualTok = NameKey_MakeKey ((const char *) "<=", 2);
     146                 :       14232 :   AddKeyword (M2Reserved_LessEqualTok, M2Reserved_lessequaltok);
     147                 :       14232 :   M2Reserved_GreaterEqualTok = NameKey_MakeKey ((const char *) ">=", 2);
     148                 :       14232 :   AddKeyword (M2Reserved_GreaterEqualTok, M2Reserved_greaterequaltok);
     149                 :       14232 :   M2Reserved_LDirectiveTok = NameKey_MakeKey ((const char *) "<*", 2);
     150                 :       14232 :   AddKeyword (M2Reserved_LDirectiveTok, M2Reserved_ldirectivetok);
     151                 :       14232 :   M2Reserved_RDirectiveTok = NameKey_MakeKey ((const char *) "*>", 2);
     152                 :       14232 :   AddKeyword (M2Reserved_RDirectiveTok, M2Reserved_rdirectivetok);
     153                 :       14232 :   M2Reserved_PeriodPeriodTok = NameKey_MakeKey ((const char *) "..", 2);
     154                 :       14232 :   AddKeyword (M2Reserved_PeriodPeriodTok, M2Reserved_periodperiodtok);
     155                 :       14232 :   M2Reserved_ColonTok = NameKey_MakeKey ((const char *) ":", 1);
     156                 :       14232 :   AddKeyword (M2Reserved_ColonTok, M2Reserved_colontok);
     157                 :       14232 :   M2Reserved_RParaTok = NameKey_MakeKey ((const char *) ")", 1);
     158                 :       14232 :   AddKeyword (M2Reserved_RParaTok, M2Reserved_rparatok);
     159                 :       14232 :   M2Reserved_RSBraTok = NameKey_MakeKey ((const char *) "]", 1);
     160                 :       14232 :   AddKeyword (M2Reserved_RSBraTok, M2Reserved_rsbratok);
     161                 :       14232 :   M2Reserved_RCBraTok = NameKey_MakeKey ((const char *) "}", 1);
     162                 :       14232 :   AddKeyword (M2Reserved_RCBraTok, M2Reserved_rcbratok);
     163                 :       14232 :   M2Reserved_BarTok = NameKey_MakeKey ((const char *) "|", 1);
     164                 :       14232 :   AddKeyword (M2Reserved_BarTok, M2Reserved_bartok);
     165                 :       14232 :   M2Reserved_DoubleQuotesTok = NameKey_MakeKey ((const char *) "\"", 1);
     166                 :       14232 :   AddKeyword (M2Reserved_DoubleQuotesTok, M2Reserved_doublequotestok);
     167                 :       14232 :   M2Reserved_AndTok = NameKey_MakeKey ((const char *) "AND", 3);
     168                 :       14232 :   AddKeyword (M2Reserved_AndTok, M2Reserved_andtok);
     169                 :       14232 :   M2Reserved_ArrayTok = NameKey_MakeKey ((const char *) "ARRAY", 5);
     170                 :       14232 :   AddKeyword (M2Reserved_ArrayTok, M2Reserved_arraytok);
     171                 :       14232 :   M2Reserved_BeginTok = NameKey_MakeKey ((const char *) "BEGIN", 5);
     172                 :       14232 :   AddKeyword (M2Reserved_BeginTok, M2Reserved_begintok);
     173                 :       14232 :   M2Reserved_ByTok = NameKey_MakeKey ((const char *) "BY", 2);
     174                 :       14232 :   AddKeyword (M2Reserved_ByTok, M2Reserved_bytok);
     175                 :       14232 :   M2Reserved_CaseTok = NameKey_MakeKey ((const char *) "CASE", 4);
     176                 :       14232 :   AddKeyword (M2Reserved_CaseTok, M2Reserved_casetok);
     177                 :       14232 :   M2Reserved_ConstTok = NameKey_MakeKey ((const char *) "CONST", 5);
     178                 :       14232 :   AddKeyword (M2Reserved_ConstTok, M2Reserved_consttok);
     179                 :       14232 :   M2Reserved_DefinitionTok = NameKey_MakeKey ((const char *) "DEFINITION", 10);
     180                 :       14232 :   AddKeyword (M2Reserved_DefinitionTok, M2Reserved_definitiontok);
     181                 :       14232 :   M2Reserved_DivTok = NameKey_MakeKey ((const char *) "DIV", 3);
     182                 :       14232 :   AddKeyword (M2Reserved_DivTok, M2Reserved_divtok);
     183                 :       14232 :   M2Reserved_DoTok = NameKey_MakeKey ((const char *) "DO", 2);
     184                 :       14232 :   AddKeyword (M2Reserved_DoTok, M2Reserved_dotok);
     185                 :       14232 :   M2Reserved_ElseTok = NameKey_MakeKey ((const char *) "ELSE", 4);
     186                 :       14232 :   AddKeyword (M2Reserved_ElseTok, M2Reserved_elsetok);
     187                 :       14232 :   M2Reserved_ElsifTok = NameKey_MakeKey ((const char *) "ELSIF", 5);
     188                 :       14232 :   AddKeyword (M2Reserved_ElsifTok, M2Reserved_elsiftok);
     189                 :       14232 :   M2Reserved_EndTok = NameKey_MakeKey ((const char *) "END", 3);
     190                 :       14232 :   AddKeyword (M2Reserved_EndTok, M2Reserved_endtok);
     191                 :       14232 :   M2Reserved_ExitTok = NameKey_MakeKey ((const char *) "EXIT", 4);
     192                 :       14232 :   AddKeyword (M2Reserved_ExitTok, M2Reserved_exittok);
     193                 :       14232 :   M2Reserved_ExceptTok = NameKey_MakeKey ((const char *) "EXCEPT", 6);
     194                 :       14232 :   AddKeyword (M2Reserved_ExceptTok, M2Reserved_excepttok);
     195                 :       14232 :   M2Reserved_ExportTok = NameKey_MakeKey ((const char *) "EXPORT", 6);
     196                 :       14232 :   AddKeyword (M2Reserved_ExportTok, M2Reserved_exporttok);
     197                 :       14232 :   M2Reserved_FinallyTok = NameKey_MakeKey ((const char *) "FINALLY", 7);
     198                 :       14232 :   AddKeyword (M2Reserved_FinallyTok, M2Reserved_finallytok);
     199                 :       14232 :   M2Reserved_ForTok = NameKey_MakeKey ((const char *) "FOR", 3);
     200                 :       14232 :   AddKeyword (M2Reserved_ForTok, M2Reserved_fortok);
     201                 :       14232 :   M2Reserved_ForwardTok = NameKey_MakeKey ((const char *) "FORWARD", 7);
     202                 :       14232 :   AddKeyword (M2Reserved_ForwardTok, M2Reserved_forwardtok);
     203                 :       14232 :   M2Reserved_FromTok = NameKey_MakeKey ((const char *) "FROM", 4);
     204                 :       14232 :   AddKeyword (M2Reserved_FromTok, M2Reserved_fromtok);
     205                 :       14232 :   M2Reserved_IfTok = NameKey_MakeKey ((const char *) "IF", 2);
     206                 :       14232 :   AddKeyword (M2Reserved_IfTok, M2Reserved_iftok);
     207                 :       14232 :   M2Reserved_ImplementationTok = NameKey_MakeKey ((const char *) "IMPLEMENTATION", 14);
     208                 :       14232 :   AddKeyword (M2Reserved_ImplementationTok, M2Reserved_implementationtok);
     209                 :       14232 :   M2Reserved_ImportTok = NameKey_MakeKey ((const char *) "IMPORT", 6);
     210                 :       14232 :   AddKeyword (M2Reserved_ImportTok, M2Reserved_importtok);
     211                 :       14232 :   M2Reserved_InTok = NameKey_MakeKey ((const char *) "IN", 2);
     212                 :       14232 :   AddKeyword (M2Reserved_InTok, M2Reserved_intok);
     213                 :       14232 :   M2Reserved_LoopTok = NameKey_MakeKey ((const char *) "LOOP", 4);
     214                 :       14232 :   AddKeyword (M2Reserved_LoopTok, M2Reserved_looptok);
     215                 :       14232 :   M2Reserved_ModTok = NameKey_MakeKey ((const char *) "MOD", 3);
     216                 :       14232 :   AddKeyword (M2Reserved_ModTok, M2Reserved_modtok);
     217                 :       14232 :   M2Reserved_ModuleTok = NameKey_MakeKey ((const char *) "MODULE", 6);
     218                 :       14232 :   AddKeyword (M2Reserved_ModuleTok, M2Reserved_moduletok);
     219                 :       14232 :   M2Reserved_NotTok = NameKey_MakeKey ((const char *) "NOT", 3);
     220                 :       14232 :   AddKeyword (M2Reserved_NotTok, M2Reserved_nottok);
     221                 :       14232 :   M2Reserved_OfTok = NameKey_MakeKey ((const char *) "OF", 2);
     222                 :       14232 :   AddKeyword (M2Reserved_OfTok, M2Reserved_oftok);
     223                 :       14232 :   M2Reserved_OrTok = NameKey_MakeKey ((const char *) "OR", 2);
     224                 :       14232 :   AddKeyword (M2Reserved_OrTok, M2Reserved_ortok);
     225                 :             :   /* 
     226                 :             :    PackedTok := MakeKey('PACKED') ;
     227                 :             :    AddKeyword(PackedTok, packedtok) ;
     228                 :             :   */
     229                 :       14232 :   M2Reserved_PackedSetTok = NameKey_MakeKey ((const char *) "PACKEDSET", 9);
     230                 :       14232 :   AddKeyword (M2Reserved_PackedSetTok, M2Reserved_packedsettok);
     231                 :       14232 :   M2Reserved_PointerTok = NameKey_MakeKey ((const char *) "POINTER", 7);
     232                 :       14232 :   AddKeyword (M2Reserved_PointerTok, M2Reserved_pointertok);
     233                 :       14232 :   M2Reserved_ProcedureTok = NameKey_MakeKey ((const char *) "PROCEDURE", 9);
     234                 :       14232 :   AddKeyword (M2Reserved_ProcedureTok, M2Reserved_proceduretok);
     235                 :       14232 :   M2Reserved_QualifiedTok = NameKey_MakeKey ((const char *) "QUALIFIED", 9);
     236                 :       14232 :   AddKeyword (M2Reserved_QualifiedTok, M2Reserved_qualifiedtok);
     237                 :       14232 :   M2Reserved_UnQualifiedTok = NameKey_MakeKey ((const char *) "UNQUALIFIED", 11);
     238                 :       14232 :   AddKeyword (M2Reserved_UnQualifiedTok, M2Reserved_unqualifiedtok);
     239                 :       14232 :   M2Reserved_RecordTok = NameKey_MakeKey ((const char *) "RECORD", 6);
     240                 :       14232 :   AddKeyword (M2Reserved_RecordTok, M2Reserved_recordtok);
     241                 :       14232 :   M2Reserved_RemTok = NameKey_MakeKey ((const char *) "REM", 3);
     242                 :       14232 :   AddKeyword (M2Reserved_RemTok, M2Reserved_remtok);
     243                 :       14232 :   M2Reserved_RepeatTok = NameKey_MakeKey ((const char *) "REPEAT", 6);
     244                 :       14232 :   AddKeyword (M2Reserved_RepeatTok, M2Reserved_repeattok);
     245                 :       14232 :   M2Reserved_RetryTok = NameKey_MakeKey ((const char *) "RETRY", 5);
     246                 :       14232 :   AddKeyword (M2Reserved_RetryTok, M2Reserved_retrytok);
     247                 :       14232 :   M2Reserved_ReturnTok = NameKey_MakeKey ((const char *) "RETURN", 6);
     248                 :       14232 :   AddKeyword (M2Reserved_ReturnTok, M2Reserved_returntok);
     249                 :       14232 :   M2Reserved_SetTok = NameKey_MakeKey ((const char *) "SET", 3);
     250                 :       14232 :   AddKeyword (M2Reserved_SetTok, M2Reserved_settok);
     251                 :       14232 :   M2Reserved_ThenTok = NameKey_MakeKey ((const char *) "THEN", 4);
     252                 :       14232 :   AddKeyword (M2Reserved_ThenTok, M2Reserved_thentok);
     253                 :       14232 :   M2Reserved_ToTok = NameKey_MakeKey ((const char *) "TO", 2);
     254                 :       14232 :   AddKeyword (M2Reserved_ToTok, M2Reserved_totok);
     255                 :       14232 :   M2Reserved_TypeTok = NameKey_MakeKey ((const char *) "TYPE", 4);
     256                 :       14232 :   AddKeyword (M2Reserved_TypeTok, M2Reserved_typetok);
     257                 :       14232 :   M2Reserved_UntilTok = NameKey_MakeKey ((const char *) "UNTIL", 5);
     258                 :       14232 :   AddKeyword (M2Reserved_UntilTok, M2Reserved_untiltok);
     259                 :       14232 :   M2Reserved_VarTok = NameKey_MakeKey ((const char *) "VAR", 3);
     260                 :       14232 :   AddKeyword (M2Reserved_VarTok, M2Reserved_vartok);
     261                 :       14232 :   M2Reserved_WhileTok = NameKey_MakeKey ((const char *) "WHILE", 5);
     262                 :       14232 :   AddKeyword (M2Reserved_WhileTok, M2Reserved_whiletok);
     263                 :       14232 :   M2Reserved_WithTok = NameKey_MakeKey ((const char *) "WITH", 4);
     264                 :       14232 :   AddKeyword (M2Reserved_WithTok, M2Reserved_withtok);
     265                 :       14232 :   M2Reserved_AsmTok = NameKey_MakeKey ((const char *) "ASM", 3);
     266                 :       14232 :   AddKeyword (M2Reserved_AsmTok, M2Reserved_asmtok);
     267                 :       14232 :   M2Reserved_VolatileTok = NameKey_MakeKey ((const char *) "VOLATILE", 8);
     268                 :       14232 :   AddKeyword (M2Reserved_VolatileTok, M2Reserved_volatiletok);
     269                 :       14232 :   M2Reserved_DateTok = NameKey_MakeKey ((const char *) "__DATE__", 8);  /* C compatible preprocessor primatives  */
     270                 :       14232 :   AddKeyword (M2Reserved_DateTok, M2Reserved_datetok);  /* C compatible preprocessor primatives  */
     271                 :       14232 :   M2Reserved_LineTok = NameKey_MakeKey ((const char *) "__LINE__", 8);
     272                 :       14232 :   AddKeyword (M2Reserved_LineTok, M2Reserved_linetok);
     273                 :       14232 :   M2Reserved_FileTok = NameKey_MakeKey ((const char *) "__FILE__", 8);
     274                 :       14232 :   AddKeyword (M2Reserved_FileTok, M2Reserved_filetok);
     275                 :       14232 :   M2Reserved_AttributeTok = NameKey_MakeKey ((const char *) "__ATTRIBUTE__", 13);  /* GCC extension incorporated into gm2  */
     276                 :       14232 :   AddKeyword (M2Reserved_AttributeTok, M2Reserved_attributetok);  /* GCC extension incorporated into gm2  */
     277                 :       14232 :   M2Reserved_BuiltinTok = NameKey_MakeKey ((const char *) "__BUILTIN__", 11);  /* GCC extension incorporated into gm2  */
     278                 :       14232 :   AddKeyword (M2Reserved_BuiltinTok, M2Reserved_builtintok);  /* GCC extension incorporated into gm2  */
     279                 :       14232 :   M2Reserved_InlineTok = NameKey_MakeKey ((const char *) "__INLINE__", 10);  /* GCC extension incorporated into gm2  */
     280                 :       14232 :   AddKeyword (M2Reserved_InlineTok, M2Reserved_inlinetok);  /* GCC extension incorporated into gm2  */
     281                 :       14232 :   a.array[0] = eof;
     282                 :       14232 :   a.array[1] = ASCII_nul;
     283                 :       14232 :   M2Reserved_EofTok = NameKey_MakeKey ((const char *) &a.array[0], 1);  /* Not a reserved token  */
     284                 :       14232 : }
     285                 :             : 
     286                 :             : 
     287                 :             : /*
     288                 :             :    IsReserved - returns TRUE if the symbol, Name, is a reserved word.
     289                 :             :                 If TRUE it also sets tok to the appropriate enumerated
     290                 :             :                 value. It will set tok to eoftok if appropriate.
     291                 :             : */
     292                 :             : 
     293                 :           0 : extern "C" bool M2Reserved_IsReserved (NameKey_Name n, M2Reserved_toktype *tok)
     294                 :             : {
     295                 :           0 :   unsigned int t;
     296                 :             : 
     297                 :           0 :   t = static_cast<unsigned int> (SymbolKey_GetSymKey (NameTotok, n));
     298                 :           0 :   if (t == 0)
     299                 :             :     {
     300                 :             :       /* eoftok is not a reserved word  */
     301                 :           0 :       if (n == M2Reserved_EofTok)
     302                 :             :         {
     303                 :           0 :           (*tok) = M2Reserved_eoftok;
     304                 :             :         }
     305                 :           0 :       return false;
     306                 :             :     }
     307                 :             :   else
     308                 :             :     {
     309                 :           0 :       (*tok) = (M2Reserved_toktype) (t);
     310                 :           0 :       return true;
     311                 :             :     }
     312                 :             :   /* static analysis guarentees a RETURN statement will be used before here.  */
     313                 :             :   __builtin_unreachable ();
     314                 :             : }
     315                 :             : 
     316                 :             : 
     317                 :             : /*
     318                 :             :    tokToTok - returns a Tok given the enumerated variable, t.
     319                 :             : */
     320                 :             : 
     321                 :           0 : extern "C" NameKey_Name M2Reserved_tokToTok (M2Reserved_toktype t)
     322                 :             : {
     323                 :           0 :   return static_cast<NameKey_Name> (SymbolKey_GetSymKey (tokToName, (NameKey_Name) (t)));
     324                 :             :   /* static analysis guarentees a RETURN statement will be used before here.  */
     325                 :             :   __builtin_unreachable ();
     326                 :             : }
     327                 :             : 
     328                 :       14232 : extern "C" void _M2_M2Reserved_init (__attribute__((unused)) int argc, __attribute__((unused)) char *argv[], __attribute__((unused)) char *envp[])
     329                 :             : {
     330                 :       14232 :   Init ();
     331                 :       14232 : }
     332                 :             : 
     333                 :           0 : extern "C" void _M2_M2Reserved_fini (__attribute__((unused)) int argc, __attribute__((unused)) char *argv[], __attribute__((unused)) char *envp[])
     334                 :             : {
     335                 :           0 : }
        

Generated by: LCOV version 2.1-beta

LCOV profile is generated on x86_64 machine using following configure options: configure --disable-bootstrap --enable-coverage=opt --enable-languages=c,c++,fortran,go,jit,lto,rust,m2 --enable-host-shared. GCC test suite is run with the built compiler.