Go to file
Valk Richard Li b19761e36c
Delete str2num.h
2019-08-05 23:20:53 +08:00
.gitignore Initial commit 2019-07-25 02:11:59 +08:00
NASAL语言教程-完整版.pdf Add files via upload 2019-07-25 02:18:20 +08:00
README.md Update README.md 2019-07-30 21:01:04 +08:00
lexer(useless).h Rename lexer.h to lexer(useless).h 2019-07-30 21:02:38 +08:00
lexical_analysis.cpp add type string | change output format 2019-07-30 20:56:07 +08:00
nasal.ENBF Update nasal.ENBF 2019-08-05 23:11:03 +08:00
nasal.h basical elements 2019-08-05 23:12:26 +08:00
nasal_func.h basical elements 2019-08-05 23:12:26 +08:00
nasal_func_stack.h basical elements 2019-08-05 23:12:26 +08:00
nasal_functional.h basical elements 2019-08-05 23:12:26 +08:00
nasal_hash.cpp basical elements 2019-08-05 23:12:26 +08:00
nasal_hash.h basical elements 2019-08-05 23:12:26 +08:00
nasal_lexer.h basical elements 2019-08-05 23:12:26 +08:00
nasal_list.cpp basical elements 2019-08-05 23:12:26 +08:00
nasal_list.h basical elements 2019-08-05 23:12:26 +08:00
nasal_print.h basical elements 2019-08-05 23:12:26 +08:00
nasal_var_stack.h basical elements 2019-08-05 23:12:26 +08:00

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.