This site is about the programs and computers. Its content is related to my profession, but not directly. I have no education of programming, I had to learn myself and I found that many complex things really simple, but its understandanding is not always easy...

This site was created in year 2000 and initially contains only one my text "How to create programming language and compiler" (Context language, written in year 1997, only in russian). Later this text was some times rewritten and partially translated to english. It describe relatively simple demonstration compiler and more complex compiler of Context language. Demonstration compiler are obsolete now, at page You may find very small self-compiler of Context subset. At other pageYou may find small syntax-driven compiler and, as I think, very simple explanation of syntax-driven parsing.

Some other texts (about programming languages, compilers and common algorithms) available only in russian.


Syntax-driven parser (translated to english).


Yet another simple compiler.


Two bugs fixed in compiler Context 2.2 (indirect function call and element offset calculation in multidimensional array). All known bugs are fixed.


Bug fixed in Linux-version of Context 2.0 (Incorrect file attributes assigned when assembler listing created). First bug founded not by me.

In Linux FASM 1.66 or later must be used.


Context 2.0 update. Version 2.16 can work and produce code for Linux (i386), two minor bugs fixed.


Update of compilers and processors tests.


Three old bugs fixed - two bugs in scanner and one in expression compiler (incorrect code generation for real comparisons). Scanner bugs are present in all versions. Bugs fixed only in DOS-versions 1.03, 1.10 и 1.20.


Bug fixed in all DOS-versions of compiler - function could not complete with ret command. Bug present when function ends by code listed below

if Condition then // while, repeat return end

In Context 1.03 also fixed incorrect type cast from char to word. Updated sources are in archives context.zip and samples.zip.


Large update of compilers and processors tests.


Two texts, to which the author either does not have straight relation or does not have a any relation. This is made by someone С++ port of Context 2.07 and very small C compiler, less than 700 lines of code but it includes relatively many language elements and can compile itself. Author - Lennart Augustsson.


Bugs fixed in Pascal-S (parsing and code generation for the case operator) and TinyContext (function could not complete with ret command, this error also present in Context for DOS).

In TinyContext local variables and parameters added, but parameters syntax differs from the original.


Some bugs fixed in Context for Windows:

and in Pascal-S:


Small self-compiler, less then 1000 lines of code.


A little bit of statistic.


Bug fixed in DOS-versions 1.03, 1.10 и 1.20 of compiler (incorrect argument list may be treated as corect).
Minor bug fixed in Pascal-S (redundant jump in case operator).


31.12.2004 two voting are completed. Results can be seen here.


Minor bugs fixed in в Context for Windows. Context 2.02 returned.


Context for Windows update. Two errors in code generator are corrected (incorrect offset calculation in some cases), target assembler are changed from TASM32 to FASM (because TASM is not freeware), some features added (global variables initialization and constant expressions calculation).

Vote. If You come here not accidentally, please answer to two questions about programming languages.


Addition to archive - Context's clone with posfix address calculation operator.


Minor changes in compiler and assembler for DOS.


One year ago I place here some questions about programming languages. If You come here not accidentally, please answer to it.


Context for DOS update. Small bug fixed in argument list parsing.


Minor changes in assembler.


Some compiler tests now available. It performed on many different CPU from 8086/4.77 to P4/2400.

Minor changes in page design - now frames are used only in question page. Old-syle page also available.


Context 2.0 for Windows. Simplified DOS version of compiler also available.

If You come here not accidentally, please answer to my questions about programming languages.


If You come here not accidentally, please answer to my question


One more sample - a compiler context.bin. This is base version of compiler for DOS creates COM-file without assembler and support two sets of keywords. Near a year back I thought on changing part of the words (if/then/elseif/else instead of select/case, do ... end instead of while TRUE do ... end, const instead of define, := instead of = for the assignment, empty operator null) and reject nearly all of them - in future Windows version will only do ... end, null and, can be, second assignment operator. Built-in assembler will recognize only db command. Structure context.bin is similar to structure of base version, but it several more complex - there are no sense to made large changes in the old text, future version for Windows will be more simple...

More about Context compiler design and simplified version of compiler.


Compiler, assembler and samples update. Initial version of compiler are replaced to small version. To compile all samples OO-version of compiler (context.sim) must be used. Multi-pass assembler now unavailable - use one-pass assembler. Some minor changes in compiler structure are made. Some bugs fixed:


Сайт создан в системе uCoz