Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Generate headers from ILE C headers

Đang mở
#6 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
c, cpp
Lĩnh vực
compilers, tooling

Hướng nghiên cứu

No implementation file or test is identified in the issue. Start by examining the existing PGMFunction and ILEFunction wrappers, then evaluate the proposed tree-sitter or libclang parsing and preprocessing paths, including ILE C system headers and ABI rules. Done would mean a defined approach for generating wrappers and preserving structures, macros, and layout.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

While this makes calling programs/procedures pretty easy, you might still need to copy and paste (and adapt) structure definitions and still write the PGMFunction/ILEFunction definitions. What'd be nice is being able to point to a header and extract definitions.

Likely challenges:

  • Turn function definitions into the previously mentioned wrappers, preserve structures. Preserve macros perhaps too, since they may be used for i.e. enum fields. Unsure of function pointer types, or data symbols (we need a wrapper type for this).
  • Deal with ILE C extensions, i.e. _Packed that are present in system headers. Either handle them in parsing or preprocess to convert them to the GCC extensions (which are still incompatible with strict standard C parsers...).
  • Preserve ABI layout in the AIX version of the structure. long is 32-bit in ILE C, and pointers are 128-bit (well, unless Teraspace is used, but there are pragmas to control this).
  • It might be wise to run the preprocessor (or at least unifdef) ahead of time, since there are some funny constructs that trip up i.e. tree-sitter and libclang unless we do that (i.e. use #ifdef for using #pragma for linkage control rather than extern "OS for OPM).
    • This means figuring out what stock definitions we need to set, what pragmas we need to keep and understand.
    • For #include, make sure we're importing the ILE C and not OS one (for i.e. sys/types.h. This likely means making a copy of the system headers and dumping them into a sysroot for GCC CPP (and hoping GCC CPP can understand), or a C preprocessor that we have finer grained control of.

What would be nice is an IDL for system APIs that we can generate from rather than parsing C, but that precludes user things (unless they conform to said IDL).

Ngôn ngữ chính
C++
Star
3
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của SeidenGroup/pase-cpp

Tất cả issue của SeidenGroup/pase-cpp

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.