libsapling  0.8.0
Functions
first.h File Reference

Implementation of the computation of the first 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_first_set (grammar_t g, int symbol)
 Computes the first set of a grammar symbol. More...
 

Detailed Description

Implementation of the computation of the first set.

Function Documentation

◆ compute_first_set()

node_t* compute_first_set ( grammar_t  g,
int  symbol 
)

Computes the first set of a grammar symbol.

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