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

Token recognition error #39

Open
simonas88 opened this issue Jul 9, 2022 · 0 comments
Open

Token recognition error #39

simonas88 opened this issue Jul 9, 2022 · 0 comments

Comments

@simonas88
Copy link

I'm trying to parse an a2l file using pyA2L library.

Here's a snippet:

  /begin MOD_PAR "D915E_N46A610"
    VERSION "[REDACTED]"
    ADDR_EPK 0x1C21F0
    EPK "[READACTED]"
    CUSTOMER_NO "5"
    USER "GS-ES/EAD1-Richard"
    PHONE_NO ""
    CPU_TYPE "GoldenOak"
    ECU "[REDACTED]"
  /end

When using db.import_a2l to parse a file containg the snippet above I get a bunch parsing errors (line 880 is CUSTOMER_NO):

[INFO (pya2l.Preprocessor)]: Pre-processing 'definitions.a2l'[UTF-8-SIG]
[INFO (pya2l.DB)]: Parsing pre-processed data ...
definitions.a2l::line 880:17 extraneous input '5' expecting {'VERSION', 'ADDR_EPK', 'CPU_TYPE', 'CUSTOMER', 'CUSTOMER_NO', 'ECU', 'ECU_CALIBRATION_OFFSET', 'EPK', 'NO_OF_INTERFACES', 'PHONE_NO', 'SUPPLIER', 'SYSTEM_CONSTANT', 'USER', '/begin', '/end'}
definitions.a2l::line 881:12 token recognition error at: '-E'
definitions.a2l::line 881:15 token recognition error at: '/E'
definitions.a2l::line 881:20 token recognition error at: '-R'

Is there a problem with the library or do I need to fix my a2l file?

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

No branches or pull requests

1 participant