__init__.py 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #=======================================================================
  2. #
  3. # Python Lexical Analyser
  4. #
  5. #=======================================================================
  6. """
  7. The Plex module provides lexical analysers with similar capabilities
  8. to GNU Flex. The following classes and functions are exported;
  9. see the attached docstrings for more information.
  10. Scanner For scanning a character stream under the
  11. direction of a Lexicon.
  12. Lexicon For constructing a lexical definition
  13. to be used by a Scanner.
  14. Str, Any, AnyBut, AnyChar, Seq, Alt, Opt, Rep, Rep1,
  15. Bol, Eol, Eof, Empty
  16. Regular expression constructors, for building pattern
  17. definitions for a Lexicon.
  18. State For defining scanner states when creating a
  19. Lexicon.
  20. TEXT, IGNORE, Begin
  21. Actions for associating with patterns when
  22. creating a Lexicon.
  23. """
  24. from __future__ import absolute_import
  25. from .Actions import TEXT, IGNORE, Begin
  26. from .Lexicons import Lexicon, State
  27. from .Regexps import RE, Seq, Alt, Rep1, Empty, Str, Any, AnyBut, AnyChar, Range
  28. from .Regexps import Opt, Rep, Bol, Eol, Eof, Case, NoCase
  29. from .Scanners import Scanner