This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
RE: GAS parser
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: "'Ivan Pryanishnikov'" <prianich at complang dot tuwien dot ac dot at>, <binutils at sourceware dot org>
- Date: Mon, 6 Aug 2007 02:12:32 +0100
- Subject: RE: GAS parser
- References: <20070802135244.GA23349@complang.tuwien.ac.at>
On 02 August 2007 14:53, Ivan Pryanishnikov wrote:
> Hi,
>
> I'm going to port binutils to a new target and looking at
> the organization of the package.
>
> I have a question concerning GAS: some ports (eg, bfin) use
> lex/bison extensions (eg, bfin-lex.l, bfin-parse.y) to write their
> parsers.
>
> I was wandering about the reasons behind; possibly some of them
> are:
> - it's easier (generally) in some sense
I think that's the main reason for m68k. There are a couple of syntaxes and
a lot of variations and it's easier than hand-parsing all the operands.
> - it's not possible to solve their parsing problems in a standard way
I think that's the main reason for bfin. It's a DSP and has some very
unusual syntax for specifying parallelism and SIMD.
> - ??
I think that's the main reason for MIPS (itbl-parse.y). It allows the
coprocessor instruction set to be specified at runtime which is useful for
MIPS which has millions of subtypes and custom variants.
cheers,
DaveK
--
Can't think of a witty .sigline today....