| Felix Halim .NET | ||
|
University Experience
IOI 2002 Yong In, Korea
ACM ICPC Regional Manila 2003
ACM ICPC Regional Manila 2004
ACM ICPC Regional Manila 2005
ACM ICPC Regional Kaohsiung 2006
ACM ICPC Regional Singapore 2007
ACM ICPC Regional Jakarta 2008 (ext)
ACM ICPC Regional Jakarta 2009 (ext)
ACM ICPC Regional Jakarta 2010
ACM ICPC Regional Jakarta 2012 - Problem H (new!)
ACM ICPC World Final Tokyo 2007
Google India Code Jam 2005
Google India Code Jam 2006
Indonesia National Contest 2007
Indonesia National Contest 2008
Indonesia National Contest 2010
Facebook Hacker Cup 2011
|
||
Source Code Formatter, Painter, and ValidationThis is my Computing Theory Project. In this project, I choose to create program that takes an input of a source code (SC) of valid C language (can be compiled one). Then, no matter how miserable the source code is, my program would parse the source code, and reformat it. Meaning that the indentation of the SC will be corrected, the keywords will be colored, and hopefuly will notify every errors that occurs during the parsing. The algorithm I use is a recursive descent parser. It's a top down parser. Unfortunately, because C language can be quite complex, I cannot guarantee that my program can parse tricky SC. Since sometimes, the error / validity is determined by the syntax, not the parser :O Additional feature would be : the formatter supports new data types created by "typedef" keyword. My program would be able to allocate this new data type and remember it, so it can color the new data type with different color. WARNING: ALL structure must be defined before it can be used! -> although C compiler allows otherwise.
Try put ONLY valid (can be compiled) C source code in the textarea below, and click "Format, Paint and Validate" button to format it. Or just try with the sample SC (solution for Problem number 489). I haven't put any prevention of NON VALID Source Code! Also remember that I use Javascript for this project! Means that this program is Open Source. Also note that Javascript can be executed offline (for many browsers). So, you are able to use this page offline :) I Love Javascript!
My program is not full yet. I'm still trying finding bugs. Note: my program leaves comment as it is. Maybe the comment would look miserable :)
|
||