Skip to content

fix def syntax error in testdata/lefdef/viasize2/test.def #1433

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

Closed
stefanottili opened this issue Jul 29, 2023 · 3 comments
Closed

fix def syntax error in testdata/lefdef/viasize2/test.def #1433

stefanottili opened this issue Jul 29, 2023 · 3 comments

Comments

@stefanottili
Copy link

stefanottili commented Jul 29, 2023

test.or:

read_lef testdata/lefdef/viasize2/test.lef
read_def -continue_on_errors testdata/lefdef/viasize2/test.def
openroad test.or
ERROR (DEFPARS-5500): Def parser has encountered an error in file testdata/lefdef/viasize2/test.def at line 31, on token MASK.
diff klayout/testdata/lefdef/viasize2/test.def test_fixed.def
31c31
<   + ROUTED M1 30 + MASK 2 ( 0 0 15 ) ( 100 0 0 ) VIA1_small ( 100 100 10 )
---
>   + ROUTED M1 30 ( 0 0 15 ) MASK 2 ( 100 0 0 ) VIA1_small ( 100 100 10 )
@klayoutmatthias
Copy link
Collaborator

Is this really a KLayout error? This message ("DEFPARS-5500") is not mine.

Matthias

@stefanottili
Copy link
Author

stefanottili commented Jul 29, 2023 via email

@klayoutmatthias
Copy link
Collaborator

You're right, the DEF sample was kind of nonsense and this error can be captured.

In general however, the DEF parser is sloppy (means: not always based on a formal syntax) and will accept some invalid DEF files without error. Accepting stray "+" is one example. In other cases I simply skip sections. Hope is that this way newly introduced keywords will not make the reader fail automatically.

Matthias

klayoutmatthias added a commit that referenced this issue Aug 8, 2023
Fixed #1433 (def syntax error not captured)
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

2 participants