b19761e36c | ||
---|---|---|
.gitignore | ||
NASAL语言教程-完整版.pdf | ||
README.md | ||
lexer(useless).h | ||
lexical_analysis.cpp | ||
nasal.ENBF | ||
nasal.h | ||
nasal_func.h | ||
nasal_func_stack.h | ||
nasal_functional.h | ||
nasal_hash.cpp | ||
nasal_hash.h | ||
nasal_lexer.h | ||
nasal_list.cpp | ||
nasal_list.h | ||
nasal_print.h | ||
nasal_var_stack.h |
README.md
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 all types
var: int float double std::string char long long int
NasalList: array in nasal []
append
setsize
subvec
pop
sort
NasalHash: Hash in nasal {}
append
delete
contains
keys
Now complete Lexical Analysis!
What it looks like?
( Identifier | engineTimer )
( Operator | . )
( Identifier | start )
( Operator | ( )
( Operator | ) )
( Operator | ; )
( ReserveWord | print )
( Operator | ( )
( String | "Engine started" )
( Operator | ) )
( Operator | ; )
( Operator | } )
( ReserveWord | var )
( Identifier | stopEngine )
( Operator | = )
( ReserveWord | func )
( Operator | ( )
( Operator | ) )
( Operator | { )
( Identifier | props )
( Operator | . )
( Identifier | getNode )
( Operator | ( )
( String | "/" )
( Operator | , )
( Number | 1 )
( Operator | ) )
( Operator | . )
( Identifier | setValue )
( Operator | ( )
( String | "/controls/engines/engine/started" )
( Operator | , )
( Number | 0 )
( Operator | ) )
( Operator | ; )
( Identifier | props )
( Operator | . )
( Identifier | getNode )
( Operator | ( )
( String | "/" )
( Operator | , )
( Number | 1 )
( Operator | ) )
( Operator | . )
( Identifier | setValue )
( Operator | ( )
( String | "/fdm/jsbsim/external_reactions/engine/magnitude" )
( Operator | , )
( Number | 0 )
( Operator | ) )
( Operator | ; )
( Identifier | props )
( Operator | . )
( Identifier | getNode )
( Operator | ( )
( String | "/" )
( Operator | , )
( Number | 1 )
( Operator | ) )
( Operator | . )
( Identifier | setValue )
( Operator | ( )
( String | "/systems/electrical/e-tron/switch/bat-fwd-eng" )
( Operator | , )
( Number | 0 )
( Operator | ) )
( Operator | ; )
( Identifier | props )
( Operator | . )
( Identifier | getNode )
( Operator | ( )
( String | "/" )
( Operator | , )
( Number | 1 )
( Operator | ) )
( Operator | . )
( Identifier | setValue )
( Operator | ( )
( String | "/systems/electrical/e-tron/switch/bat-bwd-eng" )
( Operator | , )
( Number | 0 )
( Operator | ) )
( Operator | ; )
( Identifier | engineTimer )
( Operator | . )
( Identifier | stop )
( Operator | ( )
( Operator | ) )
( Operator | ; )
( ReserveWord | print )
( Operator | ( )
( String | "Engine stopped" )
( Operator | ) )
( Operator | ; )
( Operator | } )
This is what it outputs.