inducer / inducer/pycparserext
Problems with parsing "Extended Asm"
- Dominant language
- Python
- Stars
- 91
- Forks
- 30
- PR merge metrics
- No merged PRs in 30d
Description
When I was tried to parse source with several asm instructions (described at http://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html)
I faced with fails to parse similar pieces:
1 . void read_tsc(void) {
long val;
**asm**("rdtsc" : "=A" (val));
}
whereas _asm(''nothing")_ mistakenly recognized as function call.
2 . void read_tsc(void) {
long val;
asm **volatile**("rdtsc" : "=A" (val));
}
3 . void read_tsc(void) {
long fpenv;
asm(""mtfsf 255,%0"
**: :**
"f" (fpenv));
}
I suppose that highlighted parts are different states for context-free grammar used by pycparserext in whole.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.