Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][tlug] Follow up on Saturday's Presentation on Recursive Descent Parsing
- Date: Mon, 16 Mar 2015 14:17:02 +0900
- From: Benjamin Kowarsch <trijezdci@example.com>
- Subject: [tlug] Follow up on Saturday's Presentation on Recursive Descent Parsing
I wanted to say thank you for your interest last Saturday.The presentation should probably have had an extra slide briefly explaining FIRST and FOLLOW sets, I will work that in and pass an update on to Alberto so he can put it up on the TLUG site for anyone who is interested.I would have liked to show you how to evaluate a grammar in ANTLR and find and resolve conflicts, also how ANTLRworks can graphically build the parse tree as it processes input. It probably was too short a time for this subject. Perhaps we can do that at another time.The script that produces the syntax (railroad) diagrams is on my repo at bitbucket:I had adapted this from a script by the SQLite project. I have also documented (within the script) so that others can more easily adapt it to their own grammars/languages.Last but not least, yesterday, I wrote a DCG (definite clause grammar) to explore Prolog's built-in parsing capabilities. Terminals are presently represented as non-terminals as I am still working on a tokenizer. Prolog can parse input for DCG grammars and output parse trees with a bit of extra work.Prolog tutorials and books/coursework never go beyond the "man bites dog, dog bites man, dog chases cat, fred likes sally ..." examples with grammars that are not really useful to illustrate real world use and how to solve real world problems. This DCG is for Modula-2 R10 and has just over 900 prolog clauses, which have recursion in place of the * and + operators of EBNF syntax we explored on Saturday.If anyone is interested to join this sandbox and play around with RD parsing and Prolog, feel free to contact me.The DCG is on my repo at bitbucket:regardsbenjamin
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Looking for Summer Internship in Japan
- Next by Date: Re: [tlug] Looking for Summer Internship in Japan
- Previous by thread: Re: [tlug] [announcement] March 14 Technical Meeting
- Next by thread: Re: [tlug] Tlug Digest, Vol 111, Issue 9
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links