|
[Tiny Language] [A2 Test Case]
[Home] [Up]
| |

/** keywords (such as read and if) and identifiers should not
be counted in
comments INT MAIN **/
MAIN f()
BEGIN INT BEGIN END READ WRITE IF ELSE
main begin int begin end read rewrite if else
you are not required to check the syntax of the program; so all these words are
identifers;
except "quoted" strings and keywords
to check how many lines and words I have;
type "wc A2.input" in "luna.cs";
to count the identifers and keywords;
you have to count me one by one;
note that A1_A2 are two identifers;
_ and _____ are not identifiers;
37.25, 12,34, 5+4
ID_ID+ID@IDD special characters such as !@#$% and tab may also appear to test yo
ur
program /** you can put more than one comment line with characters like * and /
ident **
here is some more tricky part:
" test /** this is a quoted string **/ " but /** "this is a /**comment" **/
/** ident ** you can put more than one comment line with characters like * ident
/ */ ident /** ident *// ident **/
END
|