1
0
forked from GitHub/gf-core

libpgf: a new implementation for literals which also allows custom literals. the same mechanism is now used for the metavariables

This commit is contained in:
kr.angelov
2012-03-12 14:25:51 +00:00
parent 1726995921
commit 230f309317
10 changed files with 728 additions and 311 deletions

View File

@@ -8,6 +8,7 @@
#include <pgf/data.h>
#include <pgf/parser.h>
#include <pgf/lexer.h>
#include <pgf/literals.h>
#include <pgf/linearize.h>
#include <pgf/expr.h>
#include <pgf/edsl.h>
@@ -77,6 +78,10 @@ int main(int argc, char* argv[]) {
status = EXIT_FAILURE;
goto fail_concr;
}
// Register a callback for the literal category Symbol
pgf_parser_add_literal(from_concr, gu_str_string("Symb", pool),
&pgf_nerc_literal_callback);
// Arbitrarily choose linearization index 0. Usually the initial
// categories we are interested in only have one field.