j***@jptechnical.co.uk
2013-06-16 18:45:10 UTC
I've just completed a *PLY* project to do some preprocessing on a 'C'
source file for a PIC microcontroller (specifically to handle my version of
the #rom directive converting it to the compilers version). This is working
just as I want but I have only defined the grammar for the specific #rom
statements I wish to process.
It would be convenient, in the same file, to have various other 'C'
statements (free from text), #define or typedefs for example. Can someone
suggest a way to do this without having to put the complete or subsections
of the 'C' grammar into my preprocessor. That is to say I want the
preprocessor to copy all non #rom statements (ie lines of other 'C' code)
'as is' to the output file. It is only the #rom statements I need to
process on the way to the output file.
Needless to say the 'free form text' and the #rom statements overlap in
terms of some tokens. The free from text may include 'C' expressions as may
a #rom statement, also literals such as { } ( ) @ etc.
Any ideas would be appreciated.
Regards,
John
source file for a PIC microcontroller (specifically to handle my version of
the #rom directive converting it to the compilers version). This is working
just as I want but I have only defined the grammar for the specific #rom
statements I wish to process.
It would be convenient, in the same file, to have various other 'C'
statements (free from text), #define or typedefs for example. Can someone
suggest a way to do this without having to put the complete or subsections
of the 'C' grammar into my preprocessor. That is to say I want the
preprocessor to copy all non #rom statements (ie lines of other 'C' code)
'as is' to the output file. It is only the #rom statements I need to
process on the way to the output file.
Needless to say the 'free form text' and the #rom statements overlap in
terms of some tokens. The free from text may include 'C' expressions as may
a #rom statement, also literals such as { } ( ) @ etc.
Any ideas would be appreciated.
Regards,
John
--
You received this message because you are subscribed to the Google Groups "ply-hack" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ply-hack+***@googlegroups.com.
To post to this group, send email to ply-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ply-hack/d8801853-3b90-41b2-a929-6ea2f97ece19%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
You received this message because you are subscribed to the Google Groups "ply-hack" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ply-hack+***@googlegroups.com.
To post to this group, send email to ply-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ply-hack/d8801853-3b90-41b2-a929-6ea2f97ece19%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.