(mm) | Java applet to unscramble C declaration | |||||||||||||||||||||
Home | Software | Count | ||||||||||||||||||||||
Software: GWT GWTOAuthLogin iPhone/iPad iOSExamples BiteByteConverter X/Motif ansi xterm grabc mdgclock miv mplaymidi mppp mxascii mcmap mxcmap mxconsole mxkill mxshowfont qtip xmastm yrolo Web privategpt mhttpd web counter upload.pl TimeTrack.pl mod_auth_ldap Games fltkmm iphonemm Go (cross-platform) go-xbuild-go mailsend-go markdown-toc-go gomail-fork githubdownloadcount genmake-go github-profilegen-go hod-go applehealth2csv Java cdcl cdclgwt jdgclock Libraries libcalen libmcfg libsll libmsock Java cdcl cdclgwt jdgclock Libraries libcalen libmcfg libsll libmsock Misc cubic-fix bangla font dpr genmake hod smtp.pl vhtml phones_ldap showpic_ldap mbasecalc fluid_hack kdialppp strip2csv googlecode-upload mrdialog RNCryptor-C MS Windows mwinclip.pl mbasecalc mailsend wiv mouse_mover |
This is a java applet which can unscramble C declarations. The code to parse C declaration is translated from the C code described in K&R, 2nd edition, page 123. Here are some C declarations from K&R, page 122. Try without the applet first and see if you can unscramble them. Examples: int *f() int (*f)() char **argv int (*daytab)[13] void *comp() void (*comp)() char (*(*x())[])() char (*(*x[3])())[5]Also look at the JavaScript version of cdcl
Note: It can not handle declarations with function argument types or qualifiers like const, volatile etc. For Example: it can not handle declaration like: char * const (a[10]) (int **b) Therefore, you have to rewrite the declaration to char *(a[10]) () Rules for unscrambling
ExampleHere is an example of the above rules. Let unscramble it:char (*(*x[3])())[5] CopyrightThis applet is in the public domain. Do anything you like with it. It would be nice but not required if you give me the credit for it.If you are using this applet, please let me know. Bug reports, suggestions are always welcome!
Download
Initial release: Aug-09-1996
URL of this page: |
|||||||||||||||||||||
back | Page updated: Thu Oct 9 05:02:23 2025 GMT Copyright © 2025 muquit@gmail.com. |