Menu

#3 a cleaned up preprocessor

closed-rejected
None
1
2010-08-07
2007-12-01
No

Attached find a cleaned up preprocessor. Though
it doesn't plug straight into the public version
of NASM, it might be useful as a reference.

There are pp_nasm (the real thing), pp_null (the
null preprocesor), manuals.txt (with the relevant
documentation), stdmac.inc (standard macros), as
well as todo.txt (a collection of comments).

The only part of the code that I'm not too happy
with is the PP_ASSIGN & Co handling (inside the
do_directive() function) -- unfortunately all the
variants got added one by one... which shows.

Discussion

  • nasm64developer

    nasm64developer - 2007-12-01

    user manual

     
  • nasm64developer

    nasm64developer - 2007-12-01

    NASM preprocessor (source)

     
  • nasm64developer

    nasm64developer - 2007-12-01

    Logged In: YES
    user_id=804543
    Originator: YES

    File Added: pp_nasm.c

     
  • nasm64developer

    nasm64developer - 2007-12-01

    Logged In: YES
    user_id=804543
    Originator: YES

    File Added: pp_nasm.h

     
  • nasm64developer

    nasm64developer - 2007-12-01

    NASM preprocessor (header)

     
  • nasm64developer

    nasm64developer - 2007-12-01

    NULL preprocessor (source)

     
  • nasm64developer

    nasm64developer - 2007-12-01

    Logged In: YES
    user_id=804543
    Originator: YES

    File Added: pp_null.c

     
  • nasm64developer

    nasm64developer - 2007-12-01

    Logged In: YES
    user_id=804543
    Originator: YES

    File Added: pp_null.h

     
  • nasm64developer

    nasm64developer - 2007-12-01

    NULL preprocessor (header)

     
  • nasm64developer

    nasm64developer - 2007-12-01

    Logged In: YES
    user_id=804543
    Originator: YES

    File Added: stdmac.inc

     
  • nasm64developer

    nasm64developer - 2007-12-01

    standard macros

     
  • nasm64developer

    nasm64developer - 2007-12-01

    Logged In: YES
    user_id=804543
    Originator: YES

    File Added: todo.txt

     
  • nasm64developer

    nasm64developer - 2007-12-01

    to-do list, comments, etc.

     
  • nasm64developer

    nasm64developer - 2007-12-01
    • status: open --> open-works-for-me
     
  • nasm64developer

    nasm64developer - 2008-01-21

    Logged In: YES
    user_id=804543
    Originator: YES

    In an attempt to mate this with NASM 2.x, I made
    a bare minimum set of changes (e.g. type defs),
    and got to the point where I had these problems:

    error: 'evalresult' undeclared (first use in this function)
    error: 'expr_t' undeclared (first use in this function)
    error: 'FLOAT_DAZ_DEFAULT' undeclared (first use in this function)
    error: 'FLOAT_DAZ_OFF' undeclared (first use in this function)
    error: 'FLOAT_DAZ_ON' undeclared (first use in this function)
    error: 'FLOAT_RC_DEFAULT' undeclared (first use in this function)
    error: 'GI_INC' undeclared (first use in this function)
    error: 'LIST_INPUT' undeclared (first use in this function)
    error: 'LIST_STRING' undeclared (first use in this function)
    error: 'private' undeclared (first use in this function)
    error: 'stdmac_main' undeclared (first use in this function)
    error: 'TOKEN_OFF' undeclared (first use in this function)
    error: 'TOKEN_ROL' undeclared (first use in this function)
    error: 'TOKEN_ROR' undeclared (first use in this function)
    error: 'TOKEN_SAL' undeclared (first use in this function)
    error: 'TOKEN_SAR' undeclared (first use in this function)
    error: 'TOKEN_SIZE' undeclared (first use in this function)
    error: 'TOKEN_WPOS' undeclared (first use in this function)
    error: 'tokval' undeclared (first use in this function)
    error: 'tokval_t' undeclared (first use in this function)
    error: (Each undeclared identifier is reported only once
    error: called object 'eval' is not a function
    error: for each function it appears in.)
    error: parse error before '*' token
    error: parse error before 'eval'
    error: parse error before 'pass'
    error: parse error before 'pp_nasm'
    error: parse error before 'tokval'
    error: parse error before 'tokval_t'
    error: request for member 'dec' in something not a structure or union
    error: request for member 'inc' in something not a structure or union
    error: request for member 'info' in something not a structure or union
    error: request for member 'out_num' in something not a structure or union
    error: request for member 'out_str' in something not a structure or union
    error: stdmac.h: No such file or directory
    error: too few arguments to function 'float_const'
    warning: implicit declaration of function 'src_clr_macro_error_line'
    warning: implicit declaration of function 'src_get_input_error_line'
    warning: implicit declaration of function 'src_set_input_error_line'
    warning: implicit declaration of function 'src_set_macro_error_line'

    I'll keep you posted as I get further.

     
  • Anonymous

    Anonymous - 2010-08-07

    This patch is no longer relevant considering the preprocessor rewrite that is occuring. I am officially marking this as rejected.

     
  • Anonymous

    Anonymous - 2010-08-07
    • assigned_to: nobody --> kkanios
    • status: open-works-for-me --> closed-rejected
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.