mirror of
https://github.com/ValKmjolnir/Nasal-Interpreter.git
synced 2026-07-22 02:48:48 +08:00
582fa63db2488b5e3f020dc462dc40b51064b120
Nasal Interpreter
Nasal
Nasal is a script language that used in FlightGear.
There is a Nasal console in FlightGear but sometimes it is not so easy for every developer to use.
So this is an interpreter for Nasal written by C++.
The interpreter is still in development.Anyone who interested in this could also join us!
Now complete add and sub in abstract syntax tree
And add a command 'ast' to see the AST
and command 'run' can give you the result
Now complete Lexical Analysis!
What it looks like?
( Identifier | engineTimer )
( Operator | . )
( Identifier | start )
( Operator | ( )
( Operator | ) )
( Operator | ; )
( ReserveWord | print )
( Operator | ( )
( String | "Engine started" )
( Operator | ) )
( Operator | ; )
This is what it outputs.
Push down automata
After many times of failure,i finally try to use PDA to do the parse work.
Languages
C++
56.6%
Nasal
37.5%
HTML
2.7%
JavaScript
1.8%
CMake
0.7%
Other
0.7%