Update README.md

This commit is contained in:
Valk Richard Li 2019-12-10 14:00:55 +08:00 committed by GitHub
parent 91649607bf
commit 9e86a23559
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 23 additions and 27 deletions

View File

@ -1,8 +1,8 @@
# Nasal Interpreter
# Nasal
# Nasal script language
Nasal is a script language that used in FlightGear.
[Nasal](http://wiki.flightgear.org/Nasal_scripting_language) is a script language that used in [FlightGear](https://www.flightgear.org/).
There is a Nasal console in FlightGear but sometimes it is not so easy for every developer to use.
@ -10,31 +10,27 @@ 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 Lexical Analysis!
# Lexical Analysis
What do it's outputs look like?
What do it's outputs look like?
( Identifier | engineTimer )
> ( identifier | engineTimer )
( Operator | . )
> ( operator | . )
( Identifier | start )
> ( identifier | start )
( Operator | ( )
> ( operator | ; )
( Operator | ) )
> ( reserve word | print )
( Operator | ; )
> ( operator | ( )
( ReserveWord | print )
> ( string | Engine started )
( Operator | ( )
> ( operator | ) )
( String | "Engine started" )
( Operator | ) )
( Operator | ; )
> ( operator | ; )
This is what it outputs.
@ -44,38 +40,38 @@ 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
# Now complete Parser
# Parser
The parser can recognize some basic elements in resource program.
In version 1.1 you can use the fully-functional parser.
In __version 1.1__ you can use the fully-functional parser.
But there are still some differences such as:
```javascript
(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 ';''.
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 !
You can try a calculator in __version 0.17~0.19__ !
# Now complete Abstract Syntax Tree
# Abstract Syntax Tree
In version 1.2 the ast has been completed.
In __version 1.2__ the ast has been completed.
But there are still some bugs inside.
# Balloon script
Balloon is created for experiment.
[Balloon](https://github.com/ValKmjolnir/Balloon-script) is created for experiment.
It is a subset of Nasal and the parse is stricter than Nasal parse.
It is a subset of Nasal and the parser is __stricter__ than Nasal parser.
Explore the usage of balloon and enjoy yourself! XD