Skip to content

Support dimableIdentifierType-style names #119

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

Merged
merged 1 commit into from
May 12, 2020

Conversation

gkelly
Copy link
Contributor

@gkelly gkelly commented May 10, 2020

As of CMSIS-SVD 1.3.3 the schema allows for dimableIdentifierType
names in several places. This change uses the regular expressions from
the CMSIS-SVD 1.3.6 XSD for both dimableIdentifierType and
identifierType. While there is prose in ARM documentation suggesting
that all names must be valid ANSI C identifiers this is not born out by
the schema constraints.


This appears to have a net positive effect on the cargo test results:
Before: test result: FAILED. 253 passed; 381 failed; 0 ignored; 0 measured; 0 filtered out
After: test result: FAILED. 424 passed; 210 failed; 0 ignored; 0 measured; 0 filtered out

@gkelly gkelly requested a review from a team as a code owner May 10, 2020 15:02
@burrbull
Copy link
Member

https://docs.rs/once_cell/1.3.1/once_cell/sync/struct.Lazy.html

static PATTERN: Lazy<Regex> = Lazy::new(|| {
    Regex::new("^[_A-Za-z0-9]*$").unwrap()
});

@gkelly
Copy link
Contributor Author

gkelly commented May 10, 2020

https://docs.rs/once_cell/1.3.1/once_cell/sync/struct.Lazy.html

static PATTERN: Lazy<Regex> = Lazy::new(|| {
    Regex::new("^[_A-Za-z0-9]*$").unwrap()
});

Done.

As of CMSIS-SVD 1.3.3 the schema allows for `dimableIdentifierType`
names in several places. This change uses the regular expressions from
the CMSIS-SVD 1.3.6 XSD for both `dimableIdentifierType` and
`identifierType`. While there is prose in ARM documentation suggesting
that all names must be valid ANSI C identifiers this is not born out by
the schema constraints.
@gkelly
Copy link
Contributor Author

gkelly commented May 10, 2020

Ran cargo fmt in latest push.

@gkelly
Copy link
Contributor Author

gkelly commented May 12, 2020

I believe this is ready for review, but I'm unsure what the correct way to request reviewers on this repo is. Is there a queue I can put this in? Not trying to rush anyone, just want to make sure it doesn't fall through the cracks. :)

@burrbull
Copy link
Member

bors try

bors bot added a commit that referenced this pull request May 12, 2020
@bors
Copy link
Contributor

bors bot commented May 12, 2020

try

Build succeeded:

@burrbull
Copy link
Member

bors r+

@bors
Copy link
Contributor

bors bot commented May 12, 2020

Build succeeded:

@bors bors bot merged commit 1e8b49a into rust-embedded:master May 12, 2020
@gkelly gkelly deleted the dimable-names branch May 12, 2020 11:55
gkelly added a commit to gkelly/atsamd that referenced this pull request May 14, 2020
A pair of changes (rust-embedded/svd#119, rust-embedded/svd2rust#444)
recently went into the `svd2rust` and `svd-parser` crates. Until these
changes are part of a release have `update.sh` pull a fork of `svd2rust`
that uses the master version of `svd-parser`.
gkelly added a commit to gkelly/atsamd that referenced this pull request May 14, 2020
A pair of changes (rust-embedded/svd#119, rust-embedded/svd2rust#444)
recently went into the `svd2rust` and `svd-parser` crates. Until these
changes are part of a release have `update.sh` pull a fork of `svd2rust`
that uses the master version of `svd-parser`.

See atsamd-rs#195.
gkelly added a commit to gkelly/atsamd that referenced this pull request May 14, 2020
A pair of changes (rust-embedded/svd#119, rust-embedded/svd2rust#444)
recently went into the `svd2rust` and `svd-parser` crates that improves
the handling of cluster names and the generation of full type paths for
cluster instances. Until these changes are part of a release have
`update.sh` pull a fork of `svd2rust` that uses the master version of
`svd-parser`.

See atsamd-rs#195.
sajattack pushed a commit to atsamd-rs/atsamd that referenced this pull request May 16, 2020
A pair of changes (rust-embedded/svd#119, rust-embedded/svd2rust#444)
recently went into the `svd2rust` and `svd-parser` crates that improves
the handling of cluster names and the generation of full type paths for
cluster instances. Until these changes are part of a release have
`update.sh` pull a fork of `svd2rust` that uses the master version of
`svd-parser`.

See #195.
kaizensparc pushed a commit to kaizensparc/atsamd that referenced this pull request Dec 24, 2021
A pair of changes (rust-embedded/svd#119, rust-embedded/svd2rust#444)
recently went into the `svd2rust` and `svd-parser` crates that improves
the handling of cluster names and the generation of full type paths for
cluster instances. Until these changes are part of a release have
`update.sh` pull a fork of `svd2rust` that uses the master version of
`svd-parser`.

See atsamd-rs#195.
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.

2 participants