Skip to content

Commit 64a4caa

Browse files
committed
updated CppParser
1 parent 4768bee commit 64a4caa

38 files changed

Lines changed: 234 additions & 57 deletions

CppParser/CppParser.progen

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@ vc.project.target = Poco${vc.project.name}
44
vc.project.type = library
55
vc.project.pocobase = ..
66
vc.project.outdir = ${vc.project.pocobase}
7-
vc.project.platforms = Win32, x64
7+
vc.project.platforms = Win32, x64, WinCE
88
vc.project.configurations = debug_shared, release_shared, debug_static_mt, release_static_mt, debug_static_md, release_static_md
9-
vc.project.prototype = CppParser_vs90.vcproj
9+
vc.project.prototype = ${vc.project.name}_vs90.vcproj
1010
vc.project.compiler.include = ..\\Foundation\\include
11-
vc.project.compiler.defines =
1211
vc.project.compiler.defines.shared = ${vc.project.name}_EXPORTS
1312
vc.project.compiler.defines.debug_shared = ${vc.project.compiler.defines.shared}
1413
vc.project.compiler.defines.release_shared = ${vc.project.compiler.defines.shared}
15-
vc.project.linker.dependencies =
1614
vc.solution.create = true
1715
vc.solution.include = testsuite\\TestSuite

CppParser/CppParser_vs90.vcproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,8 @@
411411
Name="Symbol Table">
412412
<Filter
413413
Name="Header Files">
414+
<File
415+
RelativePath=".\include\Poco\CppParser\BuiltIn.h"/>
414416
<File
415417
RelativePath=".\include\Poco\CppParser\Decl.h"/>
416418
<File
@@ -434,6 +436,8 @@
434436
</Filter>
435437
<Filter
436438
Name="Source Files">
439+
<File
440+
RelativePath=".\src\BuiltIn.cpp"/>
437441
<File
438442
RelativePath=".\src\Decl.cpp"/>
439443
<File

CppParser/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#
22
# Makefile
33
#
4-
# $Id: //poco/1.3/CppParser/Makefile#1 $
4+
# $Id: //poco/1.4/CppParser/Makefile#2 $
55
#
66
# Makefile for Poco CppParser
77
#
@@ -11,7 +11,7 @@ include $(POCO_BASE)/build/rules/global
1111
SHAREDOPT_CXX += -DCppParser_EXPORTS
1212

1313
objects = CppToken Decl Enum EnumValue Function NameSpace Parameter \
14-
Parser Struct Symbol Tokenizer TypeDef Utility Variable \
14+
Parser Struct Symbol Tokenizer TypeDef BuiltIn Utility Variable \
1515
Attributes AttributesParser
1616

1717
target = PocoCppParser

CppParser/include/Poco/CppParser/Attributes.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//
22
// Attributes.h
33
//
4-
// $Id: //poco/1.3/CppParser/include/Poco/CppParser/Attributes.h#1 $
4+
// $Id: //poco/1.4/CppParser/include/Poco/CppParser/Attributes.h#2 $
55
//
66
// Library: CppParser
77
// Package: Attributes
@@ -105,6 +105,10 @@ class CppParser_API Attributes
105105

106106
void set(const std::string& name, const std::string& value);
107107
/// Sets the value of an attribute.
108+
109+
void remove(const std::string& name);
110+
/// Removes the attribute with the given name.
111+
/// Does nothing if the attribute does not exist.
108112

109113
const std::string& operator [] (const std::string& name) const;
110114
std::string& operator [] (const std::string& name);

