Skip to content

Commit 602679b

Browse files
authored
Merge pull request #31 from jwtowner/develop
Merge CMake build support from develop branch
2 parents d1ce19b + d6c0831 commit 602679b

34 files changed

+183
-2520
lines changed

.editorconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,9 @@ trim_trailing_whitespace = true
66

77
[*.md]
88
trim_trailing_whitespace = false
9+
10+
[CMakeLists.txt]
11+
charset = utf-8
12+
indent_style = space
13+
indent_size = 2
14+
trim_trailing_whitespace = false

.gitattributes

Lines changed: 1 addition & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -2,63 +2,4 @@
22
# Set default behavior to automatically normalize line endings.
33
###############################################################################
44
* text=auto
5-
*.sh eol=lf
6-
7-
###############################################################################
8-
# Set default behavior for command prompt diff.
9-
#
10-
# This is need for earlier builds of msysgit that does not have it on by
11-
# default for csharp files.
12-
# Note: This is only used by command line
13-
###############################################################################
14-
#*.cs diff=csharp
15-
16-
###############################################################################
17-
# Set the merge driver for project and solution files
18-
#
19-
# Merging from the command prompt will add diff markers to the files if there
20-
# are conflicts (Merging from VS is not affected by the settings below, in VS
21-
# the diff markers are never inserted). Diff markers may cause the following
22-
# file extensions to fail to load in VS. An alternative would be to treat
23-
# these files as binary and thus will always conflict and require user
24-
# intervention with every merge. To do so, just uncomment the entries below
25-
###############################################################################
26-
#*.sln merge=binary
27-
#*.csproj merge=binary
28-
#*.vbproj merge=binary
29-
#*.vcxproj merge=binary
30-
#*.vcproj merge=binary
31-
#*.dbproj merge=binary
32-
#*.fsproj merge=binary
33-
#*.lsproj merge=binary
34-
#*.wixproj merge=binary
35-
#*.modelproj merge=binary
36-
#*.sqlproj merge=binary
37-
#*.wwaproj merge=binary
38-
39-
###############################################################################
40-
# behavior for image files
41-
#
42-
# image files are treated as binary by default.
43-
###############################################################################
44-
#*.jpg binary
45-
#*.png binary
46-
#*.gif binary
47-
48-
###############################################################################
49-
# diff behavior for common document formats
50-
#
51-
# Convert binary document formats to text before diffing them. This feature
52-
# is only available from the command line. Turn it on by uncommenting the
53-
# entries below.
54-
###############################################################################
55-
#*.doc diff=astextplain
56-
#*.DOC diff=astextplain
57-
#*.docx diff=astextplain
58-
#*.DOCX diff=astextplain
59-
#*.dot diff=astextplain
60-
#*.DOT diff=astextplain
61-
#*.pdf diff=astextplain
62-
#*.PDF diff=astextplain
63-
#*.rtf diff=astextplain
64-
#*.RTF diff=astextplain
5+
*.sh eol=lf

.github/workflows/c-cpp.yml

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,31 @@ jobs:
1111
runs-on: ${{ matrix.os }}
1212
strategy:
1313
matrix:
14-
os: [ubuntu-24.04, ubuntu-22.04, ubuntu-20.04]
14+
os: [ubuntu-24.04, ubuntu-22.04, ubuntu-20.04, windows-2022, macos-latest]
1515
steps:
1616
- uses: actions/checkout@v4
1717
- name: make
18-
run: make
18+
if: runner.os == 'Linux'
19+
run: make CI_BUILD=1
1920
- name: make check
20-
run: make check
21+
if: runner.os == 'Linux'
22+
run: make check CI_BUILD=1
23+
- name: CMake Build (Windows)
24+
if: runner.os == 'Windows'
25+
run: |
26+
cmake -S . -B build -G "Visual Studio 17 2022" -DBUILD_TESTS=ON -DBUILD_SAMPLES=ON -DCI_BUILD=ON
27+
cmake --build build --config Release --target ALL_BUILD
28+
- name: Run CTest (Windows)
29+
if: runner.os == 'Windows'
30+
run: cd build && ctest -C Release -T test --output-on-failure
31+
- name: Install Ninja (macOS)
32+
if: runner.os == 'macOS'
33+
run: brew install ninja
34+
- name: CMake Build (macOS)
35+
if: runner.os == 'macOS'
36+
run: |
37+
cmake -S . -B build -G Ninja -DBUILD_TESTS=ON -DBUILD_SAMPLES=ON -DCI_BUILD=ON
38+
cmake --build build
39+
- name: Run CTest (macOS)
40+
if: runner.os == 'macOS'
41+
run: cd build && ctest --output-on-failure

