Daniel Marjamäki
fc79941828
fix matchcompiler.py
2017-06-05 13:41:38 +02:00
Ayaz Salikhov
3dc4188292
Improve Python code
2017-06-05 13:23:00 +02:00
Ayaz Salikhov
2dd6168258
Improve Python code
2017-06-04 22:51:48 +02:00
Dmitry Marakasov
94d39f6e91
Fix matchcompiler failure in case of parallel build
...
During parallel build, multiple processes will try to create build_dir
in parallel, so the build will fail. Fix that by calling makedirs
unconditionally and ignoring errors from it. If there's actual
problem with directory creation, it'll be caught later by isdir()
check.
2017-05-20 23:25:52 +02:00
Matthias Krüger
c65725cb1b
matchcompiler: don't emmit '!true' or '!false'. Fold to 'false' or 'true'.
2017-04-02 16:35:39 +02:00
PKEuS
0236f67454
Fixed matchcompiler with Python 3.6 on Windows by using UTF-8 as encoding
2017-01-01 10:27:48 +01:00
Matthias Krüger
59bbe6cd42
matchcompiler: simplify some more code
2016-11-26 16:27:39 +01:00
Matthias Krüger
80cb350a6b
matchcompiler: remove redundant variable 'neg' and do some minor reformatting
2016-11-26 15:41:59 +01:00
Matthias Krüger
b687e011f2
matchcompiler: --show-skipped: print locations of skipped patterns in file:line notation.
2016-11-24 00:36:23 +01:00
Frank Zingsheim
f5bf0ff824
Fixed #7392 (matchcompiler fails with python 3.5)
2016-05-04 11:19:07 +02:00
PKEuS
4b9241f643
Removed support for patterns like |a|b and a||b (equal to a|b|)
...
-> Improved performance by 1,3% (non-matchcompiled build)
2016-02-02 11:46:42 +01:00
Albert ARIBAUD (3ADEV)
97b43c78ce
Run all Python code through autopep8
...
Run all Python code through autopep8 as follows:
autopep8 -ri --ignore=E261,E262,E302 --max-line-length 1000 .
E261 or E262 would cause spaces after a comment's hash sign
to be squashed. Since some of the comments in cppcheck's
Python code have space-indented code examples, not ignoring
E261 or E262 would wreck the formatting of those examples.
E302 prevents autopep8 from adding some blank lines.
setting --max-line-width ensures no line will be wrapped.
2016-01-05 13:30:32 +01:00
Daniel Marjamäki
ca4f55ec4c
Cleanup Copyrights. Now all should be just for Cppcheck team.
2016-01-01 23:04:16 +01:00
Lauri Nurmi
996c9244d8
Update copyright year to 2007-2016.
2016-01-01 15:34:45 +02:00
Daniel Marjamäki
8171154e12
Fixed #7230 (Confusing code snippet in error message)
2015-12-31 01:15:49 +01:00
Frank Zingsheim
e0e8c3fe60
Fix #7210 (Compiled match versus parsed match "|a|b")
2015-12-11 20:21:38 +01:00
XhmikosR
7d0075357e
PEP8 fixes.
...
[ci skip]
2015-08-21 11:59:52 +03:00
PKEuS
4d80df2f4a
Added pointer to Type to Token (similar to Token::Variable() and Token::function()):
...
- Accessible via Token::type()
- Renamed former Token::type() to Token::tokType()
- Removed SymbolDatabase::isClassOrStruct()
2015-08-15 11:19:21 +02:00
Frank Zingsheim
907dea92b1
Fixed #6844 (CMake with matchcompiler)
2015-07-23 10:49:53 +02:00
Frank Zingsheim
bac5aac92a
Fixed #6716 (Performance: Alternative String Representation in Match Compiler)
2015-06-07 16:18:40 +02:00
Matthias Krüger
80be769912
matchcompiler: pep8 fixes
2015-03-20 09:32:56 +01:00
PKEuS
688d5d5c54
matchcompiler.py: Added missing parantheses
2015-01-31 12:36:22 +01:00
PKEuS
b2835051df
Refactorization: Renamed Token::Match pattern %var% to %name%, implement new pattern %var% which is true if varId > 0.
2015-01-31 12:32:04 +01:00
Thomas Jarosch
0c21f77873
MC: Add ability to show skipped (=non-compiled) patterns
2015-01-09 22:50:42 +01:00
Thomas Jarosch
5b4f543c3b
Match compiler: Support match patterns with escaped quotes
...
This allows us to compile patterns like 'extern "C"'.
Fixes long standing open issues in the MC unit test.
2015-01-09 22:41:40 +01:00
Thomas Jarosch
07231c832c
Match compiler: Allow multiple spaces / no space at all when searching for C-strings
...
This catches 32 more C strings.
2015-01-09 01:18:50 +01:00
Daniel Marjamäki
ff11ba9847
Updated copyright year to 2015
2015-01-03 12:14:58 +01:00
PKEuS
62d07878d7
Fixed two issues in matchcompiler:
...
- Use correct findmatch or findsimplematch for verification
- Print failing pattern also for findmatch/findsimplematch
2014-07-02 15:25:54 +02:00
PKEuS
ec59f1d9df
matchcompiler.py: Check Token::type() before comparing Token::str() against "||" or "|"
2014-06-30 14:04:18 +02:00
PKEuS
78f0a47170
matchcompiler.py: Show pattern that caused the InternalError
2014-06-30 14:04:18 +02:00
PKEuS
47a1122eb8
Updated matchcompiler to latest changes
2014-06-14 10:57:38 +02:00
Simon Martin
a3d1cac79c
Ticket #5373 : Keep track whether tokens come from a C or C++ file to properly handle %type% in Token::Match with "delete"
2014-03-08 21:26:06 +01:00
Matthias Krüger
a9df4a3288
man, htdocs, gui, test, tools: bump a few more copyrights to 2014
2014-03-03 11:03:17 +01:00
Daniel Marjamäki
398ed973f4
matchcompiler: autopep8 formatting
2013-10-13 11:01:50 +02:00
Daniel Marjamki
45cf562212
matchcompiler: fixed find(simple)match compiler problems.
2013-06-02 13:57:25 +02:00
Daniel Marjamki
35b13da3a5
matchcompiler: find(simple)match doesn't work well. the compiled functions are not static => the wrong function can be executed. this is a quick fix that just disable find(simple)match compiled patterns.
2013-06-02 12:41:34 +02:00
Frank Zingsheim
650027a07a
Fixed #4797 (matchcompiler.py cannot handle overloaded findsimplematch and findmatch)
2013-05-15 18:18:58 +02:00
XhmikosR
ae73466f97
Python scripts: PEP8 fixes
2013-03-03 09:59:16 +01:00
PKEuS
2ad38c8701
Updated matchcompiler to support %cop%
2013-03-01 02:52:44 -08:00
Thomas Jarosch
4fb6751d08
MC: Enable compiled matches for Token::findmatch() and Token::findsimplematch()
...
Speed is exactly the same and the --verify mode of the
match compiler ensured everything works as expected.
2013-01-16 21:50:32 +01:00
Thomas Jarosch
9f9c654621
MC: Implement verify mode for compiled Token::findmatch patterns
2013-01-14 11:18:33 +01:00
Thomas Jarosch
63e18d6b1c
MC: Split _replaceTokenFindMatch() into two small functions
2013-01-14 11:06:59 +01:00
Thomas Jarosch
017783a77e
MC: Save one indentation level
2013-01-14 11:06:55 +01:00
Thomas Jarosch
3bb8237cdc
MC: Turn MatchCompiler tests into python unit test
2013-01-14 11:06:33 +01:00
Thomas Jarosch
c0044122f4
Add self test for _replaceTokenFindMatch
2013-01-12 15:28:38 +01:00
Thomas Jarosch
ff9e864a07
Add self test for replaceTokenMatch
2013-01-12 15:28:38 +01:00
Thomas Jarosch
a7377f180a
Quote output of _assertEquals()
...
It's easier to detect trailing spaces this way.
2013-01-12 15:28:38 +01:00
Thomas Jarosch
4038d4b562
Place main code into own function
2013-01-12 15:28:38 +01:00
Thomas Jarosch
fdcfbd5ff9
Add missing copyright header
2013-01-10 11:10:45 +01:00
Edoardo Prezioso
6236e1dc38
Token::Match: removed harmless special code for initial '!!foo' patterns.
2013-01-09 20:13:33 +01:00