Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Development #4

Merged
merged 31 commits into from
Jul 16, 2024
Merged

Development #4

merged 31 commits into from
Jul 16, 2024

Conversation

mrom1
Copy link
Owner

@mrom1 mrom1 commented Jul 16, 2024

Modernization and Code Quality Update #2

Breaking Changes:

  • Requires Python >=3.11 (Dropped Python 2.7 support)
  • Updated A2L standard to version 1.7.1
  • Complete refactoring of the initial version
  • Setup changed to support PyPI distribution

Other Changes:

  • Added abstract converters and example converters for JSON and YAML
  • Introduced AST class for parsed content, functioning as a dictionary with helper functions
  • Implemented Command Line Interface for direct access to the parsed AST object
  • Enhanced YACC and Lexer logic for more robust error handling
  • Introduced A2L Validator for general syntax checking
  • Transitioned from unittest to pytest

mrom1 added 30 commits March 25, 2023 12:28
Changes:
- Changes for modernization still in progress
- Remove of python 2.7 support
- flake8 workflow added
- added AST class
- added tests
Changes:
- a2l_lex.py: Updated the A2L Lexer
- test_unit_a2l_lex.py: Pytest added
Changes:
- requirements.txt: added dependencies "lxml", "loguru", "readline", "alive-progress"
- added cli module: allows user to use the a2lparser as an interpreter
- added A2LValidator: syntax check for A2L files
- added AbstractSyntaxTree: utility dictionary class built for accessing the AST
- added rules module: hold yacc grammar in different files for better overview
-  error resolve function implemented in rules
Changes:
- added AbstractSyntaxTree function find_section, find_value
- added more test cases for AbstractSyntaxTree
Changes in progress:
- Refactor lexer, yacc and rules
Changes:
- Windows compability on CLI
- Beautify code, parser logo, loguru logger
Changes:
- Lexer rework done
Changes:
- command_prompt: Switch from "pyreadline" dependency to "prompt_toolkit"
- a2l_lex fix: Allow only exact matches of keywords for A2L types and sections
- lex tests: move lexer test cases
Changes:
- Refactoring of grammar rules
- Refactoring of lex tokens, keywords
- Refactoring of test cases for grammar rules
Changes:
- fix build.yml: sperate linux and windows package building
Changes:
- remove old unittest references
Changes:
- Adding "a2lparser_history" file for history of CLI usage
- Adding "logs" folder
- Minor fixes
Changes:
- Code style for grammar rules
Changes:
- Basic error handling
- testcase for "ASAP2_VERSION"  added
- Minor restructuring
Changes:
- created ASTStack, work in progress
- extend error handling, work in progress
Major Changes:
- Updated to ASAM v1.7.1 Standard (Breaking Changes!)
- Error Handling grammar defined (no error resolve)
- New Standard Config (ASAP2_MCD_v171.cfg)
Changes:
- Added A2L to XML converter
- Added xmltodict dependency
- Fixed spelling mistakes
Changes:
- Added more test cases for new A2L 1.7.1 version
- various bug fixes
Changes:
- Completed upgrade to A2L version 1.7.1
- Minor fixes
Changes:
- Added YAML Converter
- Added JSON Converter
- Added XML Converter
- Added A2L Testfiles

TODO's left:
- Error resolve update and testcases
- Finish Integration tests
Changes:
- Added Integration tests
- Reworked A2L Validator module
- Added ASTNodeStack module
- Minor Fixes with optional parameters (VAR_CHARACTERISITIC, VAR_CRITERION, VIRTUAL_CHARACTERISTIC)
Changes:
- Completed simple error handling with discarding invalid datatypes or tokens
Changes:
- Use same docstring style for functions.
Changes:
- Adjusted README to new updated version of a2lparser
- Changes pyproject.toml for pypi
- Improved CLI with code library (removed direct eval call)
- Moved converts from a2l subfolder to converters under root package folder
Changes:
- fixed: correct validation of c-style multiline comments like "/********/".
- fixed: whitespace in AMLTemplate and affected testfiles.
- fixed: a2lparser checks validity of --output-dir argument now
Changes:
- fixed creating of log (prompt history) file on CLI mode for distribution
Changes:
- fixed creating of log (prompt history) file on CLI mode for distribution
- fixed workflows for windows and removed need for tests to pass style check.
@mrom1 mrom1 self-assigned this Jul 16, 2024
@mrom1 mrom1 linked an issue Jul 16, 2024 that may be closed by this pull request
@mrom1 mrom1 merged commit 6af0041 into main Jul 16, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Modernization and Code Quality
1 participant