Greetings all,
I have written a quick 'n' dirty Perl parser for the SGF (Smart Game Format) which is used, among others, to record Go (Igo, Baduk, Weiqi) matches.
Now I'd like to try doing something similar in NewLISP, but I don't want to directly translate the Perl one, but instead try to build something idiomatic...
Is there any examples on how to build a parser in NewLISP? some previous art, even if parsing different document formats?
Thanks and laters
Writing a parser
Re: Writing a parser
Hans-Peter
Re: Writing a parser
... and here is a second example: a JSON parser:
http://www.newlisp.org/syntax.cgi?code/json.lsp.txt
http://www.newlisp.org/syntax.cgi?code/json.lsp.txt
-
cormullion
- Posts: 2038
- Joined: Tue Nov 29, 2005 8:28 pm
- Location: latiitude 50N longitude 3W
- Contact:
Re: Writing a parser
... and I suppose Nestor is a parser of sorts
http://unbalanced-parentheses.nfshost.c ... p.txt.html
since it parses newLISP source code. I use it to generate the coloured syntax listings you see. I wrote a bit about it:
http://unbalanced-parentheses.nfshost.c ... estorpart1
http://unbalanced-parentheses.nfshost.c ... p.txt.html
since it parses newLISP source code. I use it to generate the coloured syntax listings you see. I wrote a bit about it:
http://unbalanced-parentheses.nfshost.c ... estorpart1