libsapling  0.8.0
Functions
follow.h File Reference

Implementation of the computation of the follow set. More...

#include "libsapling/dm/graph.h"
#include "libsapling/cc/parser/grammar.h"
#include "libsapling/cc/parser/aux/symbol_set.h"

Go to the source code of this file.

Functions

node_t * compute_follow_set (grammar_t g, int symbol)
 Computes the follow set of a nonterminal grammar symbol. More...
 

Detailed Description

Implementation of the computation of the follow set.

Function Documentation

◆ compute_follow_set()

node_t* compute_follow_set ( grammar_t  g,
int  symbol 
)

Computes the follow set of a nonterminal grammar symbol.

Returns
path (symbol set) with all the terminal symbols that are part of the follow set of the specified nonterminal symbol.
Warning
This implementation does not yet handle empty strings (ε, λ, Λ).