pire.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. #pragma once
  2. #ifndef PIRE_NO_CONFIG
  3. #define PIRE_NO_CONFIG
  4. #endif
  5. #include <contrib/libs/pire/pire/pire.h>
  6. #include <contrib/libs/pire/pire/extra.h>
  7. #include <library/cpp/charset/doccodes.h>
  8. namespace NPire {
  9. using TChar = Pire::Char;
  10. using Pire::MaxChar;
  11. // Scanner classes
  12. using TScanner = Pire::Scanner;
  13. using TNonrelocScanner = Pire::NonrelocScanner;
  14. using TScannerNoMask = Pire::ScannerNoMask;
  15. using TNonrelocScannerNoMask = Pire::NonrelocScannerNoMask;
  16. using THalfFinalScanner = Pire::HalfFinalScanner;
  17. using TNonrelocHalfFinalScanner = Pire::NonrelocHalfFinalScanner;
  18. using THalfFinalScannerNoMask = Pire::HalfFinalScannerNoMask;
  19. using TNonrelocHalfFinalScannerNoMask = Pire::NonrelocHalfFinalScannerNoMask;
  20. using TSimpleScanner = Pire::SimpleScanner;
  21. using TSlowScanner = Pire::SlowScanner;
  22. using TCapturingScanner = Pire::CapturingScanner;
  23. using TSlowCapturingScanner = Pire::SlowCapturingScanner;
  24. using TCountingScanner = Pire::CountingScanner;
  25. template <typename T1, typename T2>
  26. using TScannerPair = Pire::ScannerPair<T1, T2>;
  27. // Helper classes
  28. using TFsm = Pire::Fsm;
  29. using TLexer = Pire::Lexer;
  30. using TTerm = Pire::Term;
  31. using TEncoding = Pire::Encoding;
  32. using TFeature = Pire::Feature;
  33. using TFeaturePtr = Pire::Feature::Ptr;
  34. using TError = Pire::Error;
  35. // Helper functions
  36. using Pire::LongestPrefix;
  37. using Pire::LongestSuffix;
  38. using Pire::Matches;
  39. using Pire::MmappedScanner;
  40. using Pire::Run;
  41. using Pire::Runner;
  42. using Pire::ShortestPrefix;
  43. using Pire::ShortestSuffix;
  44. using Pire::Step;
  45. using namespace Pire::SpecialChar;
  46. using namespace Pire::Consts;
  47. namespace NFeatures {
  48. using Pire::Features::AndNotSupport;
  49. using Pire::Features::Capture;
  50. using Pire::Features::CaseInsensitive;
  51. using Pire::Features::GlueSimilarGlyphs;
  52. }
  53. namespace NEncodings {
  54. using Pire::Encodings::Latin1;
  55. using Pire::Encodings::Utf8;
  56. const NPire::TEncoding& Koi8r();
  57. const NPire::TEncoding& Cp1251();
  58. const NPire::TEncoding& Get(ECharset encoding);
  59. }
  60. namespace NTokenTypes {
  61. using namespace Pire::TokenTypes;
  62. }
  63. }