On 13 Apr 2009, at 16:39, narmo wrote:
Hi!! I need to make something like a meta assembler in bison.
You might ask in the Usenet newsgroup comp.compilers what tools are
normally used when writing microassemblers.
In other words
I need users can add instructions (tokens) to original program. Is
this
possible in bison???
Bison just generates a parser, which processes a stream of tokens it
is fed from the lexer. For that latter, Flex is often used. If one
wants be able to definitions for say identifiers, then one has a look-
up table where definitions are stored. When the lexer finds an
identifier, it checks what information is stored about it, including
what type of token it is, and hands that over to the parser.
Hans
_______________________________________________
help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison