Share your repls and programming experiences

← Back to all posts
Nox - programming langauge written in C
abdullahMosibah (0)


programming language written in C .

written by me and @polysoulz.
lately i have become intersted in the history of computing and it's relation to mathmatics so i decided to learn both. by creating Nox.
nox is a programming language written in C, using tools like bison&flex, and has it's own Virtual stack machine.
the end goal of NOX is to support linear optimization problems.

(😅im learning as i go, so if there is any misinformation please contact me/pull request, thanks!)

Build Nox


install bison & flex & gcc .( you probaly have them installed 😉)

$ sudo apt-get install bison flex gcc

clone this repository & build

$ git clone
$ cd NOX
$ bison -dv NoxBison.y
$ gcc -c
$ flex NoxLex.l
$ gcc -c lex.yy.c
$ gcc -o nox lex.yy.o -lm

NOX syntax

NOX program consists of 2 segments.

declarations : where you declare your variables.
commands : where you write commands like if, while etc.


note: in the delarations section you don't need ' ; ' but you do need ' . ' after each line.

commands & keywords.

readread x;
writewrite x;
integerinteger x,n.
while ,do , endwhile x > 1 do skip; end;
if,then,fiif x > 1 then x := 4; fi;
if,then,else,fiif x > 1 then x:=4; else x := 111;fi;
skipskips commands after if,else and while


:=assignmentx := 1;
>greater thanx > 1
<less thanx < 1
=test equalityx = 1
+summationx + 5;
-Subtractionx - 5;
*Multiplicationx * 5;
/Divisionx / 2;

complete example

Fibonacci Series in NOX

	integer i,n1,n2,n3,numbers.
	read numbers;
	i := 2;
	n1 := 0;
	n2 := 1;
	write n1;
	write n2;

	 while i < numbers
			 n3 := n1 + n2; 
               	         write n3; 
               	         n1 := n2; 
               	         n2 := n3; 
			 i := i +1;

How NOX works ?

Release History

  • 0.2.1
    • CHANGE: Update docs (module code remains unchanged)
  • 0.2.0
    • Work in progress
  • 0.1.1
  • 0.1.0
  • 0.0.1


Abdullah Mosibah – @abdullah_mrajab[email protected]

Distributed under the MIT license. See LICENSE for more information.

TODO list

✅Add basic language features ( vars, while, if, else etc.)

⬜Add LP solver glpk into compiling pipeline

ELDER054 (24)

How long did it take you to learn and create NOX with flex, bison, and the stack machine?

ELDER054 (24)

@Elderosa and where can I go to try out NOX?

abdullahMosibah (0)


sorry for late response, i dont check replit that often.
you can go to and try it out.

learning flex and bison is not hard, it took me only one week, with around 3-4 hours a day.

you can find good resources online, some are textbooks from courses in some universities ( those are the best ).

good luck

send me an email if you want any help !

[email protected]

TheDrone7 (1775)

Hello there! The jam required you to submit a team repl. However, I see you've submitted a personal repl instead. Might I enquire as to why you have done this?

In case you were having trouble embedding the team repl. You only need to include a link to the team repl in your post description and it will get embedded automatically when clicked on the link.

abdullahMosibah (0)

i could not link my team repl here since it did not show in the drop-down menu.

but this is the link: