Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

DRAFT: PEGTL Text File Format Parser #2819

Conversation

erslavin
Copy link
Contributor

Description of Change(s)

  • Replaced existing lex/yacc based parser with PEGTL
  • Moved path parser to independent file set to support direct inclusion in text file format parser
  • Added specific tests for various grammar rules

Fixes Issue(s)

  • I have verified that all unit tests pass with the proposed changes
  • I have submitted a signed Contributor License Agreement

@erslavin
Copy link
Contributor Author

erslavin commented Nov 20, 2023

Draft PR for initial review. A few things still left to be done:

  • Second pass at whitespace rules needs to be done to make them more robust
  • Multi-line C++ style comments are not yet accounted for
  • Additional specific grammar tests should be added, particularly around comments
  • Issue with debug assertion when running tests under debug
  • New output of parse errors needs to be introduced to baseline of testUsdviewFileFormatArguments5
  • Small issues with evaluating whether certain characters can be included in certain rules such that when they are parsed these characters are accounted for because they are the same as the 'split' character
  • Proper export of template specializations to be used downstream in derived parsers

@jesschimein
Copy link
Collaborator

Filed as internal issue #USD-8970

- Separated out existing PEGTL path parser into its own set of header
  / source files in preparation for it to be used directly in
  a PEGTL based text file format parser
- Explicitly namespaced PEGTL types
@nvmkuruc nvmkuruc force-pushed the text_file_format_parser branch from 23a2fa0 to 7eae6c4 Compare December 1, 2023 21:37
- Extracted all helper methods from existing yacc parser
- Namespaced methods and moved to new location in preparation
  for use by a PEGTL Text File Format Parser
@nvmkuruc nvmkuruc force-pushed the text_file_format_parser branch from 7eae6c4 to 62d0d16 Compare December 1, 2023 22:25
- Extracted all helper methods from existing yacc parser
- Namespaced methods and moved to new location in preparation
  for use by a PEGTL Text File Format Parser
@nvmkuruc nvmkuruc force-pushed the text_file_format_parser branch from 62d0d16 to 93c3fd9 Compare December 1, 2023 22:34
@erslavin erslavin mentioned this pull request Dec 19, 2023
2 tasks
@erslavin erslavin closed this Dec 19, 2023
@erslavin
Copy link
Contributor Author

Closed and replaced by #2879

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants