.

Построение формального языка L

Язык: русский
Формат: реферат
Тип документа: Word Doc
0 994
Скачать документ

Iino?iaiea oi?iaeueiiai ycuea L

WHILE( ) [, , …])>];

WHILE – aoiaeiie oa?ieiaeueiue neiaie

– oneiaiia au?aaeaiea

– iaeioi?ay ooieoeey, eioi?ay iiaeao ionoonoaiaaoue

– ia?aiao?u ooieoeee, eioi?ua oiaea iiaoo ionoonoaiaaoue

I?eia? i?aaeeueiiai neioaenena:

WHILE(A>4444]:

( while( ) [];

( T| > T| >= T | != T

( O | T*O | T**O | T+O | T-O | T/O

( () | |

( A{A|Oe}

( Oe{Oe}

( ([{,}])

( | | (

Eeanneoeeaoeey G[Z]

G[]:

( while( ) [];

( T| > T| >= T | != T

( O | T*O | T**O | T+O | T-O | T/O

( () | |

( A{A|Oe}

( Oe{Oe}

( ([{,}])

( | | (

Naeaeaai caiaio iaoa?ieiaeueiuo neiaieia:

( Z

( A

( B

( C

( D

( E

( F

( G

Naeaeaai caiaio oa?ieiaeueiuo neiaieia:

WHILE ( a

( ( b

) ( c

; ( d

Oe ( f

A ( g

, ( h

G[Z]:

Z ( abAc[D]d

A( B|A B|A = B |A != B

B ( C | B*C | B**C | B+C | B-C | B/C

C ( bAc | E | F

E ( g{g|f}

F ( f{f}

D ( Eb[G{hG}]c

G ( E | F | (

Auaiae : G[Z] – eiioaenoii-naiaiaeiay a?aiiaoeea.

Auai? iaoiaea aiaeeca

Oioy iaeiicia/iinoue a iauai neo/aa aeey eiioaenoii-caaeneiuo a?aiiaoee
ia aeieacaia, aa eniieueciaaiea aiciiaeii aeey a?aiiaoee a eioi?uo
iaeiicia/iinoue i/aaeaeia. Iaeaieaa oi?ioi ?ac?aaioaiiui iaoiaeii
aiaeeca, aeey aeaiiiai oeia a?aiiaoee yaeyaony, iaoiae ?aeo?neaiiai
nionea.

Aeeaaiinoeea e iaeo?aeecaoeey ioeaie

?ac?aaioaiiue aeai?eoi ioiineony e iauaecaanoiiio iaoiaeo
neioaene/aneiai ?acai?a, i?aaeeiaeaiiue Ae?iinii.

Iniiaiay eaeay iaoiaea ninoieo a oii, /oi ii eiioaenoo aac aica?aoa
ioa?anuaathony oa neiaieu, eioi?ua i?eaaee a ooieeiaoth neooaoeeth e
?acai? i?iaeieaeaaony.

I?eaaaeai i?eia? neioaene/aneiai ?acai?a:

While (A > ) cls();

Z ( abAc[D]d

A( B|A B|A = B |A != B

B ( C | B*C | B**C | B+C | B-C | B/C

C ( bAc | E | F

E ( g{g|f}

F ( f{f}

D ( Eb[G{hG}]c

G ( E | F | (

Z

a b A c D

B A E

C B g{g} b G c

E C (

g E

g

While ( A > ) cls ( )
;

ooieeiaay neooaoeey

Oanoe?iaaiea ia oeaii/eao

I?ioieie ?aaiou neioaene/aneiai ?aniiciaaaoaey iia?aoi?a oeeeea while
ycuea N.

_____________________________________________________________________

Ia?aaaouaaai no?i/eo – While(a>)cls();

Iaeaeai While i?iaa?ea ia/aeanue n neiaiea – (

I?iaa?ea ia AB

I?iaa?ea ia TERM

I?iaa?ea ia O

I?iaa?ea ia IDENT, oaeouee neiaie – a

I?iaa?ea ia AB

I?iaa?ea ia TERM

I?iaa?ea ia O

I?iaa?ea ia IDENT, oaeouee neiaie – )

I?iaa?ea ia OeAC, oaeouee neiaie – )

I?iaa?ea ia FUNC, oaeouee neiaie – c

I?iaa?ea ia IDENT, oaeouee neiaie – c

Iaeaeaiiua ioeaee a no?iea While(a>)cls();

I?aaeoi?aaeaeaiea: Ionoonoaoao oneiaea ()

Ia iaeaeai eaeaioeoeeaoi? eee OeAC

_____________________________________________________________________

Ia?aaaouaaai no?i/eo – while(1>3t*(ewqw++()*we)
rscr(456,345,rtgrt,345444rtr,,,)

Iaeaeai While i?iaa?ea ia/aeanue n neiaiea – i

I?iaa?ea ia AB

I?iaa?ea ia TERM

I?iaa?ea ia O

I?iaa?ea ia IDENT, oaeouee neiaie – i

I?iaa?ea ia AB

I?iaa?ea ia TERM

I?iaa?ea ia O

I?iaa?ea ia IDENT, oaeouee neiaie – 3

I?iaa?ea ia OeAC, oaeouee neiaie – 3

I?iaa?ea ia TERM

I?iaa?ea ia O

I?iaa?ea ia AB

I?iaa?ea ia TERM

I?iaa?ea ia O

I?iaa?ea ia IDENT, oaeouee neiaie – e

I?iaa?ea ia TERM

I?iaa?ea ia O

I?iaa?ea ia IDENT, oaeouee neiaie – +

I?iaa?ea ia OeAC, oaeouee neiaie – +

I?iaa?ea ia TERM

I?iaa?ea ia O

I?iaa?ea ia TERM

I?iaa?ea ia O

I?iaa?ea ia IDENT, oaeouee neiaie – w

I?iaa?ea ia FUNC, oaeouee neiaie – r

I?iaa?ea ia IDENT, oaeouee neiaie – r

I?iaa?ea ia PAR, oaeouee neiaie – 4

I?iaa?ea ia IDENT, oaeouee neiaie – 4

I?iaa?ea ia OeAC, oaeouee neiaie – 4

I?iaa?ea ia PAR, oaeouee neiaie – 3

I?iaa?ea ia IDENT, oaeouee neiaie – 3

I?iaa?ea ia OeAC, oaeouee neiaie – 3

I?iaa?ea ia PAR, oaeouee neiaie – r

I?iaa?ea ia IDENT, oaeouee neiaie – r

I?iaa?ea ia PAR, oaeouee neiaie – 3

I?iaa?ea ia IDENT, oaeouee neiaie – 3

I?iaa?ea ia OeAC, oaeouee neiaie – 3

I?iaa?ea ia PAR, oaeouee neiaie – ,

I?iaa?ea ia IDENT, oaeouee neiaie – ,

I?iaa?ea ia OeAC, oaeouee neiaie – ,

Iaeaeaiiua ioeaee a no?iea 435 4 whilei>>3t*(ewqw++()*we)
rscr(456,345,rtgrt,345444rtr,,,)

Ionoonoaoao (

Ionoonoaoao )

I?aaeoi?aaeaeaiea: Ionoonoaoao oneiaea ()

Ionoonoaoao ; iinea ooieoeee

Ia?aiao? ooieoeee ia iiaeao ia/eiaony n oeeo?u

Iaecaanoiue eaeaioeoeeaoi?(u) –

435, 4,

Ia iaeaeai eaeaioeoeeaoi? eee OeAC

Eaeaioeoeeaoi? ia iiaeao ia/eiaoueny n oeeo?u

Ia iaeaeai eee ia aa?iue ia?aiao?

Iaecaanoiay ciaeiaay eiino?oeoeey

_____________________________________________________________________

Ia?aaaouaaai no?i/eo – whiLE(43-(sss344>(544523*232)
clrscr(,)

Iaeaeai While i?iaa?ea ia/aeanue n neiaiea – (

I?iaa?ea ia AB

I?iaa?ea ia TERM

I?iaa?ea ia O

I?iaa?ea ia IDENT, oaeouee neiaie – i

I?iaa?ea ia AB

I?iaa?ea ia TERM

I?iaa?ea ia O

I?iaa?ea ia IDENT, oaeouee neiaie – 3

I?iaa?ea ia OeAC, oaeouee neiaie – 3

I?iaa?ea ia AB

I?iaa?ea ia TERM

I?iaa?ea ia O

I?iaa?ea ia AB

I?iaa?ea ia TERM

I?iaa?ea ia O

I?iaa?ea ia IDENT, oaeouee neiaie – 5

I?iaa?ea ia OeAC, oaeouee neiaie – 5

I?iaa?ea ia AB

I?iaa?ea ia TERM

I?iaa?ea ia O

I?iaa?ea ia IDENT, oaeouee neiaie – 2

I?iaa?ea ia OeAC, oaeouee neiaie – 2

I?iaa?ea ia TERM

I?iaa?ea ia O

I?iaa?ea ia IDENT, oaeouee neiaie – 3

I?iaa?ea ia OeAC, oaeouee neiaie – 3

I?iaa?ea ia TERM

I?iaa?ea ia O

I?iaa?ea ia IDENT, oaeouee neiaie – 2

I?iaa?ea ia OeAC, oaeouee neiaie – 2

I?iaa?ea ia TERM

I?iaa?ea ia O

I?iaa?ea ia AB

I?iaa?ea ia TERM

I?iaa?ea ia O

I?iaa?ea ia IDENT, oaeouee neiaie – w

I?iaa?ea ia AB

I?iaa?ea ia TERM

I?iaa?ea ia O

I?iaa?ea ia IDENT, oaeouee neiaie – 2

I?iaa?ea ia OeAC, oaeouee neiaie – 2

I?iaa?ea ia TERM

I?iaa?ea ia O

I?iaa?ea ia IDENT, oaeouee neiaie – 2

I?iaa?ea ia OeAC, oaeouee neiaie – 2

I?iaa?ea ia FUNC, oaeouee neiaie –

I?iaa?ea ia IDENT, oaeouee neiaie – c

I?iaa?ea ia PAR, oaeouee neiaie – ,

I?iaa?ea ia IDENT, oaeouee neiaie – ,

I?iaa?ea ia OeAC, oaeouee neiaie – ,

Iaeaeaiiua ioeaee a no?iea
while(i>344>(544523*232) clrscr(,)

Ionoonoaoao ; iinea ooieoeee

Ia iaeaeai eee ia aa?iue ia?aiao?

Iaecaanoiay ciaeiaay eiino?oeoeey

_____________________________________________________________________

Ia?aaaouaaai no?i/eo – while(u>r+erhgeerg(e>=rwe+++r+788erwe++))
scr(eee,qeer+erhgeerg(e>=rwe+++r+788erwe++))
scr(eee,qee77777u777) clrscr(,…,)

Iaeaeai While i?iaa?ea ia/aeanue n neiaiea – (

I?iaa?ea ia AB

I?iaa?ea ia TERM

I?iaa?ea ia O

I?iaa?ea ia IDENT, oaeouee neiaie – i

I?iaa?ea ia AB

I?iaa?ea ia TERM

I?iaa?ea ia O

I?iaa?ea ia IDENT, oaeouee neiaie – 7

I?iaa?ea ia OeAC, oaeouee neiaie – 7

I?iaa?ea ia FUNC, oaeouee neiaie –

I?iaa?ea ia IDENT, oaeouee neiaie – c

I?iaa?ea ia PAR, oaeouee neiaie – ,

I?iaa?ea ia IDENT, oaeouee neiaie – ,

I?iaa?ea ia OeAC, oaeouee neiaie – ,

Iaeaeaiiua ioeaee a no?iea while(i>77777u777) clrscr(,…,)

Ionoonoaoao ; iinea ooieoeee

Eaeaioeoeeaoi? ia iiaeao ia/eiaoueny n oeeo?u

Ia iaeaeai eee ia aa?iue ia?aiao?

_____________________________________________________________________Ia?
aaaouaaai no?i/eo – while(4545>>445— ;

Iaeaeai While i?iaa?ea ia/aeanue n neiaiea – (

I?iaa?ea ia AB

I?iaa?ea ia TERM

I?iaa?ea ia O

I?iaa?ea ia IDENT, oaeouee neiaie – 4

I?iaa?ea ia OeAC, oaeouee neiaie – 4

I?iaa?ea ia AB

I?iaa?ea ia TERM

I?iaa?ea ia O

I?iaa?ea ia IDENT, oaeouee neiaie – 4

I?iaa?ea ia OeAC, oaeouee neiaie – 4

I?iaa?ea ia TERM

I?iaa?ea ia O

I?iaa?ea ia IDENT, oaeouee neiaie –

I?iaa?ea ia OeAC, oaeouee neiaie –

I?iaa?ea ia FUNC, oaeouee neiaie – ;

I?iaa?ea ia IDENT, oaeouee neiaie – ;

Iaeaeaiiua ioeaee a no?iea while(4545>>445— ;

Ionoonoaoao )

I?aaeoi?aaeaeaiea: ionoonoaoao eiy ooieoeee

Ia iaeaeai eaeaioeoeeaoi? eee OeAC

Iaecaanoiay ciaeiaay eiino?oeoeey

_____________________________________________________________________

Ia?aaaouaaai no?i/eo – while(i>=0);

Iaeaeai While i?iaa?ea ia/aeanue n neiaiea – (

I?iaa?ea ia AB

I?iaa?ea ia TERM

I?iaa?ea ia O

I?iaa?ea ia IDENT, oaeouee neiaie – i

I?iaa?ea ia AB

I?iaa?ea ia TERM

I?iaa?ea ia O

I?iaa?ea ia IDENT, oaeouee neiaie – 0

I?iaa?ea ia OeAC, oaeouee neiaie – 0

I?iaa?ea ia FUNC, oaeouee neiaie – ;

I?iaa?ea ia IDENT, oaeouee neiaie – ;

Iaeaeaiiua ioeaee a no?iea while(i>=0);

I?aaeoi?aaeaeaiea: ionoonoaoao eiy ooieoeee

_____________________________________________________________________

Ia?aaaouaaai no?i/eo – while(i>=0) 544();

Iaeaeai While i?iaa?ea ia/aeanue n neiaiea – (

I?iaa?ea ia AB

I?iaa?ea ia TERM

I?iaa?ea ia O

I?iaa?ea ia IDENT, oaeouee neiaie – i

I?iaa?ea ia AB

I?iaa?ea ia TERM

I?iaa?ea ia O

I?iaa?ea ia IDENT, oaeouee neiaie – 0

I?iaa?ea ia OeAC, oaeouee neiaie – 0

I?iaa?ea ia FUNC, oaeouee neiaie –

I?iaa?ea ia IDENT, oaeouee neiaie – 5

Iaeaeaiiua ioeaee a no?iea while(i>=0) 544();

Ionoonoaoao ; iinea ooieoeee

I?aaeoi?aaeaeaiea: ionoonoaoao eiy ooieoeee

_____________________________________________________________________

Ia?aaaouaaai no?i/eo – whilei>=0) clrscr();13

Iaeaeai While i?iaa?ea ia/aeanue n neiaiea – i

I?iaa?ea ia AB

I?iaa?ea ia TERM

I?iaa?ea ia O

I?iaa?ea ia IDENT, oaeouee neiaie – i

I?iaa?ea ia AB

I?iaa?ea ia TERM

I?iaa?ea ia O

I?iaa?ea ia IDENT, oaeouee neiaie – 0

I?iaa?ea ia OeAC, oaeouee neiaie – 0

I?iaa?ea ia FUNC, oaeouee neiaie –

I?iaa?ea ia IDENT, oaeouee neiaie – c

Iaeaeaiiua ioeaee a no?iea whilei>=0) clrscr();13

Ionoonoaoao (

I?aaeoi?aaeaeaiea: Ionoonoaoao oneiaea ()

_____________________________________________________________________

Ia?aaaouaaai no?i/eo – whilertt>3432*23432)

Iaeaeai While i?iaa?ea ia/aeanue n neiaiea – (

I?iaa?ea ia AB

I?iaa?ea ia TERM

I?iaa?ea ia O

I?iaa?ea ia IDENT, oaeouee neiaie – d

I?iaa?ea ia AB

I?iaa?ea ia TERM

I?iaa?ea ia O

I?iaa?ea ia IDENT, oaeouee neiaie – 3

I?iaa?ea ia OeAC, oaeouee neiaie – 3

I?iaa?ea ia TERM

I?iaa?ea ia O

I?iaa?ea ia IDENT, oaeouee neiaie – 2

I?iaa?ea ia OeAC, oaeouee neiaie – 2

I?iaa?ea ia FUNC, oaeouee neiaie –

I?iaa?ea ia IDENT, oaeouee neiaie –

Iaeaeaiiua ioeaee a no?iea while(dd>>3432*23432)

Ionoonoaoao ; iinea ooieoeee

I?aaeoi?aaeaeaiea: ionoonoaoao eiy ooieoeee

Iaecaanoiay ciaeiaay eiino?oeoeey

Eenoeia i?ia?aiiu

AA?EAHO # 10

Neioaene/aneee ?aniiciiaaoaeue iia?aoi?a oeeeea While

Oaee i?ia?aiiu – A513.cpp

n oaenoii aeey ?aniiciiaaiey – test.513

n i?ioieieii ?aaiou – error.513

Eaoaaepa : ANO

Apoiia : A-513

Nooaeaio : Noa?eeia Aeieo?ee Aeaenaiae?iae/

Ipaiiaeaaaoaee : eaiaeeaeao oaoie/aneeo iaoe, aeioeaio

Oipieeia THpee Aeaaeeiepiae/,

annenoaio Iaiiaa Aapa Aipeniaia

Aeaoa : 30 iay 1997a.

//———————————————————————-
——

// Caaieiai/iua oaeeu.

//———————————————————————-
——

#include

#include

#include

#include

#include

#include

#define UP 72 // no?aeea aaa?o

#define DOWN 80 // no?aeea aiec

#define ALTX 45 // auoiae

#define F1 59

#define F2 60

#define F3 61

#define ESC 27

#define FL_NAME “test.513”

#define FL_TEST “error.513”

void open_fl(void); // ioepuoue oaee

void work_space(void); // oipaaeyao paai/ae iaeanoueth

void print_page(void); // ia/aoaao oaeno ia yepai

void help_line(void); // oaeno n iiiiuueth ieaeiyy nopi/ea

void help(int);

int scan(); // Aeaeaao ?acai? no?iee

int my_while(); // iiapaoip

int AB(); // a?eoiaoe/aneia au?aaeaiea

int TERM(); // Oa?i

int O(); // Iia?aiae

int IDENT(); // Eaeaioeoeeaoi?

int ZBZ(); // Oeaeia aac ciaea

int FUNC(); // Ooieoeey

int PAR(); // Ia?aiao?

char TEXT[22][80];

int position; // Iiia? oaeouae no?aieoeu

int cur_y=3; // iieiaeaiea eopnipa ia yepaia

int x,y; // Oaeouay iiceoeey i?e eiiieeyoeee a
no?i/ea

int f=0; // I?e f=1 ioeaee aeey ooieoeee

char screen[4096]; // Niopaiyao iieioth eiieth yepaia

char screen1[4096]; // Niopaiyao /anoue yepaia

char *mistake[]={“Ioeaie iao!!!”, //0

“Iiapaoip while ia iaeaeai”, //1

“Ionoonoaoao (“, //2

“Ionoonoaoao )”, //3

“I?aaeoi?aaeaeaiea: Ionoonoaoao oneiaea ()”, //4

“Ionoonoaoao ; iinea ooieoeee”, //5

“I?aaeoi?aaeaeaiea: ionoonoaoao eiy ooieoeee”, //6

“I?iiouaii / eee * eee ** eee + eee – “, //7

“”, //8

“Ia?aiao? ooieoeee ia iiaeao ia/eiaony n oeeo?u”, //9

“Iaecaanoiue eaeaioeoeeaoi?(u) – “, //10

“Ia iaeaeai eaeaioeoeeaoi? eee OeAC”, //11

“Eaeaioeoeeaoi? ia iiaeao ia/eiaoueny n oeeo?u”,
//12

“Ia iaeaeai eee ia aa?iue ia?aiao?”, //13

“Iaecaanoiay ciaeiaay eiino?oeoeey”, //14

“”}; //15

FILE *fl_t;

int mistake_number[15]; //iannea o?aiyuee eiaeu ioeaie (0 eee 1)

//aaea 1-ioeaea i?enoonaoao, 0 a i?ioeaiii
neo/aa

//mistake_number[i], aaea i iiia? ioeaee ec
mistake

char strange[100]; //ia?a/aiue iaecaanoiuo eaeaioeoeeaoi?ia

//iaeaeaiuo a no?iea ai a?aiy ?acai?a

int s=0; //oaeouay iiceoeey a strange

void main()

{

open_fl();

help_line();

print_page();

work_space();

}

//———————————————————————-
——

// Ioe?uoea oaeea

//———————————————————————-
——

void open_fl(void)

{

FILE *fl;

int i;

window(1,1,80,25);

textbackground(BLACK);

textcolor(WHITE);

clrscr();

_setcursortype(_NOCURSOR);

if((fl_t= fopen(FL_TEST,”w”))== NULL) exit(1);

if ((fl = fopen(FL_NAME,”r”))==NULL)

{

window(18,10,60,16);

textbackground(GREEN);

textcolor(BLACK);

clrscr();

gotoxy(5,2);cprintf(” Iaiiao iaeoe oaee test.513″);

gotoxy(5,3);cprintf(“I?iaa?oa aai iaee/ea ia aeenea”);

gotoxy(5,4);cprintf(” eee nicaeaeoa iiaue”);

gotoxy(3,6);cprintf(“Aeey i?iaeieaeaiey iaaeieoa ethaoth
eeaaeoo”);

getch();

exit(0);

}

for(i=0;i -> WHILE
()[];\n\r\r”);

cprintf(” 2. -> T| >T |
>=T | !=T\n\r\r\r”);

cprintf(” 3. T -> O | T+O | T-O | T*O | T/O |
T**O\n\r\r\r”);

cprintf(” 4. O ->() | | \n\r\r\r”);

cprintf(” 5. -> A{A|Oe}\r\r\r\r\n”);

cprintf(” 6. -> Oe{Oe}\r\n”);

cprintf(” 7. ->
([{,}])\r\n”);

cprintf(” 8. -> | \r\n”);

}

if(n == 3)

{

cprintf(“\n ssCUE IIA?AOI?A\n\n\n\r\r”);

cprintf(” WHILE(AB)
[FUNCTION([PAR,PAR,…])];\r\n\n”);

cprintf(” AB – Au?aaeaiea \r\n”);

cprintf(” FUNCTION – ooieoeey\r\n”);

cprintf(” PAR – ia?aiao?u ooieoeee, iiaoo auoue
oeeo?u eee oaeno \r\n”);

cprintf(” eiee/anoai eo ia
ia?aie/aii\r\n\n”);

cprintf(” I?iaaeu iaaeaeo neiaieaie
iaaeiionoeiu\r\n\n\n”);

}

getch();

puttext(1,8,80,22,string);

window(1,1,80,25);

}

//———————————————————————-
——

// Neaie?oao aei iiyaeaiey While

//———————————————————————-
——

int scan()

{

int k,j,w; //n/ao/eee

mistake_number[1]=1;

for(j=0;;j++)

{

if(TEXT[x][j] == NULL) break;

if(TEXT[x][j] == ‘W’)

{

y=j; //anee iaoee W eee w

if(my_while() == 1) break; //oi aucuaaai

} //my_while

if(TEXT[x][j] == ‘w’)

{

y=j;

if(my_while() == 1) break;

}

if(TEXT[x][j] != ‘ ‘)

{

strange[s++]=TEXT[x][j];

mistake_number[10]=1;

}

if(TEXT[x][j] == ‘ ‘)

{

strange[s++]=’,’;

strange[s++]=’ ‘;

}

}

strange[s]=NULL;

return(1);

}

//———————————————————————-
——

// Ia?aaaouaaao While e aucuaaao ia?aaioeo ooieoeee

//———————————————————————-
——

int my_while()

{

char str[10];

int k,j,w; //n/ao/eee

for(w=0;w‘)

{

y++;

if(TEXT[x][y] == ‘=’) y++;

for(z=0;z‘ && TEXT[x][y]!=’!’ && TEXT[x][y]!=’ ‘&& TEXT[x][y]!=’=’)

{

mistake_number[7]=1;

AB();

}

return(1);

}

//———————————————————————-
——

// Ia?aaioea iia?aiaea

//———————————————————————-
——

int O()

{

fprintf(fl_t,”I?iaa?ea ia O\n”);

if(TEXT[x][y] == ‘(‘)

{

y++;

if(TEXT[x][y] == ‘)’)

{

mistake_number[4]=1;

y++;

}

else

{

AB();

if(TEXT[x][y] == ‘(‘)

{

AB();

}

if(TEXT[x][y] != ‘)’)

{

mistake_number[3]=1;

y++;

}

else y++;

}

}

else

{

if(IDENT() == 0)

if(ZBZ() == 0)

if(f==0) mistake_number[11]=1;

return(0);

}

return(0);

}

//———————————————————————-
——

// Ia?aaioea eaeaioeoeeaoi?a

//———————————————————————-
——

int IDENT()

{

fprintf(fl_t,”I?iaa?ea ia IDENT, oaeouee neiaie –
%c\n”,TEXT[x][y]);

if((isalpha(TEXT[x][y])) != NULL)

{

while(isalpha(TEXT[x][y]) || isdigit(TEXT[x][y]))

y++;

return(1);

}

else return(0);

}

//———————————————————————-
——

// Oeaeia aac ciaea

//———————————————————————-
——

int ZBZ()

{

fprintf(fl_t,”I?iaa?ea ia OeAC, oaeouee neiaie –
%c\n”,TEXT[x][y]);

if((isdigit(TEXT[x][y])) != NULL)

{

y++;

while(1)

{

if((isalpha(TEXT[x][y])) != NULL)

{

/*Anee iaeaeai eaeaioeoeeaoi?,*/ if(f==0) mistake_number[12]=1;

/*ia/eiathueeny n oeeo?u, */ else mistake_number[9]=1;

/*oi ioeaea: */ while(isalpha(TEXT[x][y]) ||
isdigit(TEXT[x][y]))

/*anee f=0 oi a eaeaioeoeeaoi?a*/ y++;

/*anee f=1 oi a ia?aiao?a */ return(1);

/* ooieoeee */ }

if((isdigit(TEXT[x][y])) == NULL) break;

y++;

}

return(1);

}

else return(0);

}

//———————————————————————-
——

// Ia?aaioea ooieoeee

//———————————————————————-
——

int FUNC()

{

f=1;

fprintf(fl_t,”I?iaa?ea ia FUNC, oaeouee neiaie –
%c\n”,TEXT[x][y]);

for(;;y++)

if(TEXT[x][y] != ‘ ‘) break;

if(IDENT()==0)

{

mistake_number[6]=1;

while(isalpha(TEXT[x][y]) || isdigit(TEXT[x][y]))

y++;

}

if(mistake_number[6] ==0)

if(TEXT[x][y] =='(‘)

{

y++;

if(TEXT[x][y] == ‘)’)

{

mistake_number[4]=1;

y++;

}

else while(6)

{

if(PAR() != 0)

{

if(TEXT[x][y] == ‘)’)

{

y++;

break;

}

if(TEXT[x][y] == ‘;’) break;

if(TEXT[x][y] == ‘,’) y++;

}

else

{

mistake_number[13]=1;

break;

}

}

}

else

{

mistake_number[2]=1;

mistake_number[13]=1;

}

if(mistake_number[13]==1)

{

for(;;y++)

{

if(TEXT[x][y] == NULL)

{

mistake_number[5]=1;

mistake_number[3]=1;

break;

}

if(TEXT[x][y] == ‘;’)

{

mistake_number[3]=1;

break;

}

if(TEXT[x][y] == ‘)’)

{

y++;

break;

}

}

}

if(TEXT[x][y] != ‘;’) mistake_number[5]=1;

return(1);

}

//———————————————————————-
——

// Ia?aaioea ia?aiao?ia ooieoeee

//———————————————————————-
——

int PAR()

{

fprintf(fl_t,”I?iaa?ea ia PAR, oaeouee neiaie –
%c\n”,TEXT[x][y]);

if(IDENT() == 0)

if(ZBZ() == 0)

{

mistake_number[13]=1;

return(0);

}

return(1);

}

Nienie eeoa?aoo?u:

Ae. A?en Eiino?oe?iaaiea eiiieeyoi?ia aeey oeeo?iauo au/eneeoaeueiuo
iaoei. I., Ie?, 1975.

Eaaaaeaa A.I. Aaaaeaiea a nenoaiu i?ia?aiie?iaaiey. I., «Noaoenoeea»,
1975.

Oi?ieeia TH.A., Oaaae A.?. Iaoiaee/aneia iiniaea aeey auiieiaiey
eo?niaie ?aaiou ii nenoaiiiio i?ia?aiie?iaaieth. Iiaineae?ne, 1992.

PAGE

PAGE 27

Нашли опечатку? Выделите и нажмите CTRL+Enter

Похожие документы
Обсуждение

Оставить комментарий

avatar
  Подписаться  
Уведомление о
Заказать реферат!
UkrReferat.com. Всі права захищені. 2000-2019