The project is used for removing the comments in a given input C file using JavaScript and PHP regex.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
Both the programs are running and they remove the valid comments from the cycle.c file and give an error message to the invalid comments.
Instructions to run Node.js file The program has been written in NodeJS there is no need to install any independencies. *Make sure that the cycle.c file is in the same directory as the node.js file Run the following command to store output in an output.c file: node node1.js > output.c The node.js program will store the output in the output.c file with all valid comments removed and the invalid comments have been given an error message. OR
Use the following command to run the program to get output on command line: node node1.js The node.js program will open the input file in the command line with all valid comments removed and the invalid comments have been given an error message.
Instructions to run PHP file. The file is not hard-coded hence it will run from any local-server. You can download XAMPP from the following link: https://www.apachefriends.org/download.html Installing XAMPP on a Mac
- Download XAMPP for Mac OSX - Be sure to select the proper version of PHP (5.6.40 / PHP 5.6.40 or any other version will work)
- Open the downloaded file (the DMG-Image).
- Drag and drop the XAMPP folder into your Applications folder.
Starting XAMPP on OSX
- To start XAMPP simply open XAMPP Control (by going to /Applications/XAMPP/manager-osx.app in Finder) and start Apache and MySQL on the Manage Servers tab.
Place the file in any directory and just give the complete path of the file and the output will be displayed in a browser. e.g: http://localhost:8080/test/strip.php