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

Style error leads to parser and model errors #1268

Closed
treiher opened this issue Dec 2, 2022 · 1 comment
Closed

Style error leads to parser and model errors #1268

treiher opened this issue Dec 2, 2022 · 1 comment
Assignees
Labels
bug small Effort of one person-day or less specification Related to specification package (e.g., specification parsing)

Comments

@treiher
Copy link
Collaborator

treiher commented Dec 2, 2022

Adding a style error to an otherwise correct specification leads to parser and model errors. This shouldn't be the case.

Example

diff --git a/examples/apps/ping/specs/ipv4.rflx b/examples/apps/ping/specs/ipv4.rflx
index f331eae82..49ac0da5d 100644
--- a/examples/apps/ping/specs/ipv4.rflx
+++ b/examples/apps/ping/specs/ipv4.rflx
@@ -43,7 +43,7 @@ package IPv4 is
             with Size => Total_Length * 8 - (IHL * 32);
       end message;
 
-   for Packet use (Payload => ICMP::Message)
+for Packet use (Payload => ICMP::Message)
       if Protocol = P_ICMP;
 
 end IPv4;
$ rflx check specs/ipv4.rflx
Parsing specs/ipv4.rflx
Parsing specs/ipv4_option.rflx
Parsing specs/icmp.rflx
Processing IPv4
Processing IPv4_Option
Processing ICMP
specs/ipv4.rflx:46:0: style: error: unexpected keyword indentation (expected 3, 12 or 15) [indentation]
specs/ipv4.rflx:17:32: parser: error: undefined element type "IPv4_Option::Option"
specs/ipv4.rflx:40:20: parser: error: undefined type "IPv4::Options"
specs/ipv4.rflx:40:10: model: error: missing type for field "Options" in "IPv4::Packet"
specs/ipv4.rflx:46:1: parser: error: undefined type "IPv4::Packet" in refinement
specs/ipv4.rflx:46:28: parser: error: undefined type "ICMP::Message" in refinement of "IPv4::Packet"
@treiher treiher added bug specification Related to specification package (e.g., specification parsing) small Effort of one person-day or less labels Dec 2, 2022
@treiher treiher added this to Medium in RecordFlux Future via automation Dec 2, 2022
@treiher treiher self-assigned this Aug 21, 2023
@treiher
Copy link
Collaborator Author

treiher commented Aug 21, 2023

Fixed in version 0.12.0.

@treiher treiher closed this as completed Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug small Effort of one person-day or less specification Related to specification package (e.g., specification parsing)
Projects
No open projects
Development

No branches or pull requests

1 participant