|시간 제한||메모리 제한||제출||정답||맞힌 사람||정답 비율|
|1 초||128 MB||0||0||0||0.000%|
FORCAL is the programming language well known to programmers who are interested in compiler construction and especially to students attending Dr. C. Ompiler class. The FORCAL syntax is defined as follows:
,or the reserved words.
Help the students of Dr. C. Ompiler to write a program which reads lines of text an recognizes the FORCAL tokens in them.
The input consists of several blocks of lines. Each block contains lines of text and is terminated by one empty line.
The output consists of blocks corresponding to the blocks in the input. In the lines of each block there are successively stored the FORCAL tokens recognized by the program (just one token on each line). Each token must be written on the output line in exactly the same form as it appears in the input text. If the program encounters a string that is neither a FORCAL token, nor comment, nor space, tab, end-of-line, it is to write the string TOKEN ERROR on a new line and continues by processing the next block in the input. The program writes one empty line after each block of the output.
A1:= A + (-B); A123_A123 ) 01.2 A B C := A beGIn aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
A1 := A + ( - B ) ; A123_A123 ) 01 TOKEN ERROR := A beGIn TOKEN ERROR