#3 ✓resolved
Peter Johnson

Rewrite lexer/parser for better arch separation

Reported by Peter Johnson | June 25th, 2011 @ 07:48 PM | in 0.3.0 (closed)

Originally posted on Trac by peter@tortall.net
Original Trac Ticket

  Description

  @@@

Currently the lex based lexer and parser in the NASM compatible parser
hard-encodes all the x86 opcodes at compile time. Obviously, this is a bad
approach if YASM ever wants to be anywhere near architecture independent. The
current plan (partially complete) is to vastly extend the architectural
interface to include lexing and parsing functions. The main lexer will be
rewritten in re2c to allow better modularity with a re2c-based lexer at the arch
level. The main parser will continue to be written in yacc (because lemon is
underdeveloped), with the arch level parser being flexible in its writing (at
the present, it looks like it will be hand-written for space and speed reasons..
opcodes don't require much advanced parsing). This will hopefully give us a
good blend of the easiness to change the front-end syntax with bison, while not
overly complexifying things with using bison to parse individual opcode/operand
sequences.


  
h3. Trac Attachments

h3. Trac Comments
comment:1
    
                  
                  Changed 9 years ago by peter@tortall.net
  comment:1

              Changed 9 years ago by peter@tortall.net

  blocked
    set to 1

  blocked
    set to 1

comment:2
    
                  
                  Changed 9 years ago by peter@tortall.net
  I've already made a significant amount of progress on this.

  comment:2

              Changed 9 years ago by peter@tortall.net

  Status
    changed from new to assigned

  I've already made a significant amount of progress on this.

  Status
    changed from new to assigned

comment:3
    
                  
                  Changed 9 years ago by peter@tortall.net
  Rewritten lexer and parser committed.  Still some work to be done (not all

instructions included yet), but marking as FIXED anyway.

  comment:3

              Changed 9 years ago by peter@tortall.net

  Status
    changed from assigned to resolved

  Resolution
    set to fixed

  Rewritten lexer and parser committed.  Still some work to be done (not all

instructions included yet), but marking as FIXED anyway.

  Status
    changed from assigned to resolved

  Resolution
    set to fixed

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

The Yasm Modular Assembler Project

Shared Ticket Bins

People watching this ticket

Pages