|  | reflex::FlexLexer< M >::Matcher Class Reference updated Sat Oct 7 2023 by Robert van Engelen |

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | List of all members
reflex::FlexLexer< M >::Matcher Class Reference

Extends reflex::AbstractLexer<M>::Matcher for Flex-compatibility. More...

`#include <flexlexer.h>`

Inheritance diagram for reflex::FlexLexer< M >::Matcher:
[legend]
Collaboration diagram for reflex::FlexLexer< M >::Matcher:
[legend]

## Public Member Functions
| Matcher (const typename M::Pattern &pattern, const Input &input, FlexLexer *lexer, const char *opt=NULL)
| Construct a FlexLexer matcher from a matcher's pattern type. More...
| Matcher (const char *pattern, const Input &input, FlexLexer *lexer, const char *opt=NULL)
| Construct a FlexLexer matcher from a string pattern. More...
virtual size_t | get (char *s, size_t n)
| Read character sequences via a Flex-compatible virtual FlexLexer::LexerInput method. More...
Public Member Functions inherited from reflex::AbstractLexer< M >::Matcher
| Matcher (const typename M::Pattern &pattern, const Input &input, AbstractLexer *lexer, const char *opt=NULL)
| Construct a lexer matcher from a matcher's pattern type. More...
| Matcher (const char *pattern, const Input &input, AbstractLexer *lexer, const char *opt=NULL)
| Construct a lexer matcher from a string pattern. More...

## Protected Member Functions
virtual bool | wrap ()
| Check the Flex-compatible FlexLexer::yywrap method to determine if matcher should wrap input after EOF (lexer yywrap() should return 0 to wrap input after EOF). More...

## Additional Inherited Members
Protected Attributes inherited from reflex::AbstractLexer< M >::Matcher
AbstractLexer * | lexer_
| Points to the lexer class that instantiated this Matcher. More...

## Detailed Description

### template<typename M>
class reflex::FlexLexer< M >::Matcher

Extends reflex::AbstractLexer<M>::Matcher for Flex-compatibility.

## Constructor & Destructor Documentation

template<typename M >

reflex::FlexLexer< M >::Matcher::Matcher | ( | const typename M::Pattern & | pattern,
|  | const Input & | input,
|  | FlexLexer * | lexer,
|  | const char * | opt = `NULL`
| ) |  |
| inline

Construct a FlexLexer matcher from a matcher's pattern type.

Parameters

  pattern | regex pattern to instantiate matcher class M(pattern, input)
  input | the reflex::Input to instantiate matcher class M(pattern, input)
  lexer | points to the instantiating lexer class
  opt | option string of the form `(A|N|T(=[[:digit:]])?|;)*`

template<typename M >

reflex::FlexLexer< M >::Matcher::Matcher | ( | const char * | pattern,
|  | const Input & | input,
|  | FlexLexer * | lexer,
|  | const char * | opt = `NULL`
| ) |  |
| inline

Construct a FlexLexer matcher from a string pattern.

Parameters

  pattern | regex pattern to instantiate matcher class M(pattern, input)
  input | the reflex::Input to instantiate matcher class M(pattern, input)
  lexer | points to the instantiating lexer class
  opt | option string of the form `(A|N|T(=[[:digit:]])?|;)*`

## Member Function Documentation

template<typename M >

virtual size_t reflex::FlexLexer< M >::Matcher::get | ( | char * | s,
|  | size_t | n
| ) |  |
| inline virtual

Read character sequences via a Flex-compatible virtual FlexLexer::LexerInput method.

template<typename M >

virtual bool reflex::FlexLexer< M >::Matcher::wrap | ( |  | ) |
| inline protected virtual

Check the Flex-compatible FlexLexer::yywrap method to determine if matcher should wrap input after EOF (lexer yywrap() should return 0 to wrap input after EOF).

Returns
  true if FlexLexer::yywrap() == 0 indicating that input is wrapped after EOF

Reimplemented from reflex::AbstractLexer< M >::Matcher.

The documentation for this class was generated from the following file:

- flexlexer.h