FE 0.16.1
Fast, Effecient FrontEnds
Loading...
Searching...
No Matches
parser.h File Reference
#include <concepts>
#include <algorithm>
#include <type_traits>
#include "fe/assert.h"
#include "fe/error.h"
#include "fe/format.h"
#include "fe/loc.h"
#include "fe/ring.h"
#include "fe/vector.h"
Include dependency graph for parser.h:

Go to the source code of this file.

Classes

class  fe::Parser< Tok, Tag, K, S >
 The blueprint for a recursive descent/ ascent parser using a K lookahead of Tokens. More...
class  fe::Parser< Tok, Tag, K, S >::Tracker
struct  fe::Parser< Tok, Tag, K, S >::Anchor
 One anchor; the left end opened the context, the right one is what it is still waiting for. More...
class  fe::Parser< Tok, Tag, K, S >::ScopedAnchor
 RAII helper that pushes a Parser::Anchor for its lifetime; use Parser::anchor to build one. More...
struct  fe::Parser< Tok, Tag, K, S >::Expected
 What Parser::expect was after - a Tag, or free-form markup. More...

Namespaces

namespace  fe

Concepts

concept  fe::Token
 What fe::Parser needs of its Token type: a Tag and a Loc, copied in and out of the lookahead by value.
concept  fe::Lexable
 What fe::Parser needs of its CRTP child S beyond fe::Diagnosable: the Lexer to pull Tokens from.

Class Documentation

◆ fe::Parser::Anchor

struct fe::Parser::Anchor
template<class Tok, class Tag, size_t K, class S>
struct fe::Parser< Tok, Tag, K, S >::Anchor

One anchor; the left end opened the context, the right one is what it is still waiting for.

Definition at line 167 of file parser.h.

Class Members
Tok l_tok The Token that opened the context.
Tag r_tag The closing Tag that context is waiting for.