.gitignore

Lines changed: 4 additions & 217 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
## Ignore Visual Studio temporary files, build results, and
2-
## files generated by popular Visual Studio add-ons.
3-
41
# Unicode Character Database files
52
tools/ucd/*.txt
63

@@ -12,68 +9,22 @@ tools/ucd/*.txt
129
*.userprefs
1310

1411
# Build results
12+
[Bb]uild*/
1513
[Dd]ebug/
1614
[Dd]ebugPublic/
1715
[Rr]elease/
1816
[Rr]eleases/
1917
x64/
2018
x86/
21-
bld/
2219
[Bb]in/
2320
[Oo]bj/
2421
[Ll]og/
2522

26-
# Visual Studio cache/options directory
27-
.vs/
28-
2923
# Visual Studio Code cache/options directory
3024
.vscode/
3125

32-
# MSTest test Results
33-
[Tt]est[Rr]esult*/
34-
[Bb]uild[Ll]og.*
35-
36-
# NUNIT
37-
*.VisualState.xml
38-
TestResult.xml
39-
40-
# Build Results of an ATL Project
41-
[Dd]ebugPS/
42-
[Rr]eleasePS/
43-
dlldata.c
44-
45-
# DNX
46-
project.lock.json
47-
project.fragment.lock.json
48-
artifacts/
49-
50-
*_i.c
51-
*_p.c
52-
*_i.h
53-
*.ilk
54-
*.meta
55-
*.obj
56-
*.pch
57-
*.pdb
58-
*.pgc
59-
*.pgd
60-
*.rsp
61-
*.sbr
62-
*.tlb
63-
*.tli
64-
*.tlh
65-
*.tmp
66-
*.tmp_proj
67-
*.log
68-
*.vspscc
69-
*.vssscc
70-
.builds
71-
*.pidb
72-
*.svclog
73-
*.scc
74-
75-
# Chutzpah Test files
76-
_Chutzpah*
26+
# Visual Studio cache/options directory
27+
.vs/
7728

7829
# Visual C++ cache files
7930
ipch/
@@ -92,172 +43,8 @@ ipch/
9243
*.vspx
9344
*.sap
9445

