* GAS parser
@ 2007-08-02 13:52 Ivan Pryanishnikov
2007-08-02 17:52 ` Ian Lance Taylor
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Ivan Pryanishnikov @ 2007-08-02 13:52 UTC (permalink / raw)
To: binutils
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
- it's not possible to solve their parsing problems in a standard way
- they had some non-gnu assembler and just adjust/reuse it for the
binutils assembler (because it's easier than to write from scratch)
- ??
Could you please comment this issue.
Thanks,
Ivan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: GAS parser
2007-08-02 13:52 GAS parser Ivan Pryanishnikov
@ 2007-08-02 17:52 ` Ian Lance Taylor
2007-08-04 9:44 ` l l
2007-08-06 1:12 ` Dave Korn
2 siblings, 0 replies; 4+ messages in thread
From: Ian Lance Taylor @ 2007-08-02 17:52 UTC (permalink / raw)
To: Ivan Pryanishnikov; +Cc: binutils
Ivan Pryanishnikov <prianich@complang.tuwien.ac.at> writes:
> 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
> - it's not possible to solve their parsing problems in a standard way
> - they had some non-gnu assembler and just adjust/reuse it for the
> binutils assembler (because it's easier than to write from scratch)
> - ??
I don't know about bfin. For m68k Ken and I wrote a Bison parser
(though not a flex lexer) because the assembler needed to support two
different syntaxes, and the cases were sufficiently complex that it
seemed worthwhile to express them in a grammar, to minimize the chance
of error. So I guess that your option 1 applies for the m68k.
Ian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: GAS parser
2007-08-02 13:52 GAS parser Ivan Pryanishnikov
2007-08-02 17:52 ` Ian Lance Taylor
@ 2007-08-04 9:44 ` l l
2007-08-06 1:12 ` Dave Korn
2 siblings, 0 replies; 4+ messages in thread
From: l l @ 2007-08-04 9:44 UTC (permalink / raw)
To: Ivan Pryanishnikov; +Cc: binutils
Hi,
Little offtopic but, IMHO, self host(self compile assembler like fasm)
make gas more portable.
TIA
2007/8/2, Ivan Pryanishnikov <prianich@complang.tuwien.ac.at>:
> 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
> - it's not possible to solve their parsing problems in a standard way
> - they had some non-gnu assembler and just adjust/reuse it for the
> binutils assembler (because it's easier than to write from scratch)
> - ??
>
> Could you please comment this issue.
> Thanks,
> Ivan
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: GAS parser
2007-08-02 13:52 GAS parser Ivan Pryanishnikov
2007-08-02 17:52 ` Ian Lance Taylor
2007-08-04 9:44 ` l l
@ 2007-08-06 1:12 ` Dave Korn
2 siblings, 0 replies; 4+ messages in thread
From: Dave Korn @ 2007-08-06 1:12 UTC (permalink / raw)
To: 'Ivan Pryanishnikov', binutils
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....
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-08-06 1:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-02 13:52 GAS parser Ivan Pryanishnikov
2007-08-02 17:52 ` Ian Lance Taylor
2007-08-04 9:44 ` l l
2007-08-06 1:12 ` Dave Korn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).