cmDependsFortranParser.h 4.0 KB

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