LL1Checker 3.0
“Tool for verifying LL(1) grammars and validating input strings.”
Loading...
Searching...
No Matches
Lex::Add Struct Reference

Functor for adding tokens to the token list during tokenization. More...

#include <lexer.hpp>

Public Types

typedef bool result_type
 

Public Member Functions

template<typename Token>
bool operator() (Token const &t, std::vector< std::string > &tks) const
 

Detailed Description

Functor for adding tokens to the token list during tokenization.

This struct is a functor that processes tokens generated by the lexer and adds them to a list of tokens (tks). It is used as a callback during the tokenization process.

The operator() method performs the following steps:

  1. Checks if the token ID matches a special token (e.g., whitespace) that should be ignored.
  2. If the token is not ignored, adds the corresponding token type (from symbol_table::token_types_r_) to the token list.
See also
symbol_table::token_types_r_

The documentation for this struct was generated from the following files: