parser.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. #ifndef PARSER_H_62B23520_7C8E_11DE_8A39_0800200C9A66
  2. #define PARSER_H_62B23520_7C8E_11DE_8A39_0800200C9A66
  3. #if defined(_MSC_VER) || \
  4. (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \
  5. (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4
  6. #pragma once
  7. #endif
  8. #include <ios>
  9. #include <memory>
  10. #include "yaml-cpp/dll.h"
  11. namespace YAML {
  12. class EventHandler;
  13. class Node;
  14. class Scanner;
  15. struct Directives;
  16. struct Token;
  17. /**
  18. * A parser turns a stream of bytes into one stream of "events" per YAML
  19. * document in the input stream.
  20. */
  21. class YAML_CPP_API Parser {
  22. public:
  23. /** Constructs an empty parser (with no input. */
  24. Parser();
  25. Parser(const Parser&) = delete;
  26. Parser(Parser&&) = delete;
  27. Parser& operator=(const Parser&) = delete;
  28. Parser& operator=(Parser&&) = delete;
  29. /**
  30. * Constructs a parser from the given input stream. The input stream must
  31. * live as long as the parser.
  32. */
  33. explicit Parser(std::istream& in);
  34. ~Parser();
  35. /** Evaluates to true if the parser has some valid input to be read. */
  36. explicit operator bool() const;
  37. /**
  38. * Resets the parser with the given input stream. Any existing state is
  39. * erased.
  40. */
  41. void Load(std::istream& in);
  42. /**
  43. * Handles the next document by calling events on the {@code eventHandler}.
  44. *
  45. * @throw a ParserException on error.
  46. * @return false if there are no more documents
  47. */
  48. bool HandleNextDocument(EventHandler& eventHandler);
  49. void PrintTokens(std::ostream& out);
  50. private:
  51. /**
  52. * Reads any directives that are next in the queue, setting the internal
  53. * {@code m_pDirectives} state.
  54. */
  55. void ParseDirectives();
  56. void HandleDirective(const Token& token);
  57. /**
  58. * Handles a "YAML" directive, which should be of the form 'major.minor' (like
  59. * a version number).
  60. */
  61. void HandleYamlDirective(const Token& token);
  62. /**
  63. * Handles a "TAG" directive, which should be of the form 'handle prefix',
  64. * where 'handle' is converted to 'prefix' in the file.
  65. */
  66. void HandleTagDirective(const Token& token);
  67. private:
  68. std::unique_ptr<Scanner> m_pScanner;
  69. std::unique_ptr<Directives> m_pDirectives;
  70. };
  71. } // namespace YAML
  72. #endif // PARSER_H_62B23520_7C8E_11DE_8A39_0800200C9A66
PANIC: session(release): write data/sessions/c/5/c505e1beb6c8f45b: no space left on device

PANIC

session(release): write data/sessions/c/5/c505e1beb6c8f45b: no space left on device
github.com/go-macaron/session@v0.0.0-20190805070824-1a3cdc6f5659/session.go:199 (0x8b2934)
gopkg.in/macaron.v1@v1.3.9/context.go:79 (0x83d0a0)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:157 (0x80ab07)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:135 (0x80a8a8)
gopkg.in/macaron.v1@v1.3.9/context.go:121 (0x83d1f8)
gopkg.in/macaron.v1@v1.3.9/context.go:112 (0x84fdb5)
gopkg.in/macaron.v1@v1.3.9/recovery.go:161 (0x84fda8)
gopkg.in/macaron.v1@v1.3.9/logger.go:40 (0x840c73)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:157 (0x80ab07)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:135 (0x80a8a8)
gopkg.in/macaron.v1@v1.3.9/context.go:121 (0x83d1f8)
gopkg.in/macaron.v1@v1.3.9/router.go:187 (0x850fc6)
gopkg.in/macaron.v1@v1.3.9/router.go:303 (0x8493e5)
gopkg.in/macaron.v1@v1.3.9/macaron.go:220 (0x841fca)
net/http/server.go:2836 (0x7a79b2)
net/http/server.go:1924 (0x7a341b)
runtime/asm_amd64.s:1373 (0x46f9f0)