95-
# TFS 2012 Local Workspace
96-
$tf/
97-
98-
# Guidance Automation Toolkit
99-
*.gpState
100-
101-
# ReSharper is a .NET coding add-in
102-
_ReSharper*/
103-
*.[Rr]e[Ss]harper
104-
*.DotSettings.user
105-
106-
# JustCode is a .NET coding add-in
107-
.JustCode
108-
109-
# TeamCity is a build add-in
110-
_TeamCity*
111-
112-
# DotCover is a Code Coverage Tool
113-
*.dotCover
114-
115-
# NCrunch
116-
_NCrunch_*
117-
.*crunch*.local.xml
118-
nCrunchTemp_*
119-
120-
# MightyMoose
121-
*.mm.*
122-
AutoTest.Net/
123-
124-
# Web workbench (sass)
125-
.sass-cache/
126-
127-
# Installshield output folder
128-
[Ee]xpress/
129-
130-
# DocProject is a documentation generator add-in
131-
DocProject/buildhelp/
132-
DocProject/Help/*.HxT
133-
DocProject/Help/*.HxC
134-
DocProject/Help/*.hhc
135-
DocProject/Help/*.hhk
136-
DocProject/Help/*.hhp
137-
DocProject/Help/Html2
138-
DocProject/Help/html
139-
140-
# Click-Once directory
141-
publish/
142-
143-
# Publish Web Output
144-
*.[Pp]ublish.xml
145-
*.azurePubxml
146-
# TODO: Comment the next line if you want to checkin your web deploy settings
147-
# but database connection strings (with potential passwords) will be unencrypted
148-
#*.pubxml
149-
*.publishproj
150-
151-
# Microsoft Azure Web App publish settings. Comment the next line if you want to
152-
# checkin your Azure Web App publish settings, but sensitive information contained
153-
# in these scripts will be unencrypted
154-
PublishScripts/
155-
156-
# NuGet Packages
157-
*.nupkg
158-
# The packages folder can be ignored because of Package Restore
159-
**/packages/*
160-
# except build/, which is used as an MSBuild target.
161-
!**/packages/build/
162-
# Uncomment if necessary however generally it will be regenerated when needed
163-
#!**/packages/repositories.config
164-
# NuGet v3's project.json files produces more ignoreable files
165-
*.nuget.props
166-
*.nuget.targets
167-
168-
# Microsoft Azure Build Output
169-
csx/
170-
*.build.csdef
171-
172-
# Microsoft Azure Emulator
173-
ecf/
174-
rcf/
175-
176-
# Windows Store app package directories and files
177-
AppPackages/
178-
BundleArtifacts/
179-
Package.StoreAssociation.xml
180-
_pkginfo.txt
181-
18246
# Visual Studio cache files
18347
# files ending in .cache can be ignored
18448
*.[Cc]ache
18549
# but keep track of directories ending in .cache
186-
!*.[Cc]ache/
187-
188-
# Others
189-
ClientBin/
190-
~$*
191-
*~
192-
*.dbmdl
193-
*.dbproj.schemaview
194-
*.jfm
195-
*.pfx
196-
*.publishsettings
197-
node_modules/
198-
orleans.codegen.cs
199-
200-
# Since there are multiple workflows, uncomment next line to ignore bower_components
201-
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
202-
#bower_components/
203-
204-
# RIA/Silverlight projects
205-
Generated_Code/
206-
207-
# Backup & report files from converting an old project file
208-
# to a newer Visual Studio version. Backup files are not needed,
209-
# because we have git ;-)
210-
_UpgradeReport_Files/
211-
Backup*/
212-
UpgradeLog*.XML
213-
UpgradeLog*.htm
214-
215-
# SQL Server files
216-
*.mdf
217-
*.ldf
218-
219-
# Business Intelligence projects
220-
*.rdl.data
221-
*.bim.layout
222-
*.bim_*.settings
223-
224-
# Microsoft Fakes
225-
FakesAssemblies/
226-
227-
# GhostDoc plugin setting file
228-
*.GhostDoc.xml
229-
230-
# Node.js Tools for Visual Studio
231-
.ntvs_analysis.dat
232-
233-
# Visual Studio 6 build log
234-
*.plg
235-
236-
# Visual Studio 6 workspace options file
237-
*.opt
238-
239-
# Visual Studio LightSwitch build output
240-
**/*.HTMLClient/GeneratedArtifacts
241-
**/*.DesktopClient/GeneratedArtifacts
242-
**/*.DesktopClient/ModelManifest.xml
243-
**/*.Server/GeneratedArtifacts
244-
**/*.Server/ModelManifest.xml
245-
_Pvt_Extensions
246-
247-
# Paket dependency manager
248-
.paket/paket.exe
249-
paket-files/
250-
251-
# FAKE - F# Make
252-
.fake/
253-
254-
# JetBrains Rider
255-
.idea/
256-
*.sln.iml
257-
258-
# CodeRush
259-
.cr/
260-
261-
# Python Tools for Visual Studio (PTVS)
262-
__pycache__/
263-
*.pyc
50+
!*.[Cc]ache/

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
## Release v0.3.0 (Under Development)
44

55
* Removed the `lug::variable` template class and instead allow for natural use of types and variables in captures and attribute bindings. Variable state is automatically saved and restored across rule boundaries.
6-
* Rewrote the expression objects as expression template classes rather than lambdas while implementing attribute state tracking. Will allow for additional optimizations into the future.
6+
* Rewrote the expression function objects/lambdas as expression template classes. Allows for multiple passes over the expression tree as well as top-down and bottom-up traversal, which was needed when implementing attribute state tracking. This will also allow for additional optimizations into the future.
77
* Renamed `syntactic_capture` to `semantic_capture_action` to reflect that it's executed during the semantic action evaluation phase.
8-
* Make all variations of callables that return a non-void value that can be type-erased by `semantic_action` and `semantic_capture_action` to push their result on to the attribute result stack.
8+
* Make all variations of callables that return a non-void value that can be type-erased by `semantic_action` and `semantic_capture_action` push their result onto the attribute result stack.
99
* Attempting to bind a variable to a nonexistent value from the attribute result stack now throws an `attribute_stack_error`.
1010
* Allow for capturing text to a `lug::syntax` object or any string-like object that is convertible from `std::string_view`.
1111
* `implicit_space_rule` no longer causes a compiler warning with Clang, uses RAII to push/pop the thread-local white space rule for grammars.
@@ -14,6 +14,7 @@
1414
* Turned `lug::parser` into an alias of a new `lug::basic_parser` template class parameterized with an input source strategy. This allows for parsing and capturing of text without making a copy of the input.
1515
* Added list repetition operator `e1 >> e2` to the DSL that is shorthand for `e1 > *(e2 > e1)`.
1616
* Enabled `-Wconversion` and `-Wshadow` warnings for Clang and GCC and fixed warnings.
17+
* Added CMake build support and removed old MSVS solution and vcxproj files.
1718
* Handle situation where compilation with RTTI is disabled.
1819

1920
## Release v0.2.0 (June 21, 2024)

0 commit comments

Comments
 (0)