#include #include COMPILER Oberon0 CHARACTERS letter = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz". digit = "0123456789". hexDigit = "0123456789ABCDEF". cr = '\r'. lf = '\n'. tab = '\t'. stringCh = ANY - "'" - '"' - cr - lf. TOKENS ident = letter { letter | digit }. integer = digit { digit }. string = "'" { stringCh | "'" } '"' | "'" { stringCh | '"' } "'". dot = ".". COMMENTS FROM "(*" TO "*)" NESTED IGNORE cr + lf + tab PRODUCTIONS Oberon0 = (. wchar_t *modname, *modname2; .) "MODULE" Ident ";" "BEGIN" "END" Ident (. if( coco_string_compareto( modname, modname2 ) != 0 ) { SemErr( L"Module name mismatch" ); } .) "." EOF. Ident = ident (. modname = coco_string_create( t->val ); .) . END Oberon0.