Skip to content

Commit

Permalink
Xcode16 support (#118)
Browse files Browse the repository at this point in the history
* Add support for new PBXFileSystemSynchronizedBuildFileExceptionSet section

* Add support for PBXFileSystemSynchronizedRootGroup section and preferredProjectObjectVersion field
  • Loading branch information
Serchinastico authored Nov 19, 2024
1 parent 174215c commit b8a69d2
Show file tree
Hide file tree
Showing 10 changed files with 6,029 additions and 4,276 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,7 @@ target/
.ipynb_checkpoints

# ANTLR
.antlr
.antlr

# IDE
.vscode
70 changes: 70 additions & 0 deletions kin/grammar/PBXProj.g4
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ objects
pbx_container_item_proxy_section?
pbx_copy_files_build_phase_section?
pbx_file_reference_section?
pbx_file_system_synchronized_build_file_exception_set_section?
pbx_file_system_synchronized_root_group_section?
pbx_frameworks_build_phase_section?
pbx_group_section
pbx_headers_build_phase_section?
Expand Down Expand Up @@ -94,6 +96,14 @@ pbx_file_reference_section
: (pbx_file_reference)+
;

pbx_file_system_synchronized_build_file_exception_set_section
: (pbx_file_system_synchronized_build_file_exception_set)+
;

pbx_file_system_synchronized_root_group_section
: (pbx_file_system_synchronized_root_group)+
;

pbx_frameworks_build_phase_section
: (pbx_frameworks_build_phase)+
;
Expand Down Expand Up @@ -259,6 +269,25 @@ pbx_file_reference
'}' ';'
;

pbx_file_system_synchronized_build_file_exception_set
: REFERENCE '=' '{'
isa_pbx_file_system_synchronized_build_file_exception_set
membership_exceptions
target
'}' ';'
;

pbx_file_system_synchronized_root_group
: REFERENCE '=' '{'
isa_pbx_file_system_synchronized_root_group
exceptions
explicit_file_types
explicit_folders
path
source_tree
'}' ';'
;

pbx_frameworks_build_phase
: REFERENCE '=' '{'
isa_pbx_frameworks_build_phase
Expand Down Expand Up @@ -339,6 +368,7 @@ pbx_project
known_regions?
main_group
package_references?
preferred_project_object_version?
product_ref_group?
project_dir_path
project_references?
Expand Down Expand Up @@ -508,6 +538,14 @@ isa_pbx_file_reference
: ISA '=' PBX_FILE_REFERENCE ';'
;

isa_pbx_file_system_synchronized_build_file_exception_set
: ISA '=' PBX_FILE_SYSTEM_SYNCHRONIZED_BUILD_FILE_EXCEPTION_SET ';'
;

isa_pbx_file_system_synchronized_root_group
: ISA '=' PBX_FILE_SYSTEM_SYNCHRONIZED_ROOT_GROUP ';'
;

isa_pbx_frameworks_build_phase
: ISA '=' PBX_FRAMEWORKS_BUILD_PHASE ';'
;
Expand Down Expand Up @@ -622,6 +660,14 @@ explicit_file_type
: EXPLICIT_FILE_TYPE '=' str_number_variable ';'
;

explicit_file_types
: EXPLICIT_FILE_TYPES '=' '{' key_value* '}' ';'
;

explicit_folders
: EXPLICIT_FOLDERS '=' any_string_list ';'
;

last_known_file_type
: LAST_KNOWN_FILE_TYPE '=' str_number_variable ';'
;
Expand Down Expand Up @@ -909,6 +955,10 @@ package_references
: PACKAGE_REFERENCES '=' reference_list ';'
;

preferred_project_object_version
: PREFERRED_PROJECT_OBJECT_VERSION '=' NUMBER ';'
;

project_dir_path
: PRODUCT_DIR_PATH '=' any_string ';'
;
Expand Down Expand Up @@ -1007,6 +1057,12 @@ project_references_list_element
'}' ','
;

membership_exceptions
: MEMBERSHIP_EXCEPTIONS '=' any_string_list ';';

exceptions
: EXCEPTIONS '=' reference_list ';';

key_value
: str_number_variable '=' str_number_variable ';'
| str_number_variable '=' NUMBER ';'
Expand Down Expand Up @@ -1074,6 +1130,8 @@ any_token
| PBX_CONTAINER_ITEM_PROXY
| PBX_COPY_FILES_BUILD_PHASE
| PBX_FILE_REFERENCE
| PBX_FILE_SYSTEM_SYNCHRONIZED_BUILD_FILE_EXCEPTION_SET
| PBX_FILE_SYSTEM_SYNCHRONIZED_ROOT_GROUP
| PBX_FRAMEWORKS_BUILD_PHASE
| PBX_NATIVE_TARGET
| PBX_LEGACY_TARGET
Expand All @@ -1084,6 +1142,7 @@ any_token
| PBX_SOURCES_BUILD_PHASE
| PBX_TARGET_DEPENDENCY
| PBX_VARIANT_GROUP
| PREFERRED_PROJECT_OBJECT_VERSION
| XC_BUILD_CONFIGURATION
| XC_CONFIGURATION_LIST
| XC_REMOTE_SWIFT_PACKAGE_REFERENCE
Expand All @@ -1098,6 +1157,8 @@ any_token
| FILE_ENCODING
| COMMENTS
| EXPLICIT_FILE_TYPE
| EXPLICIT_FILE_TYPES
| EXPLICIT_FOLDERS
| LAST_KNOWN_FILE_TYPE
| INCLUDE_IN_INDEX
| INDENT_WIDTH
Expand Down Expand Up @@ -1190,6 +1251,8 @@ any_token
| SYSTEM_CAPABILITIES
| CURRENT_VERSION
| VERSION_GROUP_TYPE
| MEMBERSHIP_EXCEPTIONS
| EXCEPTIONS
| CLASSPREFIX
;

Expand All @@ -1215,6 +1278,8 @@ PBX_BUILD_STYLE: 'PBXBuildStyle';
PBX_CONTAINER_ITEM_PROXY: 'PBXContainerItemProxy';
PBX_COPY_FILES_BUILD_PHASE: 'PBXCopyFilesBuildPhase';
PBX_FILE_REFERENCE: 'PBXFileReference';
PBX_FILE_SYSTEM_SYNCHRONIZED_BUILD_FILE_EXCEPTION_SET: 'PBXFileSystemSynchronizedBuildFileExceptionSet';
PBX_FILE_SYSTEM_SYNCHRONIZED_ROOT_GROUP: 'PBXFileSystemSynchronizedRootGroup';
PBX_FRAMEWORKS_BUILD_PHASE: 'PBXFrameworksBuildPhase';
PBX_GROUP: 'PBXGroup';
PBX_HEADERS_BUILD_PHASE: 'PBXHeadersBuildPhase';
Expand Down Expand Up @@ -1243,6 +1308,8 @@ REMOTE_INFO: 'remoteInfo';
FILE_ENCODING: 'fileEncoding';
COMMENTS: 'comments';
EXPLICIT_FILE_TYPE: 'explicitFileType';
EXPLICIT_FILE_TYPES: 'explicitFileTypes';
EXPLICIT_FOLDERS: 'explicitFolders';
LAST_KNOWN_FILE_TYPE: 'lastKnownFileType';
INCLUDE_IN_INDEX: 'includeInIndex';
INDENT_WIDTH: 'indentWidth';
Expand Down Expand Up @@ -1306,6 +1373,7 @@ KNOWN_REGIONS : 'knownRegions';
MAIN_GROUP : 'mainGroup';
PRODUCT_REF_GROUP : 'productRefGroup';
PACKAGE_REFERENCES : 'packageReferences';
PREFERRED_PROJECT_OBJECT_VERSION : 'preferredProjectObjectVersion';
PRODUCT_DIR_PATH : 'projectDirPath';
PROJECT_REFERENCES : 'projectReferences';
PROJECT_ROOT : 'projectRoot';
Expand Down Expand Up @@ -1336,6 +1404,8 @@ SETTINGS : 'settings';
SYSTEM_CAPABILITIES : 'SystemCapabilities';
CURRENT_VERSION : 'currentVersion';
VERSION_GROUP_TYPE : 'versionGroupType';
MEMBERSHIP_EXCEPTIONS : 'membershipExceptions';
EXCEPTIONS : 'exceptions';
CLASSPREFIX : 'CLASSPREFIX';


Expand Down
27 changes: 26 additions & 1 deletion kin/grammar/PBXProj.interp

Large diffs are not rendered by default.

Loading

0 comments on commit b8a69d2

Please sign in to comment.