Meredith L. Patterson
1bd778f52e
the Great Merge continues
2019-10-08 17:13:31 +02:00
Meredith L. Patterson
8a545c4dcf
dotnet and php bindings have bitrotted, but packrat is faster now
2019-10-08 17:11:18 +02:00
Alex Willmer
59ba68ef84
Use byte literals in examples and unit tests
...
In Python 2.x an unprefixed string literal produces a byte string.
In Python 3.x an unprefixed string literal produces a textual string.
To produce a byte string in both a b prefix is needed, e.g. b'foo'.
Since I believe Hammer works predominantly with byte strings I have used
b prefixes throughout.
2019-05-10 21:59:03 +01:00
Alex Willmer
8b4b8ddc57
Use PyBytes_* Python CAPI functions
...
This removes any doubts about what type of string is in use.
2019-05-10 21:59:03 +01:00
Alex Willmer
c82390941d
Allow Python interpreter to be specified during build
...
This allows the library to be built and tested with a non-default
version of CPython, e.g.
scons bindings=python python=python3.6
scons bindings=python python=python3.6 testpython
2019-05-10 21:59:03 +01:00
Alex Willmer
287f71d561
Fix uses of retired builtins and builtin methods
...
In Python 3.x
- int and long types are unified. The unified type is called int.
- the text string type (unicode) is renamed to str.
- the byte string type (str) is renamed to bytes.
- chr returns a text string (i.e. str)
- xrange is renamed to range.
- dict.has_key() is removed
-
2019-05-10 21:59:03 +01:00
Alex Willmer
0f3cadcc3e
Enable absolute imports, true division, & print()
...
These have no effect in Python 3.x, they are the default. Enabling them
in Python 2.x, enabling them in Python 2.x allows single source
compatiblity.
2019-05-10 21:13:32 +01:00
Prashant
6dd481de1f
Add attr_reader for dont_gc
2016-11-05 20:37:08 -04:00
Prashant
f1810153c5
Fix the filenames in the gemspec file
2016-10-24 23:20:47 -04:00
Prashant
262675fa4e
Change version number to reflect change of filenames
2016-10-24 23:19:51 -04:00
Prashant Anantharaman
971e4e4f70
Change documentation and examples to reflect filename change
2016-09-11 10:05:18 -07:00
Prashant Anantharaman
7b4d208bf3
Change filenames to hammer-parser.rb
2016-09-11 09:48:05 -07:00
Prashant Anantharaman
257ba3ff7d
Add email, home page and license to gemspec
2016-09-09 10:33:50 -07:00
Prashant Anantharaman
b86349fde7
Add more documentation for Ruby binding
2016-09-09 10:23:29 -07:00
Meredith L. Patterson
9ee4fbd87c
backports swig is named swig3.0, so fix that across bindings
2016-02-25 23:21:12 +01: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
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
047c2c6059
LIBPATH, not LD_LIBRARY_PATH
2014-01-16 20:45:21 +01:00
Meredith L. Patterson
4886a7fa16
oh linker, you so crazy
2014-01-16 20:28:56 +01:00
Meredith L. Patterson
dfeafce3b3
paths
2014-01-16 20:09:33 +01:00
Meredith L. Patterson
865be1e431
scons bindings=cpp test works
2014-01-16 19:49:28 +01:00
Meredith L. Patterson
1d6a6d90ab
C++ bindings now work!
2014-01-16 19:49:28 +01:00
TQ Hirsch
270dc3f1b8
Got test suite building, most of the c++ bindings are implemented. Let's see if they work
2014-01-16 19:49:28 +01:00
Meredith L. Patterson
9e0c0efd77
all tests written, though action/attr_bool are incomplete
2014-01-16 19:48:45 +01:00
TQ Hirsch
bda2fb4741
Added start at C++ bindings
2014-01-16 19:48:45 +01:00
TQ Hirsch
f751400e62
Updated Ruby-specific README
2014-01-11 06:05:23 +01:00
Dan Hirsch
982665aafa
Got travis working, fixed ruby 1.9.3 compatibility
2014-01-11 05:37:34 +01:00
Dan Hirsch
df196aa346
Added sconscript
2014-01-11 04:26:47 +01:00
Dan Hirsch
cafa9adb1a
Action works, too
2014-01-11 03:28:31 +01:00
Dan Hirsch
3d791412f0
Fixed character parsing
2014-01-11 03:24:39 +01:00
Dan Hirsch
0da5867a81
Action is now completely working
2014-01-11 02:55:02 +01:00
Dan Hirsch
482e89adf8
Added support for the token type registry
2014-01-11 01:10:49 +01:00
Dan Hirsch
753120f27e
All of the main test suite works
2014-01-10 22:30:57 +01:00
Dan Hirsch
6a35872470
Added test suite generator for ruby
2014-01-10 21:24:50 +01:00
Dan Hirsch
8bd6671f90
Made library name cross-platform
2014-01-08 20:18:08 +01:00
Jakob Rath
905183cddc
Implement h_attr_bool.
2014-01-08 20:18:08 +01:00
Jakob Rath
d343b0c8f0
Add accessor methods.
2014-01-08 20:18:08 +01:00
Jakob Rath
a302953dfd
Implement h_action.
2014-01-08 20:18:08 +01:00
Jakob Rath
8c653b519e
Add tests about token encoding (failing for now).
2014-01-08 20:18:08 +01:00
Jakob Rath
b16eab8f33
Fix memory issues, add HBytes#token.
2014-01-08 20:18:08 +01:00
Jakob Rath
cf59ec83ed
Fix parsing of strings with multibyte characters.
2014-01-08 20:18:08 +01:00
Jakob Rath
3aa2ac2634
Add real tests.
2014-01-08 20:18:08 +01:00
Jakob Rath
96dfad0178
h_token: Copy string correctly.
...
See https://github.com/ffi/ffi/wiki/Core-Concepts#string-memory-allocation for additional information.
2014-01-08 20:18:08 +01:00
Jakob Rath
d53ee07499
Allow access to HCountedArray's elements.
2014-01-08 20:18:07 +01:00
Jakob Rath
c08818e5a5
Implement first version of HParseResult.
2014-01-08 20:18:07 +01:00
Jakob Rath
6d38b8e82a
Use typedefs for pointers.
2014-01-08 20:18:07 +01:00
Jakob Rath
76782bfa4a
Implement indirect parser and fix some bugs.
2014-01-08 20:18:07 +01:00
Jakob Rath
8ff5e181ce
Add more parsers.
2014-01-08 20:18:07 +01:00
Jakob Rath
8048f2e731
Use Fixnum for Parser.ch()
2014-01-08 20:18:07 +01:00
Jakob Rath
cfff00f8ed
Add more parsers to ParserBuilder.
2014-01-08 20:18:07 +01:00