• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

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

Commit MetaInfo

Revisão58e95d8ee866ba4a8c5bd42e28e646aa05649667 (tree)
Hora2017-07-11 23:27:58
Autordhrname <dhrname@user...>
Commiterdhrname

Mensagem de Log

Add the header file

Mudança Sumário

Diff

--- a/source_code/Makefile
+++ b/source_code/Makefile
@@ -11,9 +11,9 @@ all : startest star
1111 %.o : %.c
1212 $(CC) -Wall -std=c11 $(NODEBUGMODE) -c $< -o $@
1313
14-star.o: star.c shadowstar.h
14+star.o: star.c shadowstar.h star.h
1515
16-shadowstar.o: shadowstar.c shadowstar.h
16+shadowstar.o: shadowstar.c shadowstar.h star.h
1717
1818 star: shadowstar.o star.o
1919 $(CC) -Wall -std=c11 $(NODEBUGMODE) -o ../$@ shadowstar.o star.o
--- a/source_code/shadowstar.c
+++ b/source_code/shadowstar.c
@@ -311,6 +311,7 @@ static inline bool isoutofPARENTHESES (int_fast32_t index, ST_Token_Mode *array,
311311
312312 /*alphaconvert関数
313313 * 引数から与えられたトークン配列をもとに、引数のリストのアルファ変換をする
314+ * 目的は衝突を避けるため
314315 * リストの構造体に指定された値は変更される*/
315316 static inline void alphaconvert(ST_Token_Mode *array, size_t length, ST_Ordered_Pair *list)
316317 { /*トークンモードの数値*/
@@ -382,7 +383,8 @@ static inline void alphaconvert(ST_Token_Mode *array, size_t length, ST_Ordered_
382383 /* 文法に関しては、ラムダ計算をひっくり返したものを日本語化したものを用いる
383384 * 1, λx.x y
384385 * 2, y x.xλ
385- * 3, 「ワイをエックス」(エックス)*/
386+ * 3, 「y x」(x)
387+ * 4,「ワイをエックス」(エックス)*/
386388 bool ST_parse(ST_Token_Mode *array, size_t length, ST_Ordered_Pair *list)
387389 {
388390 if (ST_isEmpty(list))
@@ -399,15 +401,10 @@ bool ST_parse(ST_Token_Mode *array, size_t length, ST_Ordered_Pair *list)
399401 * 「甲」(甲)「甲」(甲) ->α 「乙」(乙)「甲」(甲)*/
400402 alphaconvert(array, length, list);
401403
402- /*関数の引数を受容体として考える。また、関数そのものを、その受容体へ送る信号と考えて、
403- * ベータ簡約する
404- * どのような評価戦略を下すかは、受容体よりけり
405- * λxy.x y の場合
406- * 関数x(y)と考えたとき、関数xを信号、引数yを受容体とする -> (x)y
407- * λxyz.x y zの場合
408- * -> ( (x)y ) z
409- * λxyz.x (y z)の場合
410- * -> (x)(y)z*/
404+ /*甲「乙を乙に」(乙) ->β 「甲を甲に」*/
405+
406+
407+
411408
412409 return true;
413410 }
--- a/source_code/shadowstar.h
+++ b/source_code/shadowstar.h
@@ -9,15 +9,7 @@
99 #include "star.h"
1010
1111
12-/*ST_OrderdPair 構造体
13- * 順序対を作るための構造体
14- * ただし、属性fだけは操作として、next関数で使われる*/
15-struct ST_OrderedPair {
16- double first; /*対となる一番目*/
17- ST_Ordered_Pair *second; /*対となる二番目*/
18- int32_t lifepoint; /*参照カウンタ*/
19-};
20-
12+#define ST_CHAR_CODE_MAP_MAX 92
2113
2214 /*UTF8用のマップ
2315 * このマップをもとに、文字列のパターンを照合する*/
--- a/source_code/star.c
+++ b/source_code/star.c
@@ -5,7 +5,7 @@
55 *
66 */
77
8-#include "star.h"
8+#include "shadowstar.h"
99
1010 int main(void)
1111 {
--- a/source_code/star.h
+++ b/source_code/star.h
@@ -33,7 +33,11 @@ typedef struct ST_OrderedPair ST_Ordered_Pair;
3333 /*ST_OrderdPair 構造体
3434 * 順序対を作るための構造体
3535 * ただし、属性fだけは操作として、next関数で使われる*/
36-
36+struct ST_OrderedPair {
37+ double first; /*対となる一番目*/
38+ ST_Ordered_Pair *second; /*対となる二番目*/
39+ int32_t lifepoint; /*参照カウンタ*/
40+};
3741
3842 /*ST_EMPTY
3943 * 空リストを表現する構造体
@@ -119,15 +123,6 @@ typedef enum {
119123 ST_WHITESPACES_TOKEN /*空白文字類用のトークン*/
120124 } ST_Token_Mode;
121125
122-#define ST_CHAR_CODE_MAP_MAX 92
123-
124-/*UTF8用のマップ
125- * このマップをもとに、文字列のパターンを照合する*/
126-struct ST_UTF8_Char_Code;
127-
128-/*tokenizeで使われるデータ形式をまとめたもの
129- * posはtextの現在位置となる*/
130-struct ST_Text_Code;
131126
132127 /*tokenize 関数
133128 * 文字列をトークン化処理して、入力した配列にトークン番号を割り当てる。入力値はトークン化したい文章と配列*/
Binary files a/source_code/star.o and b/source_code/star.o differ