Monkey grammar or parser

Monkey Forums/Monkey Programming/Monkey grammar or parser

itto(Posted 2014) [#1]
Hi there, I'm building an automated docs generator for my monkey project files/sources. I was wondering, is it possible to find the monkey grammar defined somewhere to implement proper code parsing, or has somebody already implemented a monkey parser?


ziggy(Posted 2014) [#2]
You can take a look at Trans source code. AFAIK, that's the closest you'll get.


AdamRedwoods(Posted 2014) [#3]
Hi there, I'm building an automated docs generator for my monkey project files/sources.

i need something like this, too.

one idea would be to import trans.toker and use the Toker Class. could speed up your efforts.
"George" i think was suppose to be able to do this, but there are no docs, so no one knows how to use it. you can look under monkey/src/makedocs/parser for some more handy code.


MikeHart(Posted 2014) [#4]
I have programmed a tool to create the help files for my framework. You don't need a parser imho. Just scan for certain keywords.


itto(Posted 2014) [#5]
Thank you guys!

You can take a look at Trans source code.


Didn't know TED code was available! I will surely look into it!

I have programmed a tool to create the help files for my framework. You don't need a parser imho. Just scan for certain keywords.


I'm doing the same, but I feel like having a parser to be able to reuse it again in the future, for example for adding scripting capabilities to my engine... and also cause I'm trying Perl 6 grammars :P