-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDerivesEpsilon.H
More file actions
31 lines (27 loc) · 849 Bytes
/
DerivesEpsilon.H
File metadata and controls
31 lines (27 loc) · 849 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/****************************************************************
DerivesEpsilon.H
Copyright (C)2013 William H. Majoros (martiandna@gmail.com).
This is OPEN SOURCE SOFTWARE governed by the Gnu General Public
License (GPL) version 3, as described at www.opensource.org.
****************************************************************/
#ifndef INCL_DerivesEpsilon_H
#define INCL_DerivesEpsilon_H
#include <iostream>
#include "SCFG.H"
#include "ProductionSet.H"
using namespace std;
using namespace BOOM;
class DerivesEpsilon {
HashMap<GrammarSymbol,float> *table;
SCFG &G;
GrammarAlphabet &nonterminals;
ProductionSet &productions;
void init();
float iterate();
public:
DerivesEpsilon(SCFG &,float tolerance=1e-8);
virtual ~DerivesEpsilon(); // deletes table!!!!
float operator[](GrammarSymbol *);
void dump();
};
#endif