:30 12:00 I. I VI II. III. IV. a d V. VI

Size: px
Start display at page:

Download ":30 12:00 I. I VI II. III. IV. a d V. VI"

Transcription

1 :30 12:00 I. I VI II. III. IV. a d V. VI

2 I. Backus-Naur BNF N N y N x N xy yx : yxxyxy N N x, y N (parse tree) (1) yxyyx (2) xyxyxy (3) yxxyxyy (4) yxxxyxxy N y N x N yx yx II. (wx*w)*w ( ) (L) (w xwwx)* ( ) (R) (B) (N) (1) wxwxxwxww (2) wxwwxwwww (3) wxwwxxwwx (4) wwwxxxxww III. (1) (4) C (A) (E) (1) (4) 2

3 (1) for ; : #include <stdio.h> int main(void) { int i; for (i = 0: i < 10: i++) { printf("hello!\n"); return 0; (2) #include <stdio.h> int main(void) { double *x; x = 3.14; printf("%f\n", x); return 0; (3) #include <stdio.h> int main(void) { printf("hello! \n"); return 0; (4) " #include <stdio.h> int main(void) { printf("hello!\n ); return 0; (1) (4) (A) (B) (C) (D) (E) 3

4 IV. BNF E id E ˆ E E == E E && E E > E ( E ) id 1 ˆ == && > ˆ == == && && > a ˆ b ˆ c a ˆ (b ˆ c) a && b && c (a && b) && c a == b == c a > b > c a ˆ b && c (a ˆ b) && c a && b ˆ c a && (b ˆ c) a ˆ b == c (a ˆ b) == c a == b ˆ c a == (b ˆ c) a ˆ b > c (a ˆ b) > c a > b ˆ c a > (b ˆ c) a == b && c (a == b) && c a && b == c a && (b == c) a && b > c (a && b) > c a > b && c a > (b && c) a == b > c (a == b) > c a > b == c a > (b == c) (1) (5) < > \ ˆ == && > ( ) id < < < < < < ˆ (1) > > > < > < > == < (2) > (3) < > < > && < < (4) > < > < > > < < < (5) < > < > ( < < < < < < ) > > > > > > id > > > > > > 4

5 V. BNF C begin L end I stmt II id = E ; III L L C C E E ( E ) E. id id ( E ) C, L, E begin, end, stmt, id, =, ;, (, ),. start symbol C I, II (1) L BNF L C L IV L ε V C L VI E E VII, VIII,... (2) (4) (1) L, E BNF $ (2) First(C) (3) Follow(L ) (4) Follow(E ) (5) C, L, L, I VI (6) E, E (1) BNF (VII, VIII,...) 5

6 C L L E E begin end stmt id = ; ( ). $ (7) C, L, L1, E, E1 C, E, E1 C, L, L1, E, E1 C, L, L, E, E reporterror :. 1 ASCII begin C begin BEGIN $ EOF yylex token eat token reporterror #include <stdio.h> /* printf(), EOF */ #include <stdlib.h> /* exit() */ #include <string.h> /* strcmp() */ #include <ctype.h> /* isalpha() */ /* */ #define BEGIN 257 /* begin */ #define END 258 /* end */ #define STMT 259 /* stmt */ #define ID 260 /* id */ int token; /* */ /* */ void reporterror(void); int yylex(void); void eat(int t); void C(void); void L(void); void L1(void); void E(void); void E1(void); 6

