Click here to Skip to main content
13,598,183 members
Click here to Skip to main content

Stats

25.5K views
1K downloads
37 bookmarked
Posted 29 Jun 2009
Licenced CPOL

REG file parser using the Boost Spirit Parser Framework

This article describes a sample parser of reg files using the Boost Spirit Parser Framework. We'll discuss why we use the curtain libraries and make one or another solution, algorithm, and also tests.
RegFileParser_bin
bin
RegFileParserAutoTest.exe
RegFileParserTestCmd.exe
RegFileParser_source
src
boost_libs
libboost_program_options-vc90-mt-s-1_38.lib
libboost_program_options-vc90-mt-sgd-1_38.lib
RegFileParserAutoTest
RegFileParserAutoTest.vcproj
TestFiles
0_test_simple_a.reg
0_test_simple_w.reg
1_test_key_name_a.reg
1_test_key_name_w.reg
2_test_value_name_a.reg
2_test_value_name_w.reg
3_test_value_name_default_a.reg
3_test_value_name_default_w.reg
4_test_value_big_data_a.reg
4_test_value_big_data_w.reg
5_test_value_big_string_a.reg
5_test_value_big_string_w.reg
RegFileParserLib
RegFileParserLib.vcproj
RegFileParserTestCmd
RegFileParserTestCmd.vcproj
RegFileParser_source_no_boost
src
RegFileParserAutoTest
RegFileParserAutoTest.vcproj
TestFiles
0_test_simple_a.reg
0_test_simple_w.reg
1_test_key_name_a.reg
1_test_key_name_w.reg
2_test_value_name_a.reg
2_test_value_name_w.reg
3_test_value_name_default_a.reg
3_test_value_name_default_w.reg
4_test_value_big_data_a.reg
4_test_value_big_data_w.reg
5_test_value_big_string_a.reg
5_test_value_big_string_w.reg
RegFileParserLib
RegFileParserLib.vcproj
RegFileParserTestCmd
RegFileParserTestCmd.vcproj
<?xml version="1.0" encoding="windows-1251"?>
<VisualStudioProject
	ProjectType="Visual C++"
	Version="9,00"
	Name="RegFileParserTestCmd"
	ProjectGUID="{1C42CE07-D518-45D9-A3D8-5CA0002EB35B}"
	RootNamespace="RegFileParserTestCmd"
	Keyword="Win32Proj"
	TargetFrameworkVersion="196613"
	>
	<Platforms>
		<Platform
			Name="Win32"
		/>
	</Platforms>
	<ToolFiles>
	</ToolFiles>
	<Configurations>
		<Configuration
			Name="Debug|Win32"
			OutputDirectory="$(SolutionDir)..\bin\$(ConfigurationName)"
			IntermediateDirectory="$(SolutionDir)..\obj\$(ConfigurationName)\$(ProjectName)"
			ConfigurationType="1"
			CharacterSet="1"
			>
			<Tool
				Name="VCPreBuildEventTool"
			/>
			<Tool
				Name="VCCustomBuildTool"
			/>
			<Tool
				Name="VCXMLDataGeneratorTool"
			/>
			<Tool
				Name="VCWebServiceProxyGeneratorTool"
			/>
			<Tool
				Name="VCMIDLTool"
			/>
			<Tool
				Name="VCCLCompilerTool"
				Optimization="0"
				AdditionalIncludeDirectories="&quot;$(SolutionDir)\RegFileParserLib&quot;;&quot;$(SolutionDir)\RegFileParserAutoTest&quot;;&quot;$(BOOST)&quot;"
				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
				MinimalRebuild="true"
				BasicRuntimeChecks="3"
				RuntimeLibrary="1"
				UsePrecompiledHeader="0"
				WarningLevel="3"
				DebugInformationFormat="4"
			/>
			<Tool
				Name="VCManagedResourceCompilerTool"
			/>
			<Tool
				Name="VCResourceCompilerTool"
			/>
			<Tool
				Name="VCPreLinkEventTool"
			/>
			<Tool
				Name="VCLinkerTool"
				LinkIncremental="2"
				AdditionalLibraryDirectories="&quot;$(SolutionDir)\boost_libs&quot;"
				GenerateDebugInformation="true"
				SubSystem="1"
				TargetMachine="1"
			/>
			<Tool
				Name="VCALinkTool"
			/>
			<Tool
				Name="VCManifestTool"
			/>
			<Tool
				Name="VCXDCMakeTool"
			/>
			<Tool
				Name="VCBscMakeTool"
			/>
			<Tool
				Name="VCFxCopTool"
			/>
			<Tool
				Name="VCAppVerifierTool"
			/>
			<Tool
				Name="VCPostBuildEventTool"
			/>
		</Configuration>
		<Configuration
			Name="Release|Win32"
			OutputDirectory="$(SolutionDir)..\bin\$(ConfigurationName)"
			IntermediateDirectory="$(SolutionDir)..\obj\$(ConfigurationName)\$(ProjectName)"
			ConfigurationType="1"
			CharacterSet="1"
			WholeProgramOptimization="1"
			>
			<Tool
				Name="VCPreBuildEventTool"
			/>
			<Tool
				Name="VCCustomBuildTool"
			/>
			<Tool
				Name="VCXMLDataGeneratorTool"
			/>
			<Tool
				Name="VCWebServiceProxyGeneratorTool"
			/>
			<Tool
				Name="VCMIDLTool"
			/>
			<Tool
				Name="VCCLCompilerTool"
				Optimization="2"
				EnableIntrinsicFunctions="true"
				AdditionalIncludeDirectories="&quot;$(SolutionDir)\RegFileParserLib&quot;;&quot;$(SolutionDir)\RegFileParserAutoTest&quot;;&quot;$(BOOST)&quot;"
				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
				RuntimeLibrary="0"
				EnableFunctionLevelLinking="true"
				UsePrecompiledHeader="0"
				WarningLevel="3"
				DebugInformationFormat="3"
			/>
			<Tool
				Name="VCManagedResourceCompilerTool"
			/>
			<Tool
				Name="VCResourceCompilerTool"
			/>
			<Tool
				Name="VCPreLinkEventTool"
			/>
			<Tool
				Name="VCLinkerTool"
				LinkIncremental="1"
				AdditionalLibraryDirectories="&quot;$(SolutionDir)\boost_libs&quot;"
				GenerateDebugInformation="true"
				SubSystem="1"
				OptimizeReferences="2"
				EnableCOMDATFolding="2"
				TargetMachine="1"
			/>
			<Tool
				Name="VCALinkTool"
			/>
			<Tool
				Name="VCManifestTool"
			/>
			<Tool
				Name="VCXDCMakeTool"
			/>
			<Tool
				Name="VCBscMakeTool"
			/>
			<Tool
				Name="VCFxCopTool"
			/>
			<Tool
				Name="VCAppVerifierTool"
			/>
			<Tool
				Name="VCPostBuildEventTool"
			/>
		</Configuration>
	</Configurations>
	<References>
	</References>
	<Files>
		<Filter
			Name="Source Files"
			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
			>
			<File
				RelativePath=".\main.cpp"
				>
			</File>
		</Filter>
		<Filter
			Name="Header Files"
			Filter="h;hpp;hxx;hm;inl;inc;xsd"
			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
			>
			<File
				RelativePath=".\StringUtils.hpp"
				>
			</File>
			<File
				RelativePath=".\TestRunnerCmd.hpp"
				>
			</File>
		</Filter>
	</Files>
	<Globals>
	</Globals>
</VisualStudioProject>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Authors

Apriorit Inc
Apriorit Inc.
Hungary Hungary
This member doesn't quite have enough reputation to be able to display their biography and homepage.
Group type: Organisation

32 members


Ivan Romanenko
Software Developer Codedgers Inc
Ukraine Ukraine
No Biography provided

You may also be interested in...

Pro
Pro
Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web01 | 2.8.180621.3 | Last Updated 30 Jun 2009
Article Copyright 2009 by Apriorit Inc, Ivan Romanenko
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid