Skip to content

Problems with parsing "Extended Asm" #3

@Druidos

Description

@Druidos

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions