gnupic: Re: [gnupic] SPASM - a MPASM behave alike
Subject:
Re: [gnupic] SPASM - a MPASM behave alike
From:
Peter Keller ####@####.####
Date:
6 Jun 2009 23:58:46 -0000
Message-Id: <20090606235836.GA29373@cs.wisc.edu>
On Sat, Jun 06, 2009 at 05:03:57PM -0400, David Barnett wrote:
> Haven't run the program itself, but from the description it sounds nice.
> I've been trying for a while to split out gpasm's preprocessor from the
> assembler (to support several of the features you've implemented), but I
> kept running into quirks of lex and yacc and getting stuck (e.g. there's
> some kind of magic to having multiple parsers in one project).
Is there a formal lexical & grammar specification for the assembly
dialect? And, in a sense, why bother having a preprocessor phase
at all? Just lex and parse the entirety of the language, macros and
all into an AST, and then transform the AST into another AST with the
"preprocessing" steps applied. With modern computers, so what if
two, ten, or a hundred passes are done on the in memory AST?
Thank you.
-pete