You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

101 lines
4.1 KiB

  1. /*=========================================================================
  2. Program: CMake - Cross-Platform Makefile Generator
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
  8. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
  9. This software is distributed WITHOUT ANY WARRANTY; without even
  10. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  11. PURPOSE. See the above copyright notices for more information.
  12. =========================================================================*/
  13. #ifndef cmDependsFortranParser_h
  14. #define cmDependsFortranParser_h
  15. #include <stddef.h> /* size_t */
  16. /* Forward declare parser object type. */
  17. typedef struct cmDependsFortranParser_s cmDependsFortranParser;
  18. /* Functions to enter/exit #include'd files in order. */
  19. bool cmDependsFortranParser_FilePush(cmDependsFortranParser* parser,
  20. const char* fname);
  21. bool cmDependsFortranParser_FilePop(cmDependsFortranParser* parser);
  22. /* Callbacks for lexer. */
  23. int cmDependsFortranParser_Input(cmDependsFortranParser* parser,
  24. char* buffer, size_t bufferSize);
  25. void cmDependsFortranParser_StringStart(cmDependsFortranParser* parser);
  26. const char* cmDependsFortranParser_StringEnd(cmDependsFortranParser* parser);
  27. void cmDependsFortranParser_StringAppend(cmDependsFortranParser* parser,
  28. char c);
  29. void cmDependsFortranParser_SetInInterface(cmDependsFortranParser* parser,
  30. bool is_in);
  31. bool cmDependsFortranParser_GetInInterface(cmDependsFortranParser* parser);
  32. void cmDependsFortranParser_SetInPPFalseBranch(cmDependsFortranParser* parser,
  33. bool is_in);
  34. bool cmDependsFortranParser_GetInPPFalseBranch(cmDependsFortranParser* parser);
  35. void cmDependsFortranParser_SetOldStartcond(cmDependsFortranParser* parser,
  36. int arg);
  37. int cmDependsFortranParser_GetOldStartcond(cmDependsFortranParser* parser);
  38. /* Callbacks for parser. */
  39. void cmDependsFortranParser_Error(cmDependsFortranParser* parser,
  40. const char* message);
  41. void cmDependsFortranParser_RuleUse(cmDependsFortranParser* parser,
  42. const char* name);
  43. void cmDependsFortranParser_RuleInclude(cmDependsFortranParser* parser,
  44. const char* name);
  45. void cmDependsFortranParser_RuleModule(cmDependsFortranParser* parser,
  46. const char* name);
  47. void cmDependsFortranParser_RuleDefine(cmDependsFortranParser* parser,
  48. const char* name);
  49. void cmDependsFortranParser_RuleUndef(cmDependsFortranParser* parser,
  50. const char* name);
  51. void cmDependsFortranParser_RuleIfdef(cmDependsFortranParser* parser,
  52. const char* name);
  53. void cmDependsFortranParser_RuleIfndef(cmDependsFortranParser* parser,
  54. const char* name);
  55. void cmDependsFortranParser_RuleIf(cmDependsFortranParser* parser);
  56. void cmDependsFortranParser_RuleElif(cmDependsFortranParser* parser);
  57. void cmDependsFortranParser_RuleElse(cmDependsFortranParser* parser);
  58. void cmDependsFortranParser_RuleEndif(cmDependsFortranParser* parser);
  59. /* Define the parser stack element type. */
  60. typedef union cmDependsFortran_yystype_u cmDependsFortran_yystype;
  61. union cmDependsFortran_yystype_u
  62. {
  63. char* string;
  64. };
  65. /* Setup the proper yylex interface. */
  66. #define YY_EXTRA_TYPE cmDependsFortranParser*
  67. #define YY_DECL \
  68. int cmDependsFortran_yylex(YYSTYPE* yylvalp, yyscan_t yyscanner)
  69. #define YYSTYPE cmDependsFortran_yystype
  70. #define YYSTYPE_IS_DECLARED 1
  71. #if !defined(cmDependsFortranLexer_cxx)
  72. # include "cmDependsFortranLexer.h"
  73. #endif
  74. #if !defined(cmDependsFortranLexer_cxx)
  75. #if !defined(cmDependsFortranParser_cxx)
  76. # undef YY_EXTRA_TYPE
  77. # undef YY_DECL
  78. # undef YYSTYPE
  79. # undef YYSTYPE_IS_DECLARED
  80. #endif
  81. #endif
  82. #endif