Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Struct template symbols

boost::parser::symbols

Synopsis

// In header: <boost/parser/parser.hpp>

template<typename T> 
struct symbols : public  {

  // public member functions
  ();
  (char  const *);
  (T > >);
  (char  const *, 
          T > >);
  void (, T);
  void ();
  void ();
  template<typename Context> 
    void (Context  const &, , T);
  template<typename Context> 
    void (Context  const &, );
  template<typename Context> void (Context  const &);
  template<typename Context> 
     (Context  const &, ) ;
  template<typename Context> 
    void (Context  const &, , T) ;
  template<typename Context> 
    void (Context  const &, ) ;
  template<typename Context> void (Context  const &) ;
};

Description

A symbols<T> represents the initial state of a symbol table parser that produces attributes of type T. The entries in the symbol table can be changed during parsing, but those mutations to not affect the symbols<T> object itself; all mutations happen to a copy of the symbol table in the parse context. For table entries that should be used during every parse, add entries via add() or operator(). For mid-parse mutations, use insert() and erase().

symbols public member functions

  1. ();
  2. (char  const * diagnostic_text);
  3. (T > > il);
  4. (char  const * diagnostic_text, 
            T > > il);
  5. void ( str, T x);

    Inserts an entry consisting of a UTF-8 string str to match, and an associated attribute x, to *this. The entry is added for use in all subsequent top-level parses. Subsequent lookups during the current top-level parse will not necessarily match str.

  6. void ( str);

    Erases the entry whose UTF-8 match string is str, from *this. The entry will no longer be available for use in all subsequent top-level parses. str will not be removed from the symbols matched in the current top-level parse.

  7. void ();

    Erases all the entries from the copy of the symbol table inside the parse context context.

  8. template<typename Context> 
      void (Context  const & context,  str, 
                                 T x);

    Inserts an entry consisting of a UTF-8 string str to match, and an associated attribute x, to *this. The entry is added for use in all subsequent top-level parses. Subsequent lookups during the current top-level parse will not necessarily match str.

  9. template<typename Context> 
      void (Context  const & context,  str);

    Erases the entry whose UTF-8 match string is str, from *this. The entry will no longer be available for use in all subsequent top-level parses. str will not be removed from the symbols matched in the current top-level parse.

  10. template<typename Context> void (Context  const & context);

    Erases all the entries from the copy of the symbol table inside the parse context context.

  11. template<typename Context> 
       (Context  const & context,  str) ;

    Uses UTF-8 string str to look up an attribute in the table during parsing, returning it as an optional reference. The lookup is done on the copy of the symbol table inside the parse context context, not *this.

  12. template<typename Context> 
      void (Context  const & context,  str, T x) ;

    Inserts an entry consisting of a UTF-8 string to match str, and an associtated attribute x, to the copy of the symbol table inside the parse context context.

  13. template<typename Context> 
      void (Context  const & context,  str) ;

    Erases the entry whose UTF-8 match string is str from the copy of the symbol table inside the parse context context.

  14. template<typename Context> void (Context  const & context) ;

    Erases all the entries from the copy of the symbol table inside the parse context context.


PrevUpHomeNext