CppParser/include/Poco/CppParser/AttributesParser.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//
22
// AttributesParser.h
33
//
4-
// $Id: //poco/1.3/CppParser/include/Poco/CppParser/AttributesParser.h#1 $
4+
// $Id: //poco/1.4/CppParser/include/Poco/CppParser/AttributesParser.h#2 $
55
//
66
// Library: CppParser
77
// Package: Attributes
@@ -61,10 +61,10 @@ class CppParser_API AttributesParser
6161
/// with the syntax:
6262
/// //@ <attrDecl>[,<attrDec>...]
6363
/// where <attrDecl> is
64-
/// <name>=<value>
64+
/// <name>[=<value>]
6565
/// <name> is a valid C++ identifier, or two identifiers separated by
6666
/// a period (struct accessor notation).
67-
/// <value> is a string, integer, bool literal, or a complex value
67+
/// <value> is a string, integer, identifier, bool literal, or a complex value
6868
/// in the form
6969
/// {<name>=<value>[,<name>=<value>...]}
7070
{
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
//
2+
// BuiltIn.h
3+
//
4+
// $Id: //poco/1.4/CppParser/include/Poco/CppParser/BuiltIn.h#1 $
5+
//
6+
// Library: CppParser
7+
// Package: SymbolTable
8+
// Module: BuiltIn
9+
//
10+
// Definition of the BuiltIn class.
11+
//
12+
// Copyright (c) 2011, Applied Informatics Software Engineering GmbH.
13+
// and Contributors.
14+
//
15+
// Permission is hereby granted, free of charge, to any person or organization
16+
// obtaining a copy of the software and accompanying documentation covered by
17+
// this license (the "Software") to use, reproduce, display, distribute,
18+
// execute, and transmit the Software, and to prepare derivative works of the
19+
// Software, and to permit third-parties to whom the Software is furnished to
20+
// do so, all subject to the following:
21+
//
22+
// The copyright notices in the Software and this entire statement, including
23+
// the above license grant, this restriction and the following disclaimer,
24+
// must be included in all copies of the Software, in whole or in part, and
25+
// all derivative works of the Software, unless such copies or derivative
26+
// works are solely in the form of machine-executable object code generated by
27+
// a source language processor.
28+
//
29+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31+
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
32+
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
33+
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
34+
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
35+
// DEALINGS IN THE SOFTWARE.
36+
//
37+
38+
39+
#ifndef CppParser_BuiltIn_INCLUDED
40+
#define CppParser_BuiltIn_INCLUDED
41+
42+
43+
#include "Poco/CppParser/CppParser.h"
44+
#include "Poco/CppParser/Symbol.h"
45+
46+
47+
namespace Poco {
48+
namespace CppParser {
49+
50+
51+
class CppParser_API BuiltIn: public Symbol
52+
/// A placeholder for a built-in type.
53+
{
54+
public:
55+
BuiltIn(const std::string& name, NameSpace* pNameSpace);
56+
/// Creates the BuiltIn.
57+
58+
~BuiltIn();
59+
/// Destroys the BuiltIn.
60+
61+
Symbol::Kind kind() const;
62+
std::string toString() const;
63+
};
64+
65+
66+
} } // namespace Poco::CppParser
67+
68+
69+
#endif // CppParser_BuiltIn_INCLUDED

CppParser/include/Poco/CppParser/CppParser.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//
22
// CppParser.h
33
//
4-
// $Id: //poco/1.3/CppParser/include/Poco/CppParser/CppParser.h#2 $
4+
// $Id: //poco/1.4/CppParser/include/Poco/CppParser/CppParser.h#2 $
55
//
66
// Library: CppParser
77
// Package: CppParser

CppParser/include/Poco/CppParser/CppToken.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//
22
// CppToken.h
33
//
4-
// $Id: //poco/1.3/CppParser/include/Poco/CppParser/CppToken.h#2 $
4+
// $Id: //poco/1.4/CppParser/include/Poco/CppParser/CppToken.h#1 $
55
//
66
// Library: CppParser
77
// Package: CppParser

CppParser/include/Poco/CppParser/Decl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//
22
// Decl.h
33
//
4-
// $Id: //poco/1.3/CppParser/include/Poco/CppParser/Decl.h#1 $
4+
// $Id: //poco/1.4/CppParser/include/Poco/CppParser/Decl.h#1 $
55
//
66
// Library: CppParser
77
// Package: SymbolTable

CppParser/include/Poco/CppParser/Enum.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//
22
// Enum.h
33
//
4-
// $Id: //poco/1.3/CppParser/include/Poco/CppParser/Enum.h#1 $
4+
// $Id: //poco/1.4/CppParser/include/Poco/CppParser/Enum.h#1 $
55
//
66
// Library: CppParser
77
// Package: SymbolTable

0 commit comments

Comments
 (0)