7 /* **************************************************************** */ * C, L, L1, E, E1 */ /* **************************************************************** */ /* */ void reporterror(void) { printf(" \n"); exit(0); /* */ int main() { /* main */ token = yylex(); /* */ C(); if (token == EOF) { printf("!\n"); else { reporterror(); int yylex(void) { /* */ int c; char buf[256]; do { /* */ c = getchar(); while (c == c == \t c == \n ); if (isalpha(c)) { /* */ char* ptr = buf; ungetc(c, stdin); while (1) { c = getchar(); if (!isalpha(c) &&!isdigit(c)) break; *ptr++ = c; *ptr = \0 ; ungetc(c, stdin); if (strcmp(buf, "begin") == 0) return BEGIN; if (strcmp(buf, "end") == 0) return END; if (strcmp(buf, "stmt") == 0) return STMT; if (strcmp(buf, "id") == 0) return ID; reporterror(); else { /* */ return c; /* ; */ void eat(int t) { /* token token */ if (token == t) { /* */ 7

8 token = yylex(); return; else { reporterror(); 8

9 VI. LR BNF S x I { B II B B S III ε IV LR I, II S, B {, x, (start symbol) S bison LR : bison -v LR $ x { S B 0 shift 1 shift 2 goto 3 1 reduce I 2 reduce IV goto 4 3 shift 5 4 shift 1 shift 2 shift 6 goto accept reduce II reduce III : shift s s goto s s reduce X X 9

10 ? (1) { { x x (2) { { x { x (3) { { x { x x x (1) (A). 0 { 2 B 4 x 1 (B). 0 { 2 B 4 { 2 6 x 1 (C). 0 { 2 B 4 S 7 x 1 (D). 0 { 2 B 4 { 2 B 4 6 x 1 (2) (A). 0 { 2 B 4 x 1 (B). 0 { 2 B 4 { 2 B 4 x 1 (C). 0 { 2 B 4 { 2 B 4 S 7 x 1 (D). 0 { 2 B 4 S 7 { 2 B 4 S 7 x 1 (3) (A). 0 { 2 { 2 B 4 { 2 B 4 6 (B). 0 { 2 { 2 x 1 { 2 x 1 x 1 6 (C). 0 { 2 B 4 { 2 B 4 { 2 B 4 6 (D). 0 { 2 B 4 { 2 B 4 { 2 B 4 x

11

12

13 I. Backus-Naur (1) (2) (3) (4) (3 4) II. (3 4) (1) (2) (3) (4) III. (2 4) (1) (2) (3) (4) IV. (1) (2) (3) (4) (5) (2 5) V. (3, 2, 3, 4, 3, 6, 5) E (1) E (2) { (3) { (4) {

14 (5) C L L (6) E E begin end stmt id = ; ( ). $ void C(void) { switch (token) { case BEGIN: /* */ case STMT: /* */ case ID: /* */ default: reporterror(); void E(void) { /* */ void E1(void) { /* */ (6) VI. LR (4 3) (1) (2) (3)

I. Backus-Naur BNF : N N 0 N N N N N N 0, 1 BNF N N 0 11 (parse tree) 11 (1) (2) (3) (4) II. 0(0 101)* (

I. Backus-Naur BNF : N N 0 N N N N N N 0, 1 BNF N N 0 11 (parse tree) 11 (1) (2) (3) (4) II. 0(0 101)* ( 2016 2016 07 28 10:30 12:00 I. I VI II. III. IV. a d V. VI. 80 100 60 1 I. Backus-Naur BNF : 11011 N N 0 N N 11 1001 N N N N 0, 1 BNF N N 0 11 (parse tree) 11 (1) 1100100 (2) 1111011 (3) 1110010 (4) 1001011

More information

:30 12:00 I. I VI II. III. IV. a d V. VI

:30 12:00 I. I VI II. III. IV. a d V. VI 2017 2017 08 03 10:30 12:00 I. I VI II. III. IV. a d V. VI. 80 100 60 1 I. Backus-Naur BNF X [ S ] a S S ; X X X, S [, a, ], ; BNF X (parse tree) (1) [a;a] (2) [[a]] (3) [a;[a]] (4) [[a];a] : [a] X 2 222222

More information

I. Backus-Naur BNF S + S S * S S x S +, *, x BNF S (parse tree) : * x + x x S * S x + S S S x x (1) * x x * x (2) * + x x x (3) + x * x + x x (4) * *

I. Backus-Naur BNF S + S S * S S x S +, *, x BNF S (parse tree) : * x + x x S * S x + S S S x x (1) * x x * x (2) * + x x x (3) + x * x + x x (4) * * 2015 2015 07 30 10:30 12:00 I. I VI II. III. IV. a d V. VI. 80 100 60 1 I. Backus-Naur BNF S + S S * S S x S +, *, x BNF S (parse tree) : * x + x x S * S x + S S S x x (1) * x x * x (2) * + x x x (3) +

More information

Minimum C Minimum C Minimum C BNF T okenseq W hite Any D

Minimum C Minimum C Minimum C BNF T okenseq W hite Any D 6 2019 5 14 6.1 Minimum C....................... 6 1 6.2....................................... 6 7 6.1 Minimum C Minimum C BNF T okenseq W hite Any Digit ::= 0 1 2... 9. Number ::= Digit Digit. Alphabet

More information

untitled

untitled i ii iii iv v 43 43 vi 43 vii T+1 T+2 1 viii 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 a) ( ) b) ( ) 51

More information

2

2 1 2 3 4 5 6 7 8 9 10 I II III 11 IV 12 V 13 VI VII 14 VIII. 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 _ 33 _ 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 VII 51 52 53 54 55 56 57 58 59

More information

II 3 yacc (2) 2005 : Yacc 0 ~nakai/ipp2 1 C main main 1 NULL NULL for 2 (a) Yacc 2 (b) 2 3 y

II 3 yacc (2) 2005 : Yacc 0 ~nakai/ipp2 1 C main main 1 NULL NULL for 2 (a) Yacc 2 (b) 2 3 y II 3 yacc (2) 2005 : Yacc 0 ~nakai/ipp2 1 C 1 6 9 1 main main 1 NULL NULL 1 15 23 25 48 26 30 32 36 38 43 45 47 50 52 for 2 (a) 2 2 1 Yacc 2 (b) 2 3 yytext tmp2 ("") tmp2->next->word tmp2 yytext tmp2->next->word

More information

<4D6963726F736F667420506F776572506F696E74202D208376838C835B83938365815B835683878393312E707074205B8CDD8AB78382815B83685D>

<4D6963726F736F667420506F776572506F696E74202D208376838C835B83938365815B835683878393312E707074205B8CDD8AB78382815B83685D> i i vi ii iii iv v vi vii viii ix 2 3 4 5 6 7 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

More information

SC-85X2取説

SC-85X2取説 I II III IV V VI .................. VII VIII IX X 1-1 1-2 1-3 1-4 ( ) 1-5 1-6 2-1 2-2 3-1 3-2 3-3 8 3-4 3-5 3-6 3-7 ) ) - - 3-8 3-9 4-1 4-2 4-3 4-4 4-5 4-6 5-1 5-2 5-3 5-4 5-5 5-6 5-7 5-8 5-9 5-10 5-11

More information

i ii iii iv v vi vii ( ー ー ) ( ) ( ) ( ) ( ) ー ( ) ( ) ー ー ( ) ( ) ( ) ( ) ( ) 13 202 24122783 3622316 (1) (2) (3) (4) 2483 (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) 11 11 2483 13

More information

橡Pro PDF

橡Pro PDF 1 void main( ) char c; /* int c; */ int sum=0; while ((c = getchar())!= EOF) if(isdigit(c) ) sum += (c-'0'); printf("%d\n", sum); main()int i,sum=0; for(i=0;i

More information

untitled

untitled II yacc 005 : 1, 1 1 1 %{ int lineno=0; 3 int wordno=0; 4 int charno=0; 5 6 %} 7 8 %% 9 [ \t]+ { charno+=strlen(yytext); } 10 "\n" { lineno++; charno++; } 11 [^ \t\n]+ { wordno++; charno+=strlen(yytext);}

More information

‚æ4›ñ

‚æ4›ñ ( ) ( ) ( ) A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9 (OUS) 9 26 1 / 28 ( ) ( ) ( ) A B C D Z a b c d z 0 1 2 9 (OUS) 9

More information

これわかWord2010_第1部_100710.indd

これわかWord2010_第1部_100710.indd i 1 1 2 3 6 6 7 8 10 10 11 12 12 12 13 2 15 15 16 17 17 18 19 20 20 21 ii CONTENTS 25 26 26 28 28 29 30 30 31 32 35 35 35 36 37 40 42 44 44 45 46 49 50 50 51 iii 52 52 52 53 55 56 56 57 58 58 60 60 iv

More information

パワポカバー入稿用.indd

パワポカバー入稿用.indd i 1 1 2 2 3 3 4 4 4 5 7 8 8 9 9 10 11 13 14 15 16 17 19 ii CONTENTS 2 21 21 22 25 26 32 37 38 39 39 41 41 43 43 43 44 45 46 47 47 49 52 54 56 56 iii 57 59 62 64 64 66 67 68 71 72 72 73 74 74 77 79 81 84

More information

これでわかるAccess2010

これでわかるAccess2010 i 1 1 1 2 2 2 3 4 4 5 6 7 7 9 10 11 12 13 14 15 17 ii CONTENTS 2 19 19 20 23 24 25 25 26 29 29 31 31 33 35 36 36 39 39 41 44 45 46 48 iii 50 50 52 54 55 57 57 59 61 63 64 66 66 67 70 70 73 74 74 77 77

More information

C言語によるアルゴリズムとデータ構造

C言語によるアルゴリズムとデータ構造 Algorithms and Data Structures in C 4 algorithm List - /* */ #include List - int main(void) { int a, b, c; int max; /* */ Ÿ 3Ÿ 2Ÿ 3 printf(""); printf(""); printf(""); scanf("%d", &a); scanf("%d",

More information

平成18年版 男女共同参画白書

平成18年版 男女共同参画白書 i ii iii iv v vi vii viii ix 3 4 5 6 7 8 9 Column 10 11 12 13 14 15 Column 16 17 18 19 20 21 22 23 24 25 26 Column 27 28 29 30 Column 31 32 33 34 35 36 Column 37 Column 38 39 40 Column 41 42 43 44 45

More information

III

III III 1 1 2 1 2 3 1 3 4 1 3 1 4 1 3 2 4 1 3 3 6 1 4 6 1 4 1 6 1 4 2 8 1 4 3 9 1 5 10 1 5 1 10 1 5 2 12 1 5 3 12 1 5 4 13 1 6 15 2 1 18 2 1 1 18 2 1 2 19 2 2 20 2 3 22 2 3 1 22 2 3 2 24 2 4 25 2 4 1 25 2

More information

iii iv v vi vii viii ix 1 1-1 1-2 1-3 2 2-1 3 3-1 3-2 3-3 3-4 4 4-1 4-2 5 5-1 5-2 5-3 5-4 5-5 5-6 5-7 6 6-1 6-2 6-3 6-4 6-5 6 6-1 6-2 6-3 6-4 6-5 7 7-1 7-2 7-3 7-4 7-5 7-6 7-7 7-8 7-9 7-10 7-11 8 8-1

More information

C による数値計算法入門 ( 第 2 版 ) 新装版 サンプルページ この本の定価 判型などは, 以下の URL からご覧いただけます. このサンプルページの内容は, 新装版 1 刷発行時のものです.

C による数値計算法入門 ( 第 2 版 ) 新装版 サンプルページ この本の定価 判型などは, 以下の URL からご覧いただけます.  このサンプルページの内容は, 新装版 1 刷発行時のものです. C による数値計算法入門 ( 第 2 版 ) 新装版 サンプルページ この本の定価 判型などは, 以下の URL からご覧いただけます. http://www.morikita.co.jp/books/mid/009383 このサンプルページの内容は, 新装版 1 刷発行時のものです. i 2 22 2 13 ( ) 2 (1) ANSI (2) 2 (3) Web http://www.morikita.co.jp/books/mid/009383

More information

PowerPoint Presentation

PowerPoint Presentation p.130 p.198 p.208 2 double weight[num]; double min, max; min = max = weight[0]; for( i= 1; i i < NUM; i++ ) ) if if ( weight[i] > max ) max = weight[i]: if if ( weight[i] < min ) min = weight[i]: weight

More information

エクセルカバー入稿用.indd

エクセルカバー入稿用.indd i 1 1 2 3 5 5 6 7 7 8 9 9 10 11 11 11 12 2 13 13 14 15 15 16 17 17 ii CONTENTS 18 18 21 22 22 24 25 26 27 27 28 29 30 31 32 36 37 40 40 42 43 44 44 46 47 48 iii 48 50 51 52 54 55 59 61 62 64 65 66 67 68

More information

i

i 14 i ii iii iv v vi 14 13 86 13 12 28 14 16 14 15 31 (1) 13 12 28 20 (2) (3) 2 (4) (5) 14 14 50 48 3 11 11 22 14 15 10 14 20 21 20 (1) 14 (2) 14 4 (3) (4) (5) 12 12 (6) 14 15 5 6 7 8 9 10 7

More information

lexex.dvi

lexex.dvi (2018, c ) http://istksckwanseiacjp/ ishiura/cpl/ 4 41 1 mini-c lexc,, 2 testlexc, lexc mini-c 1 ( ) mini-c ( ) (int, char, if, else, while, return 6 ) ( ) (+, -, *, /, %, &, =, ==,!=, >, >=,

More information

PC Windows 95, Windows 98, Windows NT, Windows 2000, MS-DOS, UNIX CPU

PC Windows 95, Windows 98, Windows NT, Windows 2000, MS-DOS, UNIX CPU 1. 1.1. 1.2. 1 PC Windows 95, Windows 98, Windows NT, Windows 2000, MS-DOS, UNIX CPU 2. 2.1. 2 1 2 C a b N: PC BC c 3C ac b 3 4 a F7 b Y c 6 5 a ctrl+f5) 4 2.2. main 2.3. main 2.4. 3 4 5 6 7 printf printf

More information

01_.g.r..

01_.g.r.. I II III IV V VI VII VIII IX X XI I II III IV V I I I II II II I I YS-1 I YS-2 I YS-3 I YS-4 I YS-5 I YS-6 I YS-7 II II YS-1 II YS-2 II YS-3 II YS-4 II YS-5 II YS-6 II YS-7 III III YS-1 III YS-2

More information

untitled

untitled I...1 II...2...2 III...3...3...7 IV...15...15...20 V...23...23...24...25 VI...31...31...32...33...40...47 VII...62...62...67 VIII...70 1 2 3 4 m 3 m 3 m 3 m 3 m 3 m 3 5 6 () 17 18 7 () 17 () 17 8 9 ()

More information

ii iii iv CON T E N T S iii iv v Chapter1 Chapter2 Chapter 1 002 1.1 004 1.2 004 1.2.1 007 1.2.2 009 1.3 009 1.3.1 010 1.3.2 012 1.4 012 1.4.1 014 1.4.2 015 1.5 Chapter3 Chapter4 Chapter5 Chapter6 Chapter7

More information

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 () - 1 - - 2 - - 3 - - 4 - - 5 - 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57

More information

/* do-while */ #include <stdio.h> #include <math.h> int main(void) double val1, val2, arith_mean, geo_mean; printf( \n ); do printf( ); scanf( %lf, &v

/* do-while */ #include <stdio.h> #include <math.h> int main(void) double val1, val2, arith_mean, geo_mean; printf( \n ); do printf( ); scanf( %lf, &v 1 http://www7.bpe.es.osaka-u.ac.jp/~kota/classes/jse.html kota@fbs.osaka-u.ac.jp /* do-while */ #include #include int main(void) double val1, val2, arith_mean, geo_mean; printf( \n );

More information

3 5 18 3 5000 1 2 7 8 120 1 9 1954 29 18 12 30 700 4km 1.5 100 50 6 13 5 99 93 34 17 2 2002 04 14 16 6000 12 57 60 1986 55 3 3 3 500 350 4 5 250 18 19 1590 1591 250 100 500 20 800 20 55 3 3 3 18 19 1590

More information

活用ガイド (ソフトウェア編)

活用ガイド (ソフトウェア編) (Windows 95 ) ii iii iv NEC Corporation 1999 v P A R T 1 vi P A R T 2 vii P A R T 3 P A R T 4 viii P A R T 5 ix x P A R T 1 2 3 1 1 2 4 1 2 3 4 5 1 1 2 3 4 6 5 6 7 7 1 1 2 8 1 9 1 1 2 3 4 5 6 1 2 3 4

More information

困ったときのQ&A

困ったときのQ&A ii iii iv NEC Corporation 1997 v P A R T 1 vi vii P A R T 2 viii P A R T 3 ix x xi 1P A R T 2 1 3 4 1 5 6 1 7 8 1 9 1 2 3 4 10 1 11 12 1 13 14 1 1 2 15 16 1 2 1 1 2 3 4 5 17 18 1 2 3 1 19 20 1 21 22 1

More information

ohp03.dvi

ohp03.dvi 19 3 ( ) 2019.4.20 CS 1 (comand line arguments) Unix./a.out aa bbb ccc ( ) C main void int main(int argc, char *argv[]) {... 2 (2) argc argv argc ( ) argv (C char ) ( 1) argc 4 argv NULL. / a. o u t \0

More information

入門ガイド

入門ガイド ii iii iv NEC Corporation 1998 v P A R 1 P A R 2 P A R 3 T T T vi P A R T 4 P A R T 5 P A R T 6 P A R T 7 vii 1P A R T 1 2 2 1 3 1 4 1 1 5 2 3 6 4 1 7 1 2 3 8 1 1 2 3 9 1 2 10 1 1 2 11 3 12 1 2 1 3 4 13

More information

新・明解C言語 ポインタ完全攻略

新・明解C言語 ポインタ完全攻略 2 1-1 1-1 /* 1-1 */ 1 int n = 100; int *p = &n; printf(" n %d\n", n); /* n int */ printf("*&n %d\n", *&n); /* *&n int */ printf(" p %p\n", p); /* p int * */ printf("&*p %p\n", &*p); /* &*p int * */ printf("sizeof(n)

More information

Microsoft Word - Cプログラミング演習(8)

Microsoft Word - Cプログラミング演習(8) 第 8 回 (6/11) プログラミングスタイルなど [1] 名前のつけかた グローバル変数にはわかりやすい名前を, ローカル変数には短い名前を 関連性のあるものには関連性のある名前をつけて, 統一しよう 関数には能動的な名前を 名前は的確に 例題 1 次のコードの名前と値の選び方についてコメントせよ? #define TRUE 0? #define FALSE 1?? if ((ch = getchar())

More information

プログラミング基礎

プログラミング基礎 C プログラミング Ⅰ 条件分岐 if~else if~else 文,switch 文 条件分岐 if~else if~else 文 if~else if~else 文 複数の条件で処理を分ける if~else if~else 文の書式 if( 条件式 1){ 文 1-1; 文 1-2; else if( 条件式 2){ 文 2-1; 文 2-2; else { 文 3-1; 文 3-2; 真条件式

More information

I ASCII ( ) NUL 16 DLE SP P p 1 SOH 17 DC1! 1 A Q a q STX 2 18 DC2 " 2 B R b

I ASCII ( ) NUL 16 DLE SP P p 1 SOH 17 DC1! 1 A Q a q STX 2 18 DC2  2 B R b I 4 003 4 30 1 ASCII ( ) 0 17 0 NUL 16 DLE SP 0 @ P 3 48 64 80 96 11 p 1 SOH 17 DC1! 1 A Q a 33 49 65 81 97 113 q STX 18 DC " B R b 34 50 66 8 98 114 r 3 ETX 19 DC3 # 3 C S c 35 51 67 83 99 115 s 4 EOT

More information

活用ガイド (ソフトウェア編)

活用ガイド (ソフトウェア編) (Windows 98 ) ii iii iv v NEC Corporation 1999 vi P A R T 1 P A R T 2 vii P A R T 3 viii P A R T 4 ix P A R T 5 x P A R T 1 2 3 1 1 2 4 1 2 3 4 5 1 1 2 3 4 5 6 6 7 7 1 1 2 8 1 9 1 1 2 3 4 5 6 1 2 3 10

More information

untitled

untitled II 4 Yacc Lex 2005 : 0 1 Yacc 20 Lex 1 20 traverse 1 %% 2 [0-9]+ { yylval.val = atoi((char*)yytext); return NUM; 3 "+" { return + ; 4 "*" { return * ; 5 "-" { return - ; 6 "/" { return / ; 7 [ \t] { /*

More information

i

i i ii iii iv v vi vii viii ix x xi ( ) 854.3 700.9 10 200 3,126.9 162.3 100.6 18.3 26.5 5.6/s ( ) ( ) 1949 8 12 () () ア イ ウ ) ) () () () () BC () () (

More information

untitled

untitled 23 12 10 12:55 ~ 18:45 KKR Tel0557-85-2000 FAX0557-85-6604 12:55~13:00 13:00~13:38 I 1) 13:00~13:12 2) 13:13~13:25 3) 13:26~13:38 13:39~14:17 II 4) 13:39~13:51 5) 13:52 ~ 14:04 6) 14:05 ~ 14:17 14:18 ~

More information

tuat1.dvi

tuat1.dvi ( 1 ) http://ist.ksc.kwansei.ac.jp/ tutimura/ 2012 6 23 ( 1 ) 1 / 58 C ( 1 ) 2 / 58 2008 9 2002 2005 T E X ptetex3, ptexlive pt E X UTF-8 xdvi-jp 3 ( 1 ) 3 / 58 ( 1 ) 4 / 58 C,... ( 1 ) 5 / 58 6/23( )

More information

‚æ2›ñ C„¾„ê‡Ìš|

‚æ2›ñ C„¾„ê‡Ìš| I 8 10 10 I ( 6 ) 10 10 1 / 23 1 C ( ) getchar(), gets(), scanf() ( ) putchar(), puts(), printf() 1 getchar(), putchar() 1 I ( 6 ) 10 10 2 / 23 1 (getchar 1 1) 1 #include 2 void main(void){ 3 int

More information

r03.dvi

r03.dvi 19 ( ) 019.4.0 CS 1 (comand line arguments) Unix./a.out aa bbb ccc ( ) C main void... argc argv argc ( ) argv (C char ) ( 1) argc 4 argv NULL. / a. o u t \0 a a \0 b b b \0 c c c \0 1: // argdemo1.c ---

More information

活用ガイド (ソフトウェア編)

活用ガイド (ソフトウェア編) ii iii iv NEC Corporation 1998 v vi PA RT 1 vii PA RT 2 viii PA RT 3 PA RT 4 ix P A R T 1 2 3 1 4 5 1 1 2 1 2 3 4 6 1 2 3 4 5 7 1 6 7 8 1 9 1 10 1 2 3 4 5 6 7 8 9 10 11 11 1 12 12 1 13 1 1 14 2 3 4 5 1

More information

パソコン機能ガイド

パソコン機能ガイド PART12 ii iii iv v 1 2 3 4 5 vi vii viii ix P A R T 1 x P A R T 2 xi P A R T 3 xii xiii P A R T 1 2 3 1 4 5 1 6 1 1 2 7 1 2 8 1 9 10 1 11 12 1 13 1 2 3 4 14 1 15 1 2 3 16 4 1 1 2 3 17 18 1 19 20 1 1

More information

パソコン機能ガイド

パソコン機能ガイド PART2 iii ii iv v 1 2 3 4 5 vi vii viii ix P A R T 1 x P A R T 2 xi P A R T 3 xii xiii P A R T 1 2 1 3 4 1 5 6 1 2 1 1 2 7 8 9 1 10 1 11 12 1 13 1 2 3 14 4 1 1 2 3 15 16 1 17 1 18 1 1 2 19 20 1 21 1 22

More information

卒 業 研 究 報 告.PDF

卒 業 研 究 報 告.PDF C 13 2 9 1 1-1. 1-2. 2 2-1. 2-2. 2-3. 2-4. 3 3-1. 3-2. 3-3. 3-4. 3-5. 3-5-1. 3-5-2. 3-6. 3-6-1. 3-6-2. 4 5 6 7-1 - 1 1 1-1. 1-2. ++ Lisp Pascal Java Purl HTML Windows - 2-2 2 2-1. 1972 D.M. (Dennis M Ritchie)

More information

() / (front end) (back end) (phase) (pass) 1 2

() / (front end) (back end) (phase) (pass) 1 2 1 () () lex http://www.cs.info.mie-u.ac.jp/~toshi/lectures/compiler/ 2018 4 1 () / (front end) (back end) (phase) (pass) 1 2 () () var left, right; fun int main() { left = 0; right = 10; return ((left

More information

1... 1 2... 1 1... 1 2... 2 3... 2 4... 4 5... 4 6... 4 7... 22 8... 22 3... 22 1... 22 2... 23 3... 23 4... 24 5... 24 6... 25 7... 31 8... 32 9... 3

1... 1 2... 1 1... 1 2... 2 3... 2 4... 4 5... 4 6... 4 7... 22 8... 22 3... 22 1... 22 2... 23 3... 23 4... 24 5... 24 6... 25 7... 31 8... 32 9... 3 3 2620149 3 6 3 2 198812 21/ 198812 21 1 3 4 5 JISJIS X 0208 : 1997 JIS 4 JIS X 0213:2004 http://www.pref.hiroshima.lg.jp/site/monjokan/ 1... 1 2... 1 1... 1 2... 2 3... 2 4... 4 5... 4 6... 4 7... 22

More information

r07.dvi

r07.dvi 19 7 ( ) 2019.4.20 1 1.1 (data structure ( (dynamic data structure 1 malloc C free C (garbage collection GC C GC(conservative GC 2 1.2 data next p 3 5 7 9 p 3 5 7 9 p 3 5 7 9 1 1: (single linked list 1

More information

() () (parse tree) ( (( ) * 50) ) ( ( NUM 10 + NUM 30 ) * NUM 50 ) ( * ) ( + ) NUM 50 NUM NUM (abstract syntax tree, AST) ( (( ) * 5

() () (parse tree) ( (( ) * 50) ) ( ( NUM 10 + NUM 30 ) * NUM 50 ) ( * ) ( + ) NUM 50 NUM NUM (abstract syntax tree, AST) ( (( ) * 5 3 lex yacc http://www.cs.info.mie-u.ac.jp/~toshi/lectures/compiler/ 2018 6 1 () () (parse tree) ( ((10 + 30) * 50) ) ( ( NUM 10 + NUM 30 ) * NUM 50 ) ( * ) ( + ) NUM 50 NUM NUM 10 30 (abstract syntax tree,

More information

262014 3 1 1 6 3 2 198810 2/ 198810 2 1 3 4 http://www.pref.hiroshima.lg.jp/site/monjokan/ 1... 1... 1... 2... 2... 4... 5... 9... 9... 10... 10... 10... 10... 13 2... 13 3... 15... 15... 15... 16 4...

More information

ohp07.dvi

ohp07.dvi 19 7 ( ) 2019.4.20 1 (data structure) ( ) (dynamic data structure) 1 malloc C free 1 (static data structure) 2 (2) C (garbage collection GC) C GC(conservative GC) 2 2 conservative GC 3 data next p 3 5

More information

18 C ( ) hello world.c 1 #include <stdio.h> 2 3 main() 4 { 5 printf("hello World\n"); 6 } [ ] [ ] #include <stdio.h> % cc hello_world.c %./a.o

18 C ( ) hello world.c 1 #include <stdio.h> 2 3 main() 4 { 5 printf(hello World\n); 6 } [ ] [ ] #include <stdio.h> % cc hello_world.c %./a.o 18 C ( ) 1 1 1.1 hello world.c 5 printf("hello World\n"); 6 } [ ] [ ] #include % cc hello_world.c %./a.out Hello World [a.out ] % cc hello_world.c -o hello_world [ ( ) ] (K&R 4.1.1) #include

More information

長崎県地域防災計画

長崎県地域防災計画 i ii iii iv v vi vii viii ix - 1 - - 2 - - 3 - - 4 - - 5 - - 6 - - 7 - - 8 - - 9 - 玢 - 10 - - 11 - - 12 - - 13 - - 14 - - 15 - - 16 - - 17 - - 18 - - 19 - - 20 - - 21 - - 22 - - 23 - - 24 - - 25 - -

More information

ONLINE_MANUAL

ONLINE_MANUAL JPN ii iii iv v 6 vi vii viii 1 CHAPTER 1-1 1 2 1-2 1 2 3 4 5 1-3 6 7 1-4 2 CHAPTER 2-1 2-2 2-3 1 2 3 4 5 2-4 6 7 8 2-5 9 10 2-6 11 2-7 1 2 2-8 3 (A) 4 5 6 2-9 1 2-10 2 3 2-11 4 5 2-12 1 2 2-13 3 4 5

More information

ONLINE_MANUAL

ONLINE_MANUAL JPN ii iii iv v vi 6 vii viii 1 CHAPTER 1-1 1 2 1-2 1 2 3 1-3 4 5 6 7 1-4 2 CHAPTER 2-1 2-2 2-3 1 2 3 4 5 2-4 6 7 8 2-5 9 10 2-6 11 2-7 1 2 2-8 3 (A) 4 5 6 2-9 1 2-10 2 3 2-11 4 5 2-12 1 2 2-13 3 4 5

More information

1... 1... 1... 3 2... 4... 4... 4... 4... 4... 6... 10... 11... 15... 30

1... 1... 1... 3 2... 4... 4... 4... 4... 4... 6... 10... 11... 15... 30 1 2420128 1 6 3 2 199103 189/1 1991031891 3 4 5 JISJIS X 0208, 1997 1 http://www.pref.hiroshima.lg.jp/site/monjokan/ 1... 1... 1... 3 2... 4... 4... 4... 4... 4... 6... 10... 11... 15... 30 1 3 5 7 6 7

More information

£Ã¥×¥í¥°¥é¥ß¥ó¥°ÆþÌç (2018) - Â裵²ó ¨¡ À©¸æ¹½Â¤¡§¾ò·ïʬ´ô ¨¡

£Ã¥×¥í¥°¥é¥ß¥ó¥°ÆþÌç (2018) - Â裵²ó  ¨¡ À©¸æ¹½Â¤¡§¾ò·ïʬ´ô ¨¡ (2018) 2018 5 17 0 0 if switch if if ( ) if ( 0) if ( ) if ( 0) if ( ) (0) if ( 0) if ( ) (0) ( ) ; if else if ( ) 1 else 2 if else ( 0) 1 if ( ) 1 else 2 if else ( 0) 1 if ( ) 1 else 2 (0) 2 if else

More information

Microsoft Word - C.....u.K...doc

Microsoft Word - C.....u.K...doc C uwêííôöðöõ Ð C ÔÖÐÖÕ ÐÊÉÌÊ C ÔÖÐÖÕÊ C ÔÖÐÖÕÊ Ç Ê Æ ~ if eíè ~ for ÒÑÒ ÌÆÊÉÉÊ ~ switch ÉeÍÈ ~ while ÒÑÒ ÊÍÍÔÖÐÖÕÊ ~ 1 C ÔÖÐÖÕ ÐÊÉÌÊ uê~ ÏÒÏÑ Ð ÓÏÖ CUI Ô ÑÊ ÏÒÏÑ ÔÖÐÖÕÎ d ÈÍÉÇÊ ÆÒ Ö ÒÐÑÒ ÊÔÎÏÖÎ d ÉÇÍÊ

More information

178 5 I 1 ( ) ( ) 10 3 13 3 1 8891 8 3023 6317 ( 10 1914 7152 ) 16 5 1 ( ) 6 13 3 13 3 8575 3896 8 1715 779 6 (1) 2 7 4 ( 2 ) 13 11 26 12 21 14 11 21

178 5 I 1 ( ) ( ) 10 3 13 3 1 8891 8 3023 6317 ( 10 1914 7152 ) 16 5 1 ( ) 6 13 3 13 3 8575 3896 8 1715 779 6 (1) 2 7 4 ( 2 ) 13 11 26 12 21 14 11 21 I 178 II 180 III ( ) 181 IV 183 V 185 VI 186 178 5 I 1 ( ) ( ) 10 3 13 3 1 8891 8 3023 6317 ( 10 1914 7152 ) 16 5 1 ( ) 6 13 3 13 3 8575 3896 8 1715 779 6 (1) 2 7 4 ( 2 ) 13 11 26 12 21 14 11 21 4 10 (

More information

1... 1 2... 3 3... 5 1... 5 2... 6 4... 7 1... 7 2... 9 3... 9 6... 9 7... 11 8... 11 5... 7

1... 1 2... 3 3... 5 1... 5 2... 6 4... 7 1... 7 2... 9 3... 9 6... 9 7... 11 8... 11 5... 7 3 2620149 1 3 6 3 2 198829 198829 19/2 19 2 3 4 5 JISJIS X 0208 : 1997 1 http://www.pref.hiroshima.lg.jp/site/monjokan/ 1... 1 2... 3 3... 5 1... 5 2... 6 4... 7 1... 7 2... 9 3... 9 6... 9 7... 11 8...

More information

44 4 I (1) ( ) (10 15 ) ( 17 ) ( 3 1 ) (2)

44 4 I (1) ( ) (10 15 ) ( 17 ) ( 3 1 ) (2) (1) I 44 II 45 III 47 IV 52 44 4 I (1) ( ) 1945 8 9 (10 15 ) ( 17 ) ( 3 1 ) (2) 45 II 1 (3) 511 ( 451 1 ) ( ) 365 1 2 512 1 2 365 1 2 363 2 ( ) 3 ( ) ( 451 2 ( 314 1 ) ( 339 1 4 ) 337 2 3 ) 363 (4) 46

More information

i ii i iii iv 1 3 3 10 14 17 17 18 22 23 28 29 31 36 37 39 40 43 48 59 70 75 75 77 90 95 102 107 109 110 118 125 128 130 132 134 48 43 43 51 52 61 61 64 62 124 70 58 3 10 17 29 78 82 85 102 95 109 iii

More information

void hash1_init(int *array) int i; for (i = 0; i < HASHSIZE; i++) array[i] = EMPTY; /* i EMPTY */ void hash1_insert(int *array, int n) if (n < 0 n >=

void hash1_init(int *array) int i; for (i = 0; i < HASHSIZE; i++) array[i] = EMPTY; /* i EMPTY */ void hash1_insert(int *array, int n) if (n < 0 n >= II 14 2018 7 26 : : proen@mm.ics.saitama-u.ac.jp 14,, 8 2 12:00 1 O(1) n O(n) O(log n) O(1) 32 : 1G int 4 250 M 2.5 int 21 2 0 100 0 100 #include #define HASHSIZE 100 /* */ #define NOTFOUND 0

More information

™…

™… i 1 1 1 2 3 5 5 6 7 9 10 11 13 13 14 15 15 16 17 18 20 20 20 21 22 ii CONTENTS 23 24 26 27 2 31 31 32 32 33 34 37 37 38 39 39 40 42 42 43 44 45 48 50 51 51 iii 54 57 58 60 60 62 64 64 67 69 70 iv 70 71

More information

ex14.dvi

ex14.dvi 1,, 0, b (b b 2 b ) n k n = n j b j, (0 n j b 1), n =(n k n k 1...n 1 n 0 ) b, n j j j +1, 0,...,b 1 (digit). b b, n b 1 ñ, ñ = k (b 1 n j )b j b N, n b n, n = b N n, n =ñ+1 b N, n m n + m (mod b N ),

More information

2620149 3 8 2 198802 492/ 198802 492 1 4 5 JISJIS X 0208 : 1997 JIS JIS X 0213:2004 http://www.pref.hiroshima.lg.jp/site/monjokan/ 1... 1 1... 1 2... 2 3... 2 4... 2 5... 3 6... 3 7... 4 8... 4 2... 4

More information

1 1.1 C 2 1 double a[ ][ ]; 1 3x x3 ( ) malloc() 2 double *a[ ]; double 1 malloc() dou

1 1.1 C 2 1 double a[ ][ ]; 1 3x x3 ( ) malloc() 2 double *a[ ]; double 1 malloc() dou 1 1.1 C 2 1 double a[ ][ ]; 1 3x3 0 1 3x3 ( ) 0.240 0.143 0.339 0.191 0.341 0.477 0.412 0.003 0.921 1.2 malloc() 2 double *a[ ]; double 1 malloc() double 1 malloc() free() 3 #include #include

More information

活用ガイド (ハードウェア編)

活用ガイド (ハードウェア編) (Windows 98) 808-877675-122-A ii iii iv NEC Corporation 1999 v vi PART 1 vii viii PART 2 PART 3 ix x xi xii P A R T 1 2 1 3 4 1 5 6 1 7 8 1 9 10 11 1 12 1 1 2 3 13 1 2 3 14 4 5 1 15 1 1 16 1 17 18 1 19

More information

C B

C B C 095707B 2010 6 8 1 LEVE1 2 1.1 LEVEL 1.1................................................ 2 1.1.1 1................................................ 2 1.1.2 1.2..............................................

More information

PowerPoint プレゼンテーション

PowerPoint プレゼンテーション プログラミング初級 第 13 回 2017 年 7 月 10 日 標準ライブラリ関数 1 標準ライブラリ関数とは 関数には (1) 自分で作る関数 (2) はじめから用意されている関数特に C 言語用用意されているもの : 標準ライブラリ関数 文字列の代入文字列の長さを求める文字列の比較文字列の連結 strcpy strlen strcmp strcat 2 文字列の操作 - 具体例を通して (141

More information

(ver. 1.3 (2018) ) yacc 1 1 yacc yacc (Yet Another Compiler Compiler) UNIX yacc yacc y *.y yacc ) yacc *.tab.h *.tab.c C C yacc yacc UNIX yacc bison 2

(ver. 1.3 (2018) ) yacc 1 1 yacc yacc (Yet Another Compiler Compiler) UNIX yacc yacc y *.y yacc ) yacc *.tab.h *.tab.c C C yacc yacc UNIX yacc bison 2 (ver. 1.3 (2018) ) yacc 1 1 yacc yacc (Yet Another Compiler Compiler) UNIX yacc yacc y *.y yacc ) yacc *.tab.h *.tab.c C C yacc yacc UNIX yacc bison 2 yacc yacc lex %token yacc yacc token *.tab.h #define

More information

C¥×¥í¥°¥é¥ß¥ó¥° ÆþÌç

C¥×¥í¥°¥é¥ß¥ó¥° ÆþÌç C (3) if else switch AND && OR (NOT)! 1 BMI BMI BMI = 10 4 [kg]) ( [cm]) 2 bmi1.c Input your height[cm]: 173.2 Enter Input your weight[kg]: 60.3 Enter Your BMI is 20.1. 10 4 = 10000.0 1 BMI BMI BMI = 10

More information

i ii iii iv v vi vii viii ix x - 1 - - 2 - - 3 - - 4 - - 5 - - 6 - - 7 - - 8 - - 9 - - 10 - - 11 - - 12 - - 13 - - 14 - - 15 - - 16 - - 17 - - 18 - - 19 - - 20 - - 21 - - 22 - - 23 - - 24 - - 25 - -

More information

1... 1 1... 1 2... 1 3... 1 4... 4 5... 7 6... 7 7... 12 8... 12 9... 13 10... 13 11... 13 12... 14 2... 14 1... 14 2... 16 3... 18 4... 19 5... 19 6.

1... 1 1... 1 2... 1 3... 1 4... 4 5... 7 6... 7 7... 12 8... 12 9... 13 10... 13 11... 13 12... 14 2... 14 1... 14 2... 16 3... 18 4... 19 5... 19 6. 3 2620149 1 3 8 3 2 198809 1/1 198809 1 1 3 4 5 JISJIS X 0208 : 1997 JIS 4 JIS X 0213:2004 http://www.pref.hiroshima.lg.jp/site/monjokan/ 1... 1 1... 1 2... 1 3... 1 4... 4 5... 7 6... 7 7... 12 8... 12

More information

A/B (2018/06/08) Ver kurino/2018/soft/soft.html A/B

A/B (2018/06/08) Ver kurino/2018/soft/soft.html A/B A/B (2018/06/08) Ver. 1.0 kurino@math.cst.nihon-u.ac.jp http://edu-gw2.math.cst.nihon-u.ac.jp/ kurino/2018/soft/soft.html 2018 6 8 A/B 1 2018 6 8 2 1 1 1.1 OHP.................................... 1 1.2

More information

( ) ( ) lex LL(1) LL(1)

( ) ( ) lex LL(1) LL(1) () () lex LL(1) LL(1) http://www.cs.info.mie-u.ac.jp/~toshi/lectures/compiler/ 29 5 14 1 1 () / (front end) (back end) (phase) (pass) 1 2 1 () () var left, right; fun int main() { left = 0; right = 10;

More information