diff options
author | Adrian Thurston <thurston@complang.org> | 2009-09-16 01:04:47 +0000 |
---|---|---|
committer | Adrian Thurston <thurston@complang.org> | 2009-09-16 01:04:47 +0000 |
commit | 4635eab7f9507ab34d6f14325a92be873ce3dfde (patch) | |
tree | 571dd280a48c25eb78a9a5a741319b1c7a5454bd /colm/ctinput.cpp | |
parent | 95a4a96137ace4e7c12eddba6abb1a4b39cd47e6 (diff) | |
download | colm-4635eab7f9507ab34d6f14325a92be873ce3dfde.tar.gz |
Completely removed dependence on Aapl includes in the runtime library.
Diffstat (limited to 'colm/ctinput.cpp')
-rw-r--r-- | colm/ctinput.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/colm/ctinput.cpp b/colm/ctinput.cpp index 4c7de97b..9c24b301 100644 --- a/colm/ctinput.cpp +++ b/colm/ctinput.cpp @@ -269,5 +269,30 @@ void InputStreamRepl::pushBackNamed() offset = replItem->data.length(); } +void send_named_lang_el( Tree **sp, InputStream *inputStream, FsmRun *fsmRun, PdaRun *parser ) +{ + /* All three set by getLangEl. */ + long bindId; + char *data; + long length; + + KlangEl *klangEl = inputStream->getLangEl( bindId, data, length ); + if ( klangEl->termDup != 0 ) + klangEl = klangEl->termDup; + + #ifdef COLM_LOG_PARSE + if ( colm_log_parse ) { + cerr << "named langEl: " << parser->tables->rtd->lelInfo[klangEl->id].name << endl; + } + #endif + + /* Copy the token data. */ + Head *tokdata = 0; + if ( data != 0 ) + tokdata = string_alloc_new( fsmRun->prg, data, length ); + + Kid *input = make_token( fsmRun, parser, klangEl->id, tokdata, true, bindId ); + send_handle_error( sp, inputStream, fsmRun, parser, input ); +} |