السلام عليكم شبااااااااااااااااااااب ,,,
عندي كوود واتمنى ان شا الله انكم تساعدوني في حله .. لاني بصراحه ما عندي خبره في استخدام لغة السي ...
طبعاً الكووود اللي باعطيكم وياه بالانجليزي ... وفيه ل شي مطلوب للكود .. ان شا الله انكم تفهمون المطلوب .. لاني بصرااحه ... ماني فاهم بالضبط وش المطلوب ...
وهذا المطلووووووووب :
Consider the following syntax grammar for Simple Programming Language (SPL): <prog> à PROGAM <id>: <d-l> BEGIN <st-l> END <ID> <d-l> à <d>; | <d>; <d-l> <d> à <type> <v-l> <type> à <INT> | <REAL> | <BOOL> <v-l> à <id> | <id>, <v-l> <id> à <let> | <let> <let> | <let> <let> <let> <let> à A | B | C ….. | X | Y | Z | a | b | c | …. | x | y |z <st-l> à <st>; | <st>; <st-l> <st> à <assign> | <while> | <for> | <if> <assign> à <id> = <expr> <expr> à <ae> | <re> <ae> à <ae> + <t> | <ae> -<t> | <t> <t> à <t> * <f> | <t> / <f> | <f> <f> à <id> | ( <ea> ) | <num> <num> à <intg> | <float> <intg> à <dig> | <dig> <intg> <float> à <intg> . <intg> <dig> à 0 | 1 | 2 | ….. | 8 | 9 <re> à <ae> == <ae> | <ae> > <ae> | <ae> < <ae> <while> à WHILE (<re>) <st-l> ENDWHILE <for> à FOR (<id>, (<re>) ,<id + 1>) <st-l> ENDFOR <if> à IF (<re>) <st-1> ENDIF <read> à READ <v-l> <write> à WRITE <v-l> The sample programs Program XYZ: INT A, B ,C , E; REAL D; BEGIN READ A, B; WHILE ( A < B) A = A + 1; ENDWHILE WRITE A, B; IF (A == B) A = 100; ENDIF WRITE A, B; FOR ( E = 1, (A < B), E = E + 1) A = A + 1; ENDFOR WRITE A, B; END XYZ Develop a syntax analyzer for the SPL. The syntax analyzer should read its input (i.e., the source program given above) from a file and write its output to another file. The output of the syntax analyzer should contain the listing of the source program and error messages for the syntax errors, if any.
ويعطيكم العااااااااافيه ...
ولو احد فيكم قدر يحل الكووووود ... ارسلوا الجوااااب على الايميل اللي تحت :
ant_touhy@yahoo.com
ويعطيكم العااااافيه مره ثانيه اخوااااااااااني