Commit Graph

113 Commits

Author SHA1 Message Date
Geoffroy Couprie
980b19c79f Incomplete contains an integer for now 2015-02-14 20:23:36 +01:00
Geoffroy Couprie
8e08917a2e augment the chunk size 2015-02-14 20:21:06 +01:00
Geoffroy Couprie
d13ad8caec prepare for parsing multiple boxes 2015-02-14 20:08:37 +01:00
Geoffroy Couprie
acc93a5d18 create the filetype_box parser 2015-02-14 19:44:12 +01:00
Geoffroy Couprie
913dfb6071 parse mp4 boxes 2015-02-14 19:33:32 +01:00
Geoffroy Couprie
5651b5fbba add address number 2015-02-14 18:27:05 +01:00
Geoffroy Couprie
a9251f95be parse the mp4 brand 2015-02-14 15:38:38 +01:00
Geoffroy Couprie
d938339fca Add the take macro 2015-02-14 15:26:31 +01:00
Geoffroy Couprie
ee8eed987e begin implementation of mp4 parser 2015-02-14 14:49:37 +01:00
Geoffroy Couprie
ed75679420 Move code around 2015-02-14 00:36:45 +01:00
Geoffroy Couprie
35d56bd177 Add take_until macro and related ones
THis improves the syntax for token separated formats like the ini
files, but this is not yet good enough
2015-02-14 00:30:14 +01:00
Geoffroy Couprie
72ba27dfd2 clean the ini parsing code 2015-02-13 10:04:43 +01:00
Geoffroy Couprie
c60df94d17 Can create a tag by returning a closure
The lifetime of embedded data is incompatible with the
chaining macros, though
2015-02-13 09:57:17 +01:00
Geoffroy Couprie
d5a32b15a8 remove some warnings 2015-02-12 21:58:00 +01:00
Geoffroy Couprie
419df5dc45 Fix FlatMp implementation
Now, flatmap keeps the input part from the IResult it is applied
on.

This will allow usage of the Incomplete closures
2015-02-08 23:19:12 +01:00
Geoffroy Couprie
5505c7d502 begin support for Partial closures 2015-02-06 23:53:52 +01:00
Geoffroy Couprie
76d99a6fba remove some as_slice usage 2015-02-06 14:37:56 +01:00
Geoffroy Couprie
64b0888737 SHow is now named Debug 2015-02-06 14:37:45 +01:00
Geoffroy Couprie
dca1af3d08 bump version 2015-02-06 14:30:07 +01:00
Geoffroy Couprie
c7c61c2cf6 closure syntax changed again 2015-02-06 14:29:47 +01:00
Geoffroy Couprie
0518b6fc69 bump version 2015-01-29 22:20:20 +01:00
Geoffroy Couprie
1dd401aa4f Implement slincing and ranging syntax
Remove some warnings
2015-01-29 13:54:19 +01:00
Geoffroy Couprie
bf5d79865f rename io to old_io 2015-01-29 13:34:03 +01:00
Geoffroy Couprie
3bd1d4f468 Reorder variables to fix ther relative lifetimes
See
d77f6d5366
for more information.

This commit fixes errors like this one:
src/nom.rs:546:27: 546:28 error: `i` does not live long enough
src/nom.rs:546     assert_eq!(res, Done(&i[], &o[]))
                                         ^
<std macros>:1:1: 9:39 note: in expansion of assert_eq!
src/nom.rs:546:5: 547:4 note: expansion site
src/nom.rs:543:62: 547:4 note: reference must be valid for the block suffix following statement 1 at 543:61...
src/nom.rs:543     let res = Done((), arr.as_slice()).flat_map(sized_buffer);
src/nom.rs:544     let i:Vec<u8> = vec![7,8];
src/nom.rs:545     let o:Vec<u8> = vec![4,5,6];
src/nom.rs:546     assert_eq!(res, Done(&i[], &o[]))
src/nom.rs:547   }
src/nom.rs:544:30: 547:4 note: ...but borrowed value is only valid for the block suffix following statement 2 at 544:29
src/nom.rs:544     let i:Vec<u8> = vec![7,8];
src/nom.rs:545     let o:Vec<u8> = vec![4,5,6];
src/nom.rs:546     assert_eq!(res, Done(&i[], &o[]))
src/nom.rs:547   }
2015-01-29 13:31:31 +01:00
Geoffroy Couprie
fdad98bca5 more documentation 2015-01-29 01:07:40 +01:00
Geoffroy Couprie
dc4db51102 ignore code examples to fix macro usage 2015-01-29 01:07:27 +01:00
Geoffroy Couprie
5b5dcb92f8 more docs 2015-01-29 00:47:40 +01:00
Geoffroy Couprie
329dc53469 add some doc 2015-01-29 00:05:46 +01:00
Geoffroy Couprie
42d12e08ad documentation link 2015-01-28 16:10:07 +01:00
Geoffroy Couprie
2314c89911 Replace trait implementations with reusable macros 2015-01-27 14:13:50 +01:00
Geoffroy Couprie
4edf5218a8 bump minor version 2015-01-24 13:49:51 +01:00
Geoffroy Couprie
d97eb90718 SHow is now named Debug 2015-01-24 13:37:36 +01:00
Geoffroy Couprie
75b9be3bd0 remove some warnings 2015-01-18 13:12:58 +01:00
Geoffroy Couprie
544d2f9b9d add travis file 2015-01-17 18:44:20 +01:00
Geoffroy Couprie
446b824c13 remove some warnings 2015-01-17 18:43:32 +01:00
Geoffroy Couprie
72f261e147 update the cargo description 2015-01-17 18:40:40 +01:00
Geoffroy Couprie
1db2ef0b51 fix macro usage 2015-01-08 20:50:32 +01:00
Geoffroy Couprie
5aa692f1dc remove an old test case 2015-01-08 14:40:03 +01:00
Geoffroy Couprie
8937fe0d31 Fix macros for the latest Rust 2015-01-08 11:27:58 +01:00
Geoffroy Couprie
5a6b93b723 Update most of the code to rust 1.0.0-dev 2a8cb678e
Most macros are still broken
2015-01-08 10:28:28 +01:00
Geoffroy Couprie
6469e096ee length/value parser 2015-01-07 17:07:35 +01:00
Geoffroy Couprie
21b6d18089 accept empty lines after sections 2015-01-06 14:02:00 +01:00
Geoffroy Couprie
2ae55570fc parse multiple categories 2015-01-06 13:52:25 +01:00
Geoffroy Couprie
36f0309918 parse a category with keys and values 2015-01-06 12:12:33 +01:00
Geoffroy Couprie
0e2e0427be 'key = value' can be followed by empty lines 2015-01-05 23:30:58 +01:00
Geoffroy Couprie
ec9c0fb212 produce a hashmap from key-value components 2015-01-05 22:56:40 +01:00
Geoffroy Couprie
3c7733ef92 add sub macros for fold0 and fold1 2015-01-05 22:51:55 +01:00
Geoffroy Couprie
a3203d4325 parse multiple keys and values 2015-01-05 18:32:39 +01:00
Geoffroy Couprie
eec321ccf2 fix manyX parsers 2015-01-05 18:32:12 +01:00
Geoffroy Couprie
63ed678971 parse keys and values as text 2015-01-05 18:05:57 +01:00