Parsing infix notation

Axel Schairer <schairer@dfki.de>
7 Sep 1997 15:07:15 -0400

          From comp.compilers

Related articles
Parsing infix notation schairer@dfki.de (Axel Schairer) (1997-09-07)
Re: Parsing infix notation eifrig@acm.org (Jonathan Eifrig) (1997-09-12)
Re: Parsing infix notation nr@viper.cs.virginia.edu (Norman Ramsey) (1997-09-12)
| List of all articles for this month |
From: Axel Schairer <schairer@dfki.de>
Newsgroups: comp.lang.dylan,comp.lang.lisp,comp.compilers
Date: 7 Sep 1997 15:07:15 -0400
Organization: DFKI - German Research Center for Artificial Intelligence
References: <comp.lang.dylan.199708151441.PAA09067@gairsay.aiai.ed.ac.uk> <3082226718813462@naggum.no> <86lo1ecxxo.fsf@g.pet.cam.a <862035xpyn.fsf@g.pet.cam.ac.uk> <5unec0$j8j@tools.bbnplanet.com>
Keywords: parse, comment

Barry Margolin wrote:
> Gareth McCaughan <gjm11@dpmms.cam.ac.uk> wrote:
> > - infix languages are less easily parsed;
>
> This is an issue for quick and dirty code, but it's not an issue for
> implementors -- compiler technology to parse infix notation is quite
> mature.


This might be true. It is true, of course, if you know all your infix
operators when you build your parser/parse tables. But I do not know
how to handle the situation where you


    - have user-defined infixes _and_
    - you want/need to use tools like bison/yacc/zebu ...


Is there something I should know and obviously don't?


Thanks, Axel


--
=== Axel Schairer, htt p://www .df ki.de/v se/staf f/sch airer/ ===
[So long as you predefine a parser rule for each precedence level, it's
not hard to fiddle the lexer to return user-defined operators as op tokens
at the appropriate level. -John]
--


Post a followup to this message

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