-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Grammar railroad diagram #1
Comments
Aaaaa. This is really cool!! But keeping in mind that macros can accept arbitrary syntax, I'm not sure if it's very viable for parsing? |
The thing is to get somehow a formal grammar to help guide development/documentation/debug and other people to understand it. |
Right, and my point is that any formal grammar will always be incomplete, because a macro can always come in and add new syntax. |
I can see that you already used rdparse in https://github.com/FeepingCreature/jerboa, in my opinion CocoR is like rdparse with some extra nice things. |
Any parser generator will run into the issue that code may add new grammar rules at compiletime. |
I can see your point, but again the users will always start (can count) with the basic/standard syntax to start with. |
Sure. - I mean, by all means, have fun with it. :) I'll maybe look into a way to embed railroad diagrams in markdown when I start getting into writing detailed documentation. Though, keep in mind that this is pre-alpha and parts of the syntax will plausibly change. |
No problem that's the idea having fun and if something useful come out of it that's a premium ! |
By the way I'm trying compile jerboa on ubuntu 18.04 and I'm getting this so far (I'm looking at it now), have abandoned jerboa ?
|
In the enum InstrType there is no INSTR_CHECK_CONSTRAINT maybe you forgot to commit something ? |
It seems that this project is another iteration of https://github.com/FeepingCreature/fcc |
I was thinking of http://www.cs.rhul.ac.uk/research/languages/projects/rdp.html when I saw |
Manually adding INSTR_CHECK_CONSTRAINT to the enum InstrType allow the build process to go further but then it stops here:
|
Yeah man I haven't touched Jerboa in like three actual years, I think I left a bunch of stuff uncommitted. Maybe go back a few commits? One commit back should do. Jerboa was never as fast as I wanted, so I lost interest in it. rdparser is just a recursive descent parser lib. This project only shares its name with fcc. I couldn't find a good language name, so I just reused the last one I used. But it's a totally separate codebase. |
I can see that this commit introduces the actuall missing include: |
When I saw I also once embraced I hope you can achieve a nice simple and nice to work programming language with |
Yay! :) Yeah we use D at my day job. I think it's pretty stable by now, honestly, and most of the really egregious errors have been fixed by now IMO, but the compiler is sometimes not a joy to work on. Neat's bootstrap is pretty sensitive as well. I think at some point I should just throw it out and rebootstrap off the generated C files. I tried to get Jerboa to work again, and it's just completely fucked with three years of bitrot. Sorry. |
I noticed that there is no individual |
Yeah I just haven't gotten around to that yet. Lazyyy. I just use "\n"[0] everywhere rn. |
I just created a railroad diagram from |
Using CocoR (https://github.com/mingodad/CocoR-CPP) parser generator to create a grammar for this project and generating a kind of EBNF accepted by https://www.bottlecaps.de/rr/ui we can see a railroad diagram by copy and paste the EBNF shown bellow on https://www.bottlecaps.de/rr/ui in the tab Edit Grammar then switching to the tab View Diagram.
The CocoR parser so far:
The text was updated successfully, but these errors were encountered: