Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
fa833f96
Commit
fa833f96
authored
Sep 06, 2016
by
Krzysztof Blazewicz
Browse files
stmhal/make-stmconst.py: fix regex's to work with current CMSIS
CMSIS v2.5.0 removed all uint32_t casts and uses only Misra Cast (U)
parent
7928b3e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
stmhal/make-stmconst.py
View file @
fa833f96
...
...
@@ -29,9 +29,9 @@ class Lexer:
re_comment
=
r
'(?P<comment>[A-Za-z0-9 \-/_()&]+)'
re_addr_offset
=
r
'Address offset: (?P<offset>0x[0-9A-Z]{2,3})'
regexs
=
(
(
'#define hex'
,
re
.
compile
(
r
'#define +(?P<id>[A-Z0-9_]+) +\(\(uint32_t\)(?P<hex>0x[0-9A-F]+)
\)
($| +/\*)'
)),
(
'#define hex'
,
re
.
compile
(
r
'#define +(?P<id>[A-Z0-9_]+) +
(?:
\(\(uint32_t\)
)?
(?P<hex>0x[0-9A-F]+)
U?(?:\))?
($| +/\*)'
)),
(
'#define X'
,
re
.
compile
(
r
'#define +(?P<id>[A-Z0-9_]+) +(?P<id2>[A-Z0-9_]+)($| +/\*)'
)),
(
'#define X+hex'
,
re
.
compile
(
r
'#define +(?P<id>[A-Za-z0-9_]+) +\((?P<id2>[A-Z0-9_]+) \+ (?P<hex>0x[0-9A-F]+)\)($| +/\*)'
)),
(
'#define X+hex'
,
re
.
compile
(
r
'#define +(?P<id>[A-Za-z0-9_]+) +\((?P<id2>[A-Z0-9_]+) \+ (?P<hex>0x[0-9A-F]+)
U?
\)($| +/\*)'
)),
(
'#define typedef'
,
re
.
compile
(
r
'#define +(?P<id>[A-Z0-9_]+(ext)?) +\(\([A-Za-z0-9_]+_TypeDef \*\) (?P<id2>[A-Za-z0-9_]+)\)($| +/\*)'
)),
(
'typedef struct'
,
re
.
compile
(
r
'typedef struct$'
)),
(
'{'
,
re
.
compile
(
r
'{$'
)),
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment