restore the sharing of sequences. Shrinks the grammar by ~45%

This commit is contained in:
Krasimir Angelov committed 2022-01-08 19:49:42 +01:00
1 parent cd2c6aa32a
commit 00f857559d
31 files changed
+882 -353

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
#ifndef PHRASETABLE_H
#define PHRASETABLE_H
class PgfSequence;
class PgfSequenceItor;
typedef ref<Node<PgfSequence>> PgfPhrasetable;
PGF_INTERNAL_DECL
PgfPhrasetable phrasetable_internalize(PgfPhrasetable table, ref<PgfSequence> *seq);
PGF_INTERNAL_DECL
ref<PgfSequence> phrasetable_get(PgfPhrasetable table, size_t seq_id);
PGF_INTERNAL_DECL
void phrasetable_iter(PgfPhrasetable table, PgfSequenceItor* itor, size_t *p_next_id, PgfExn *err);
PGF_INTERNAL_DECL
void phrasetable_release(PgfPhrasetable table);
#endif