Parsing implicit operators with recursive descent?

"Johann 'Myrkraverk' Oskarsson" <johann@myrkraverk.com>
Fri, 06 Feb 2009 02:34:56 +0000

          From comp.compilers

Related articles
Parsing implicit operators with recursive descent? johann@myrkraverk.com (Johann 'Myrkraverk' Oskarsson) (2009-02-06)
Re: Parsing implicit operators with recursive descent? mailbox@dmitry-kazakov.de (Dmitry A. Kazakov) (2009-02-07)
Re: Parsing implicit operators with recursive descent? armelasselin@hotmail.com (Armel) (2009-02-07)
Re: Parsing implicit operators with recursive descent? torbenm@pc-003.diku.dk (2009-02-09)
Re: Parsing implicit operators with recursive descent? barry.j.kelly@gmail.com (Barry Kelly) (2009-02-12)
Re: Parsing implicit operators with recursive descent? johann@myrkraverk.com (Johann 'Myrkraverk' Oskarsson) (2010-01-30)
Re: Parsing implicit operators with recursive descent? kkylheku@gmail.com (Kaz Kylheku) (2010-02-01)
| List of all articles for this month |

From: "Johann 'Myrkraverk' Oskarsson" <johann@myrkraverk.com>
Newsgroups: comp.compilers
Date: Fri, 06 Feb 2009 02:34:56 +0000
Organization: Compilers Central
Keywords: parse, LL(1), question
Posted-Date: 07 Feb 2009 09:41:40 EST

Hi all,


Is it possible to parse implicit operators, like the regular
expression concatenation operator, with a recursive descent parser?


Both of the RE recursive descent parsers I've come across on the 'net
preprocess the input to insert a token for concat, one with postfix,
the other infix.


That is, to be explicit, is it possible to make a recursive descent
parser that produces (*) the following parse tree on this input "aab":


                                                                    @
                                                                  / \
                                                                @ b
                                                              / \
                                                            a a


Where @ is the implicit concatenation operator?


Johann


(*) For some value of `produce'.



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.