• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revision130519fe65a1ca30febaf958c841c56e7e714dae (tree)
Zeit2018-11-16 23:33:51
Autordhrname <dhrname@user...>
Commiterdhrname

Log Message

Modify the ST_parse function

Ändern Zusammenfassung

Diff

--- a/source_code/shadowstar.c
+++ b/source_code/shadowstar.c
@@ -474,9 +474,6 @@ ST_Node ST_parse(ST_Token_Mode *array, size_t length, ST_Ordered_Pair *list)
474474
475475 /*変数seqが空ノードに初期化されるので、この変数にキャッシュしておく*/
476476 ST_Node seq_cache = ST_createNode(ST_EMPTY_NODE);
477-
478- /*seqをルートノードの末子ノードとして初期化*/
479- seq = ST_insertBefore(seq, ST_createNode(ST_EMPTY_NODE), ST_EMPTY_NODE);
480477
481478 for (int_fast32_t i=length-1; i>=0; i--)
482479 {
Binary files a/source_code/shadowstar.o and b/source_code/shadowstar.o differ
--- a/source_code/startest.c
+++ b/source_code/startest.c
@@ -289,12 +289,12 @@ int main(int argc, char **argv)
289289 varlist = ST_tokenize(u8"aBa愛", tokens1);
290290 assert(ST_isEmptyNode(ST_parse(tokens1, length, varlist)));
291291 ST_freelist(varlist);
292- /*
292+
293293 ST_Token_Mode tokens2[7] = {0};
294294 init_token(tokens2);
295295 length = sizeof(tokens2) / sizeof(tokens2[0]);
296296 varlist = ST_tokenize(u8"(愛あ)(愛)", tokens2);
297- assert(ST_isEmpty(ST_parse(tokens2, length, varlist)));
297+ assert(ST_isEmptyNode(ST_parse(tokens2, length, varlist)));
298298 assert(ST_first(ST_second(varlist)) != ST_first(varlist));
299299 ST_freelist(varlist);
300300 init_token(tokens2);
@@ -303,14 +303,14 @@ int main(int argc, char **argv)
303303 tokens2[5] = 0;
304304 tokens2[6] = 0;
305305 varlist = ST_tokenize(u8"「愛あ」(愛)", tokens2);
306- assert(!ST_isEmpty(ST_parse(tokens2, length, varlist)));
306+ assert(!ST_isEmptyNode(ST_parse(tokens2, length, varlist)));
307307 assert(ST_first(ST_second(varlist)) == ST_first(varlist));
308308 ST_freelist(varlist);
309-
309+ /*
310310 ST_Token_Mode tokens3[12] = {0};
311311 length = sizeof(tokens3) / sizeof(tokens3[0]);
312312 varlist = ST_tokenize(u8"「愛「愛」(愛)」(愛)", tokens3);
313- assert(!ST_isEmpty(ST_parse(tokens3, length, varlist)));
313+ assert(!ST_isEmptyNode(ST_parse(tokens3, length, varlist)));
314314 assert(ST_first(ST_second(varlist)) != ST_first(varlist));
315315 assert(ST_getItem(varlist, 1) != ST_first(varlist));
316316 assert(ST_getItem(varlist, 0) == ST_first(varlist));
@@ -319,7 +319,7 @@ int main(int argc, char **argv)
319319 ST_Token_Mode tokens4[12] = {0};
320320 length = sizeof(tokens4) / sizeof(tokens4[0]);
321321 varlist = ST_tokenize(u8"「愛」(愛)「愛」(愛)", tokens4);
322- assert(!ST_isEmpty(ST_parse(tokens4, length, varlist)));
322+ assert(!ST_isEmptyNode(ST_parse(tokens4, length, varlist)));
323323 assert(ST_first(ST_second(varlist)) == ST_first(varlist));
324324 assert(ST_getItem(varlist, 2) != ST_first(varlist));
325325 assert(ST_getItem(varlist, 3) != ST_first(varlist));
@@ -330,7 +330,7 @@ int main(int argc, char **argv)
330330 ST_Token_Mode tokens5[12] = {0};
331331 length = sizeof(tokens5) / sizeof(tokens5[0]);
332332 varlist = ST_tokenize(u8"「謎」(謎)「愛」(愛)", tokens5);
333- assert(!ST_isEmpty(ST_parse(tokens5, length, varlist)));
333+ assert(!ST_isEmptyNode(ST_parse(tokens5, length, varlist)));
334334 assert(ST_first(ST_second(varlist)) == ST_first(varlist));
335335 assert(ST_getItem(varlist, 2) != ST_first(varlist));
336336 assert(ST_getItem(varlist, 3) != ST_first(varlist));
Binary files a/source_code/startest.o and b/source_code/startest.o differ