Tiny programming language
Tiny is an extremely simple programming language used in computer science courses to teach compiler construction techniques to students.
The language itself is so basic that it only includes reading of integer numbers, addition and subtraction arithmetic operations, and displaying numerical values.
The grammar of the language follows:
<program> -> BEGIN <stmt list> END <stmt list> -> <stmt list> <stmt> | <stmt> <stmt> -> <ident> := <expr>; <stmt> -> READ ( <id list> ) ; <stmt> -> WRITE ( <expr list> ) ; <id list> -> <id list>, <ident> | <ident> <expr list> -> <expr list>, <expr> | <expr> <expr> -> <expr> <op> <factor> | <factor> <factor> -> ( <expr> ) | <ident> | INT <op> -> + | - <ident> -> ID
As can be deduced from this simplistic grammar, the language is of limited practical use, gaining the most value as a teaching aid.
This article is issued from Wikipedia - version of the Monday, November 04, 2013. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.