| | |
New Parser Generator
Please support our Computer Science advertiser: Learn about neural networks and artificial intelligence.
![]() |
•
•
Join Date: Dec 2008
Posts: 7
Reputation:
Solved Threads: 0
Come on. Please don't insult me. Look, I fixed the file up at the link I had given you - sorry I was careless about leaving gets out.
http://www.uweb.ucsb.edu/~frenchenee...Calculator.cpp
That does use gets, and it doesn't work properly. I shouldn't have said "crash" - that was misleading. The string is not recognized by my parser for some reason, and it fails. Commenting out fgets, and using my code makes it work. I don't believe there is any logical error. This is why I assumed something was wrong with the compiler.
Why? I would be very surprised if 'gets' didn't use 'fgets' under the covers.
http://www.uweb.ucsb.edu/~frenchenee...Calculator.cpp
That does use gets, and it doesn't work properly. I shouldn't have said "crash" - that was misleading. The string is not recognized by my parser for some reason, and it fails. Commenting out fgets, and using my code makes it work. I don't believe there is any logical error. This is why I assumed something was wrong with the compiler.
•
•
•
•
Instead of using gets, you should use fgets.
![]() |
Similar Threads
- simple calculator using a scanner (re2c) and a parser generator (lemon) (C)
- xml to object and vice versa (Java)
- Visual C++ and Lex/Yacc (IT Professionals' Lounge)
- Why are there so many languages? (Computer Science)
- Oracle and PostreSQL grammar classes (Computer Science)
- XHTML Complient parser? (HTML and CSS)
Other Threads in the Computer Science Forum
- Previous Thread: flowchart done needs help ...take a look
- Next Thread: I need some tips on creating a flowchart.
| Thread Tools | Search this Thread |
Tag cloud for Computer Science
ai algorithm algorithms assignment assignmenthelp assignments automata battery bigbrother binary bittorrent bizarre bletchleypark blogging bomb business codebreaker compiler computer computerscience connect conversion csc data dataanalysis dataintepretation development dfa dissertation dissertationthesis dissertationtopic employment energy extensions foreclosure foreclosuresoftware fuel geeks givemetehcodez government graphics hardware history homeowners homework homeworkassignment homeworkhelp humor ibm idea ideas internet iphone ipod jobs kindle laser laws lazy linkbait lsmeans mainframes marketing mining mobileapplication msaccess nano netbeans news os p2p parser piracy piratebay principles programming rasterizer research sam-being-cute sas science security simulation software spoonfeeding spying sql stephenfry student supercomputer supercomputing sweden technology tree turing turingtest two'scompliment virus warehouse ww2






