Bug 1149 - Replacing PCPP w/ JCPP, allowing complete macro handling
Summary: Replacing PCPP w/ JCPP, allowing complete macro handling
Status: RESOLVED FIXED
Alias: None
Product: Gluegen
Classification: JogAmp
Component: core (show other bugs)
Version: 2.3.1
Hardware: All all
: --- enhancement
Assignee: Sven Gothel
URL:
Depends on:
Blocks: 1116
  Show dependency treegraph
 
Reported: 2015-03-23 04:04 CET by Sven Gothel
Modified: 2019-03-29 17:59 CET (History)
0 users

See Also:
Type: ---
SCM Refs:
gluegen b755b045fb7e3c8306f24dd645297992ab8db7f9 gluegen 88d51db39f3b00df1462eb0a18c1825ae1e86485 gluegen c8439e78c9e8ba4040bb723252a1c8fec00f904b gluegen 4eab2908f5344a330ff18bdf7b168f136d87781a gluegen d30a3ea54e26978d6ff199cba0fd79c5c0cef483 gluegen 32ca07fc21d1af2034c1788b6317ee14e1354d15 gluegen 3dc82b104cf69db890328ff1ffd165474c4a4d59 jcpp de373ebf98385dae3fcbd191c77b9b62b3466403 - ff2b708f8cb716a179f2de534c1694fce9434243 jogl 590b5bed36622933f452caf1db18b4dd16a75669
Workaround: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Gothel 2015-03-23 04:04:31 CET
JCPP allows recursive macro replacement and handles (all?) macro operations.

This is at least required for constructs like:
  #if defined(LALA) && ( GCC_VERSION + 1 ) > 400

however, recursive macro replacement also allows us to 
treat results as constants and emit them, e.g.:
  #define ONE 1
  #define NUMBER_FOUR ( ( ONE + ONE ) * ( ONE + ONE ) )
Comment 1 Sven Gothel 2015-03-23 13:28:40 CET
JCPP orig http://www.anarres.org/projects/jcpp/
Comment 2 Sven Gothel 2015-03-26 21:56:11 CET
JCPP:
=====
  - New git sub-module: 'jcpp'

commits de373ebf98385dae3fcbd191c77b9b62b3466403
      - ff2b708f8cb716a179f2de534c1694fce9434243:

  - Make it a GlueGen sub-module, w/o other dependencies
  - Expose expanded non-functional Macros for GlueGen

GlueGen:
=========
b755b045fb7e3c8306f24dd645297992ab8db7f9
  Part-1: Cleanup / Preparation

88d51db39f3b00df1462eb0a18c1825ae1e86485
  Part-2: JCPP submodule, build, test and doc

c8439e78c9e8ba4040bb723252a1c8fec00f904b
  Replacing PCPP w/ JCPP: Name used CPP impl.

4eab2908f5344a330ff18bdf7b168f136d87781a
  Replacing PCPP w/ JCPP

d30a3ea54e26978d6ff199cba0fd79c5c0cef483
  Fix parsing of hexadecimal w/ binary exponent floats 
  in regexp-constant and java-parser. (Due to PCPP -> JCPP)
    
    Lack of parsing binary exponent floats is exposed due to using JCPP
    and correct constant-definitions.
    
    - JavaParser.g:
      - Add support for hexadecimal w/ binary exponent floats
      - TAB -> 4 spaces
    
    - ConstantDefinition.java:
      - Add RegExp 'fpRegexp', patternDecimalNumber:
          decimal number w/ support for hexadecimal w/ binary exponent floats.
    
      - isDecimalNumber(..): Use patternDecimalNumber
        instead of try-and-error (NumberFormatException)
    
      - patternCPPOperand: exclude patternDecimalNumber!
    
    - JavaEmitter.java:
      - Respect explicit suffix [dD] for double type.
      - Drop floating point suffixes [fF]
    
    - Test: Added tests for hexadecimal w/ binary exponent floats

32ca07fc21d1af2034c1788b6317ee14e1354d15
  Fix JCPP test case IncludeAbsoluteTest

3dc82b104cf69db890328ff1ffd165474c4a4d59
  Add JCPP Apache 2.0 License to LICENSE.txt file

JOGL
=====
590b5bed36622933f452caf1db18b4dd16a75669
   Update HowToBuild.html