Valk Richard Li 8111f02712 Update README.md
2019-12-24 16:52:11 +08:00
2019-11-27 20:06:45 +08:00
2019-10-21 23:56:35 +08:00
2019-12-24 16:38:03 +08:00
2019-10-19 10:46:57 +08:00
2019-08-30 08:37:49 -05:00
2019-09-15 05:53:04 -05:00
2019-09-17 18:49:57 +08:00
2019-09-18 10:39:09 -05:00
2019-10-14 22:53:30 +08:00
2019-10-22 00:04:36 +08:00
2019-10-31 15:38:35 +08:00
2019-11-10 16:14:56 +08:00
2019-12-18 13:04:40 +08:00
2019-07-25 02:11:59 +08:00
2019-12-24 16:52:11 +08:00

Nasal Interpreter

Nasal script language

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!

Lexical Analysis

What do it's outputs look like?

( identifier | engineTimer )

( operator | . )

( identifier | start )

( operator | ; )

( reserve word | print )

( operator | ( )

( string | Engine started )

( operator | ) )

( operator | ; )

This is what it outputs.

And the flow chart of lexer is here:

nasal_lexer.png

Push down automata

After many times of failure,i finally try to use PDA to do the parse work.

But something occurred,so i finally didn't make it.However you can still see this LL(1) and LR(0) parser in version 0.7 & 0.9 .

Parser

The parser can recognize some basic elements in resource program.

In version 1.1 you can use the fully-functional parser.

But there are still some differences such as:

(var a,b,c)=(1,2,3);
var (r,g,b)=color;
(a,b)=(b,a);

etc. cannot be recognized.

And each statement must have a ';' after it or you will be informed with 'error: expect a ';'' .

Calculator

You can try a calculator in version 0.17~0.19 !

Abstract Syntax Tree

In version 1.2 the ast has been completed.

But there are still some bugs inside.

Balloon script

Balloon is created for experiment.

It is a subset of Nasal and the parser is stricter than Nasal parser.

Explore the usage of balloon and enjoy yourself! XD

Description
No description provided
Readme 10 MiB
Languages
C++ 55.7%
Nasal 37.3%
HTML 2.7%
JavaScript 1.8%
Makefile 1.3%
Other 1.1%