Closed Jeremi360 closed 4 years ago
Hey, that's awesome. Nice, RakugoScript should be easy and comfortable to use.
I think it would best to start by writing a syntax reference or grammar with a simplified standard notation. Notations such as PEG and BNF provide structure for you to define the rules of the language. Here's the grammar for fairyscript.
Once a grammar is in place, adapting it to tree sitter is straightforward.
O, thanks.
After few readings of grammar for fairyscript. I thinks that I understand now BNF.
I will start working on it soon.
I have one question:
<manuscript> ::= <block>
is this means that all file is a <manuscript>
?
Yep! The <manuscript>
is the root symbol and is effectively the file.
This means that if we have this fairyscript:
# a comment
It expands to the following AST:
- manuscript
- block
- statement
- comment
- "# a comment"
Do you have a public link to your grammar document? I'd like to help.
@PrestonKnopp Ups, I close this by mistake.
I'm sorry that I haven't responded for so long. I just had a lot on my mind and I didn't notice your question either. Yes, there is, but I just getting starting: https://github.com/jebedaia360/Raku
I learned that there is already a Raku language, maybe Raq? https://www.wikiwand.com/en/Raku_(programming_language)
@PrestonKnopp I added some grammar: https://github.com/jebedaia360/Raku/blob/lab/raku.bnf
So this will be correct grammar:
<definition> ::= "define" <whitespace>? <var_name> "=" .
for this:
define a = 3
define b = 0.3
define e = "some string"
define d = []
define e = {}
define f = false
I'm right?
@PrestonKnopp hello? Maybe you want to join to mu/rakugo discord it will make communitation to work on raku easier: https://discord.gg/WXDu6wX
Hey, it's my turn to apologize now. I'm sorry I haven't responded in so long. I can't believe how time flies.
Nice, I'm following the Raku repo now.
<definition> ::= "define" <whitespace>? <var_name> "=" .
I have a couple suggestions:
<expression>
or if define only accepts literals: (<number> | <string> | <array> | <dictionary> | <boolean>)
.Cool, I'll see you on discord.
I'm actually going to close this and use Raku repo and discord for communication.
Hi @PrestonKnopp I almost finish working on rakugo 2.1.00. I just find out that
raku
in jap. meanseasy
,comfort
. So I recently start working on RakugoScript (Raku) using just GDScript Regex features and now I see that this is not enught. You can check out this attempt here: rakugo_script branch| , by running res://game/RakugoScriptTest.tscn it takes test.rkg and make test.rkg.gdNow I want to try use tree-sitter instead so how I should start? Also here is my RakugoScript issue for refrence.