Nicolas Léveillé
e0a41a85fc
Add workaround for VS2015 so that appveyor works
...
It seems Appveyor's images have been changed. The builds could not
find standard library headers anymore.
It seems to be an interaction between MS' scripts and the Windows
Driver Kit that is installed there.
One way to disable this interaction is to rename the `wdf` folder to
some other name.
See:
- http://stackoverflow.com/questions/31862627/vs2015-cl-cant-find-crt-libs-stido-h-ctype-h-etc-when-building-on-command-l
- http://help.appveyor.com/discussions/problems/3062-problem-with-new-updates-visual-studio-2015-and-cmake
- https://github.com/appveyor/ci/issues/414
2015-09-20 17:16:43 +02:00
Meredith L. Patterson
87aa543739
Merge pull request #144 from pesco/fix-lalr_bugs
...
Fix two context-free backend bugs
2015-09-18 01:00:14 +02:00
Sven M. Hallberg
9edef88bbc
fix a formatting error in h_pprint_stringmap
2015-09-17 16:39:22 +02:00
Sven M. Hallberg
cdd1289936
fix printing of "negative" byte values
2015-09-16 22:17:31 +02:00
Sven M. Hallberg
7319c48e59
fix reshape for h_many
2015-09-16 20:06:24 +02:00
Sven M. Hallberg
db95cda229
add regression test for wrong nesting of h_many/h_sequence results with CFG backends
2015-09-16 20:06:06 +02:00
Sven M. Hallberg
3eb2a2023d
add a comment regarding another CHARSET case
2015-09-16 18:51:16 +02:00
Sven M. Hallberg
422f88c4aa
handle charset left-hand-side in LALR compile
2015-09-16 18:43:52 +02:00
Sven M. Hallberg
31c460780f
add regression test for unhandled charset left-hand-side case in LALR compile
2015-09-16 18:23:32 +02:00
Meredith L. Patterson
e01d10f0ab
Merge pull request #139 from pesco/fix-llk_zero_end
...
add a missing end-of-input check in the LL(k) backend
2015-08-25 14:49:15 +02:00
Sven M. Hallberg
c5f2c5aa2b
add a missing end-of-input check in the LL(k) backend
2015-08-25 14:14:48 +02:00
TQ Hirsch
25b27490c3
Merge pull request #138 from uucidl/platform-timing
...
Platform compilation improvement (windows port)
2015-08-19 12:56:49 +02:00
Nicolas Léveillé
9557448ae6
Introduce {v,}asprintf for windows
...
We have now again two functions called h_platform_vasprintf and
h_platform_asprintf. On windows they are implemented in terms of vsnprint
and the like. On BSD/GNU libraries we use the supplied vasprintf and
asprintf.
2015-08-16 16:46:52 +02:00
Nicolas Léveillé
124b4c381b
regex_debug.c: Stop including dlfcn.h
...
Since the block of code has been disabled anyway and is not very
portable, we introduce a define to control both the include
and the code.
2015-08-16 16:21:21 +02:00
Nicolas Léveillé
102b9593dc
Update list of files to compile on windows
2015-08-16 16:20:53 +02:00
Nicolas Léveillé
e74e23d672
Change system_allocator to store size of blocks only for debugging
...
Storing the size of the blocks is now only activated when DEBUG__MEMFILL
has been defined.
2015-08-16 09:15:20 +02:00
Nicolas Léveillé
d9ae097533
Remove void pointer arithmetics in system_allocator.c
...
We replace instances of void* w/ char* arithmetics.
This allows system_allocator.c to be compiled with MSVC.
Also we introduce a struct to represent the size_t header.
2015-08-16 09:10:04 +02:00
Nicolas Léveillé
01333964bd
Substitute spaces for tabs
2015-08-15 15:43:46 +02:00
Nicolas Léveillé
2346239887
Implement h_platform_stopwatch for Windows
...
We use QueryPerformanceCounter which will return realtime, not user
time.
2015-08-15 15:43:35 +02:00
Nicolas Léveillé
739f5d6d5c
Split platform specific time measurement away
...
We now have a `stopwatch` to measure time between two moments.
2015-08-15 15:43:22 +02:00
Meredith L. Patterson
a7a5e8cfad
Merge pull request #137 from uucidl/building-on-appveyor
...
Building on appveyor
2015-08-12 10:01:03 +02:00
Nicolas Léveillé
226cad2ab2
Don't build all of Hammer on AppVeyor just now
...
Since the port is not finished yet, we remove some source files
and the compilation of examples.
2015-08-09 22:46:45 +02:00
Nicolas Léveillé
c0ab06736f
Deactivate compiler warnings from CL.EXE that fire in hammer
...
Some of them are completely spurious however some (marked FIXME(windows))
may benefit from being looked at.
2015-08-09 22:46:45 +02:00
Nicolas Léveillé
0c35525e30
Convert usages of errx to h_platform_errx
...
This BSD call will have to be implemented on windows. Right now
we have a stub that just exits the process.
2015-08-09 22:46:45 +02:00
Nicolas Léveillé
c8726244ae
Wrap remaining __attribute__
...
We wrap all remaining references to __attribute__ into a macro call to
H_GCC_ATTRIBUTE, to allow compilation with MSVC CL.EXE
2015-08-09 22:46:00 +02:00
Nicolas Léveillé
6b9ba6033e
Allow windows users to include hammer.h
...
We substitute H_GCC_ATTRIBUTE to any occurence of __attribute__ and
disable its function with non gcc, non clang compilers.
We use a H_ macro so as to not pollute users' namespaces.
On windows build without c4201 so as to allow anonymous struct. This
shows hammer is not C99 compliant but rather C11.
2015-08-09 22:46:00 +02:00
Nicolas Léveillé
e7620e3e4b
windows build: Build with debug symbols
2015-08-09 22:46:00 +02:00
Nicolas Léveillé
be30820023
windows build: Add build scripts + appveyor.yml
...
In order to guarantee that Hammer can build on Windows, an appveyor.yml
and associated build scripts will build hammer and its examples. The idea
is that as soon as the appveyor.yml exists in the repository, pull
requests that would impede Windows portability would be immediately
detected.
The scripts expect CL.EXE to be in the path, and will produce their
results in build/
The highest level of warning is enabled on CL.EXE, minus warnings that
bring CL.EXE to a level that ressembles C99. The only notable warning
that was disabled is the one that tells you about implicit truncating
conversions.
Hammer's source code has quite a few implicit conversions say from a 64bit
unsigned integer to a integer of a lesser size (signed or otherwise)
2015-08-09 22:46:00 +02:00
TQ Hirsch
402721ddb7
Merge pull request #136 from abiggerhammer/master
...
Fix #133
2015-08-03 00:00:06 +02:00
Meredith L. Patterson
0fb9d77e40
remove error from HSVMContext, make svm_stack_ensure_cap return bool instead
2015-08-02 23:42:38 +02:00
Meredith L. Patterson
759fbe77e5
C++ bindings needed to use system_allocator's free() too
2015-08-02 22:03:30 +02:00
Meredith L. Patterson
6bffacefaf
fix memory leak introduced by putting setjmp in the wrong place
2015-08-02 21:46:57 +02:00
Meredith L. Patterson
1ffd8d9276
Fix undefined behaviour around system_allocator, issue #133 .
2015-08-02 21:32:47 +02:00
Meredith L. Patterson
0653a9e48a
add explicit null checks to system_allocator malloc/realloc
2015-08-02 14:34:45 +02:00
TQ Hirsch
f69698d734
Merge pull request #135 from uucidl/master
...
Print user defined token type while pretty printing
2015-08-01 13:52:48 +02:00
Nicolas Léveillé
2a6233b74f
Print user defined token type while pretty printing
...
The pretty printing format chosen is USER:<token name>
We use the registry function `h_get_token_type_name` which returns 0
when no name has been defined. This will print (null) as a token name.
2015-08-01 13:42:43 +02:00
TQ Hirsch
9030136d08
Merge pull request #132 from abiggerhammer/master
...
Usability improvements from the tutorial
2015-07-26 18:15:50 +02:00
Meredith L. Patterson
522bc7cf05
Merge branch 'master' of github.com:abiggerhammer/hammer
2015-05-04 19:01:05 -04:00
Meredith L. Patterson
39c9096fd6
changes from tutorial: add h_literal, make h_make_bytes more practical
2015-05-04 19:00:37 -04:00
Meredith L. Patterson
33af1ec65c
Merge pull request #131 from michiexile/master
...
Algebraic Generating Functions from parser
2015-04-11 01:16:25 +02:00
Mikael Vejdemo-Johansson
d13657a411
Changed generating functions printouts to be copy-paste-able into SageMath.
...
Now we can do things like:
# copy-paste from output
ring.<t,L,tie,Cn,M,Ln,I,D,J,Rn,A,K,F,G> = QQ[]
ID = ring.ideal(L - (1*Cn*t),tie - (1*Ln*t),Cn - (1*I + 1*J),M - (1*t^2),Ln - (1*D + 1*L + 1*M),I - (1*Rn*t),D - (1*Rn*t),J - (1*Ln*t),Rn - (1*F + 1*G + 1*K),A - (1*tie),K - (1*t^2),F - (1*Ln*t),G - (1*Cn*t))
# we are interested in tie in terms of t; so we want to remove anything not these two:
ID.elimination_ideal([L,Cn,M,Ln,I,D,J,Rn,A,K,F,G])
# output from this SageMath command is
# Ideal (t^3 + 2*t^2*tie + t*tie - tie) of Multivariate Polynomial Ring in t, L, tie, Cn, M, Ln, I, D, J, Rn, A, K, F, G over Rational Field
# which we can solve for tie to get tie = t^3/(1-t-2*t^2) just as expected
2015-04-10 10:05:19 +02:00
Mikael Vejdemo-Johansson
a72aff9b39
refactored out the grammar handling. handles epsilons better
2015-04-08 17:32:12 +02:00
Mikael Vejdemo-Johansson
24e9e9de7f
support naming of generating functions, and 0-weighting of symbols
2015-04-08 15:29:32 +02:00
Mikael Vejdemo-Johansson
1e95eac6cd
removed h_repeat_n to enable desugaring
2015-04-08 14:06:58 +02:00
Mikael Vejdemo-Johansson
5100dc69da
typo
2015-04-08 13:54:30 +02:00
Mikael Vejdemo-Johansson
8039d48537
removed use of h_many to get desugars
2015-04-08 13:53:45 +02:00
Mikael Vejdemo-Johansson
61a211559e
fixed build errors wrt sentinels
2015-04-08 13:46:42 +02:00
Mikael Vejdemo-Johansson
9a1812bd49
added ties to build script
2015-04-08 13:44:14 +02:00
Mikael Vejdemo-Johansson
7fdc687bd4
parsers for the grammars in the tieknots paper
2015-04-08 09:33:20 +02:00
Mikael Vejdemo-Johansson
6b8a3f262f
polished generating function code more
2015-04-07 22:14:32 +02:00