[BLACKBOX] Grammar snippet

From: [at]} <Aubrey.McIntosh{>
Date: Thu, 17 Mar 2011 14:24:01 -0500

----boundary-LibPST-iamunique-1715681891_-_-
Content-type: text/plain

The following snippet of grammar is related to ANSI C. A Google
search will give much more context.
I have downloaded TCC, the tiny C compiler; sqlite, a nice database;
and Half, a built in command extension example for sqlite, written in
C.
The extension does build and work for me. A pro-forma dll that I
build in Component Pascal will at start execution and terminate
gracefully in that environment.

Now, I need to translate the pre-processed source to Half to CP, in
order to proceed.

Several days and attempted approaches lie behind me, including C2CP.
I now have a Coco grammar that scans most of the particular data
structure that I need.

I wonder if anyone has any ideas how to translate the following
production to something that Coco will like?

direct_declarator = id
| '(' declarator ')'
| direct_declarator '[' const_exp ']'
| direct_declarator '[' ']'
| direct_declarator '(' param_type_list ')'
| direct_declarator '(' id_list ')'
| direct_declarator '(' ')'
                        .


-- 
Aubrey McIntosh, Ph.D.
1502 Devon Circle
Austin TX 78723-1814
http://home.grandecom.net/~amcintosh/aubrey/Search/
----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-1715681891_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwIFRoZSBmb2xsb3dpbmcgc25pcHBldCBvZiBncmFt
bW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0byBzb21ldGhpbmcgdGhh
dCBDb2NvIHdpbGwgbGlrZT9ccGFyDQpccGFyDQpkaXJlY3RfZGVjbGFyYXRvclx0YWIgPSBpZFxw
YXINClx0YWIgXHRhYiBcdGFiIHwgJygnIGRlY2xhcmF0b3IgJyknXHBhcg0KXHRhYiBcdGFiIFx0
YWIgfCBkaXJlY3RfZGVjbGFyYXRvciAnWycgY29uc3RfZXhwICddJ1xwYXINClx0YWIgXHRhYiBc
dGFiIHwgZGlyZWN0X2RlY2xhcmF0b3IgJ1snXHRhYiBcdGFiICddJ1xwYXINClx0YWIgXHRhYiBc
dGFiIHwgZGlyZWN0X2RlY2xhcmF0b3IgJygnIHBhcmFtX3R5cGVfbGlzdCAnKSdccGFyDQpcdGFi
IFx0YWIgXHRhYiB8IGRpcmVjdF9kZWNsYXJhdG9yICcoJyBpZF9saXN0ICcpJ1xwYXINClx0YWIg
XHRhYiBcdGFiIHwgZGlyZWN0X2RlY2xhcmF0b3IgJygnXHRhYiBcdGFiICcpJ1xwYXINClx0YWIg
XHRhYiBcdGFiIC5ccGFyDQpccGFyDQpccGFyDQotLSBccGFyDQpBdWJyZXkgTWNJbnRvc2gsIFBo
LkQuXHBhcg0KMTUwMiBEZXZvbiBDaXJjbGVccGFyDQpBdXN0aW4gVFggNzg3MjMtMTgxNFxwYXIN
Cmh0dHA6Ly9ob21lLmdyYW5kZWNvbS5uZXQvfmFtY2ludG9zaC9hdWJyZXkvU2VhcmNoL1xwYXIN
ClxwYXINClxwYXINCi0tLS1ccGFyDQpUbyB1bnN1YnNjcmliZSwgc2VuZCBhIG1lc3NhZ2Ugd2l0
aCBib2R5ICJTSUdOT0ZGIEJMQUNLQk9YIiB0byBMSVNUU0VSVkBMSVNUUy5PQkVST04uQ0hccGFy
DQp9
----boundary-LibPST-iamunique-1715681891_-_---
Received on Thu Mar 17 2011 - 20:24:01 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:30:16 UTC