cmDependsFortranParser.h 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. int cmDependsFortranParser_FilePush(cmDependsFortranParser* parser,
  20. const char* fname);
  21. int 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. int in);
  31. int cmDependsFortranParser_GetInInterface(cmDependsFortranParser* parser);
  32. /* Callbacks for parser. */
  33. void cmDependsFortranParser_Error(cmDependsFortranParser* parser,
  34. const char* message);
  35. void cmDependsFortranParser_RuleUse(cmDependsFortranParser* parser,
  36. const char* name);
  37. void cmDependsFortranParser_RuleInclude(cmDependsFortranParser* parser,
  38. const char* name);
  39. void cmDependsFortranParser_RuleModule(cmDependsFortranParser* parser,
  40. const char* name);
  41. void cmDependsFortranParser_RuleDefine(cmDependsFortranParser* parser,
  42. const char* name);
  43. void cmDependsFortranParser_RuleUndef(cmDependsFortranParser* parser,
  44. const char* name);
  45. void cmDependsFortranParser_RuleIfdef(cmDependsFortranParser* parser,
  46. const char* name);
  47. void cmDependsFortranParser_RuleIfndef(cmDependsFortranParser* parser,
  48. const char* name);
  49. void cmDependsFortranParser_RuleIf(cmDependsFortranParser* parser);
  50. void cmDependsFortranParser_RuleElif(cmDependsFortranParser* parser);
  51. void cmDependsFortranParser_RuleElse(cmDependsFortranParser* parser);
  52. void cmDependsFortranParser_RuleEndif(cmDependsFortranParser* parser);
  53. /* Define the parser stack element type. */
  54. typedef union cmDependsFortran_yystype_u cmDependsFortran_yystype;
  55. union cmDependsFortran_yystype_u
  56. {
  57. char* string;
  58. };
  59. /* Setup the proper yylex interface. */
  60. #define YY_EXTRA_TYPE cmDependsFortranParser*
  61. #define YY_DECL int cmDependsFortran_yylex(YYSTYPE* yylvalp, yyscan_t yyscanner)
  62. #define YYSTYPE cmDependsFortran_yystype
  63. #define YYSTYPE_IS_DECLARED 1
  64. #if !defined(cmDependsFortranLexer_cxx)
  65. # include "cmDependsFortranLexer.h"
  66. #endif
  67. #if !defined(cmDependsFortranLexer_cxx) && !defined(cmDependsFortranParser_cxx)
  68. # undef YY_EXTRA_TYPE
  69. # undef YY_DECL
  70. # undef YYSTYPE
  71. # undef YYSTYPE_IS_DECLARED
  72. #endif
  73. #endif