Commit Graph

49 Commits

Author SHA1 Message Date
Reijo Tomperi 496b09a377 Remove reduntant if sentences that are never executed. 2008-12-21 19:24:21 +00:00
Reijo Tomperi e272630604 Copyright and app name changed in each file 2008-12-19 21:15:06 +00:00
Nicolas Le Cam a5fa323a0b Formatting: uniformize end of lines. 2008-12-18 21:28:57 +00:00
Daniel Marjamäki c56779c9ae variable id : set variable ids for struct members 2008-12-18 18:56:25 +00:00
Nicolas Le Cam fec777057d Formatting: uniformize end of lines. 2008-12-14 17:05:21 +00:00
Reijo Tomperi 9c9740821f Old TODO comment removed 2008-12-13 20:45:48 +00:00
Reijo Tomperi 1d401905b0 More tests added for simplifyKnownVariables() 2008-12-13 20:43:54 +00:00
Daniel Marjamäki 6269c3cbbd tokenizer : updated simplifyKnownVariables 2008-12-13 20:22:45 +00:00
Reijo Tomperi 538f259911 Started making simplifyKnownVariables(), but it is very much unfinished. Two test cases added for it. 2008-12-13 19:44:56 +00:00
Nicolas Le Cam 661068bcd4 Formatting: uniformize end of lines. 2008-12-13 11:39:36 +00:00
Reijo Tomperi 4e8e35f666 TOKEN: Patterns like "if ; !!else" are now possible 2008-12-12 21:00:25 +00:00
Nicolas Le Cam aaabacfe87 Formatting: uniformize end of lines. 2008-12-09 00:49:32 +00:00
Nicolas Le Cam eb80c9786f Revert revisions 627 and 628 2008-12-08 23:41:34 +00:00
Nicolas Le Cam e8d2c7cfb3 Formatting: uniformize end of lines (part 2) 2008-12-08 23:10:13 +00:00
Nicolas Le Cam 625b77ec33 Formatting: uniformize end of lines. 2008-12-08 23:06:19 +00:00
Reijo Tomperi 51024235a3 Refactoring: TOKEN::next renamed to _next, getter and setter functions for it added next() and next(TOKEN*). 2008-12-08 21:49:05 +00:00
Reijo Tomperi 25847fdec4 Refactoring: TOKEN::varId was moved from public to private 2008-12-08 17:45:55 +00:00
Daniel Marjamäki 3619552e38 Variable Id : First simple implementation 2008-12-08 17:28:44 +00:00
Nicolas Le Cam 8c8435feb8 Fix two warnings 2008-12-08 14:20:20 +00:00
Reijo Tomperi b2e55216ab Fixed bug in TOKEN::multiCompare. "abc" and "a" were matched. 2008-12-07 19:06:01 +00:00
Daniel Marjamäki bdea6bd152 tokenizer : The token "a" shouldn't match the pattern "abc|def", added assertion to a test
but it's currently commented because it fails
2008-12-07 17:28:26 +00:00
Daniel Marjamäki 2cc7dbda67 Fixed so that the expected and actual values in asserts are not mixed 2008-12-06 12:57:06 +00:00
Daniel Marjamäki 4c92c8e6e7 testtokenize: Added TestTokenize::match1 that makes sure the old
matching of "|" and "||" still works
2008-12-06 12:54:40 +00:00
Reijo Tomperi a4d4305919 Bug fix: Minor bug in previous commit, test added to catch that bug also. 2008-12-04 21:52:40 +00:00
Reijo Tomperi c958482196 TOKEN: Match() function improved, %any% and const|volatile kind of patterns are now accepted. Simplified comparing on tokenize.cpp. 2008-12-04 21:48:15 +00:00
Daniel Marjamäki 3820a26e1c Tokenizer: Simplify numeric comparisons 2008-12-04 19:32:26 +00:00
Daniel Marjamäki e9a533fb32 TestTokenize: Use TOKEN::str() instead of TOKEN::aaaa() where possible 2008-12-04 07:35:48 +00:00
Reijo Tomperi 5eb653911e Tokenizer: Fixed bug, const and volatile functions were not recogniced
by fillFunctionList()
2008-12-03 20:22:48 +00:00
Daniel Marjamäki 8845e8bc89 Refactoring: Tokenizer - renaming functions, moved the 'tokenizeCode' to the private section 2008-11-25 18:34:51 +00:00
Daniel Marjamäki bc267bbca5 TOKEN: Refactoring the 'str' member variable 2008-11-24 19:38:08 +00:00
Reijo Tomperi 29a1468523 Refactoring: Renamed some member variables: variable -> _variable 2008-11-23 11:08:07 +00:00
Daniel Marjamäki 0c9784fc0c Refactoring: The Tokenizer::FillFunctionList has no use of its parameter. Enabled the CheckFunctionUsage 2008-11-23 06:21:44 +00:00
Reijo Tomperi b8c7543149 Bug fix: Didn't compile on Debian, missing #include 2008-11-22 22:54:56 +00:00
Daniel Marjamäki 0d3a99adb0 increased constness of member variable _tokenizer in the Check* classes 2008-11-22 20:00:36 +00:00
Daniel Marjamäki 07b5ebe72b Check Function Usage: Removed much of the old checking and made some refactoring 2008-11-22 19:39:12 +00:00
Daniel Marjamäki d68e2ae966 tokenizer: simplifyConditions tries to simplify conditions.. those that are always true to '( true )' and those that are always false to '( false )' 2008-11-22 17:53:22 +00:00
Daniel Marjamäki 2db69e6072 tokenizer: Added DeallocateTokens to the destructor so it's not necessary to cleanup manually 2008-11-22 09:44:02 +00:00
Daniel Marjamäki 9ce8918895 tokenizer: Added functions "alwaysTrue" and "alwaysFalse" to check if a
condition is always true / false
2008-11-22 09:32:57 +00:00
Reijo Tomperi 51e9d98a5f Refactoring: Errors are no longer logged via global functions to a global stream. Instead callback function is used via interface.
ErrorLogger interface was added and taken into use.
2008-11-20 22:19:26 +00:00
Daniel Marjamäki dd5abf2c05 cleanup 2008-11-20 19:23:05 +00:00
Daniel Marjamäki 63bc26d662 Function list: Remove functions with duplicate names to prevent false positives 2008-11-20 19:18:55 +00:00
Reijo Tomperi aa579911ab Refactoring: Global variable tokenes is no more. 2008-11-16 15:58:52 +00:00
Reijo Tomperi 1efb4c95a6 Refactoring: Global variable Files is no more. Use tokenizer->getFiles() to get a pointer to it. 2008-11-13 22:39:47 +00:00
Reijo Tomperi 0b1ee10353 Refactoring: tokens_back and TypeSize are no longer global variables 2008-11-12 22:50:40 +00:00
Reijo Tomperi ef9f472188 Refactoring: Tokenizer class added, functions still mostly static and
using globals
2008-11-09 07:19:53 +00:00
Reijo Tomperi a9e1fe5637 FileLister.* and testtokenize.cpp, changed encoding to utf-8 2008-11-06 19:40:49 +00:00
Daniel Marjamäki eb86a0fc34 Tokenizer: Skip inline assembly (Bug 2220727) 2008-11-05 07:28:40 +00:00
Daniel Marjamäki 5e4a7fefe5 Tokenize: Changed the array CurrentToken to a std::string 2008-11-04 19:09:31 +00:00
Daniel Marjamäki 375801f51e Tokenizer: Handle '\' in preprocessor lines 2008-11-03 07:53:30 +00:00