Commit Graph

115 Commits

Author SHA1 Message Date
Miek Gieben fa55001b4c Add tests and fix bug in the parser
torc wasn't set in some part resulting in parsing a 'A' while
in fact the parsed record type should have been returned.
2012-11-22 11:54:46 +01:00
Miek Gieben 5a3db7b240 delayed newline counting
Fix a lot of corning cases for correct newline counting, but not
the ones where the closing brace is solely on a newline.
2012-11-21 22:21:40 +01:00
Miek Gieben c15d4fe3a3 Ugly hack to get line count correct
When the parser has read a \n to error messsage is off-by-one.
This fixes that.
2012-11-21 17:19:16 +01:00
Miek Gieben 314a0eebcc Add support for L32, NID, L64 and LP records 2012-11-18 10:29:05 +01:00
Miek Gieben 20a1a740c5 Check for @ begin used as origin in rdata 2012-11-09 10:34:51 +01:00
Miek Gieben 2999e6a509 Add check origin function 2012-11-08 23:10:31 +01:00
Miek Gieben 6f7aad15d8 documenation 2012-08-21 17:36:58 +02:00
Miek Gieben b720003623 make api smaller 2012-08-17 08:31:38 +02:00
Miek Gieben 7adc5ab95b make origin an fqdn 2012-07-16 19:46:16 +02:00
Miek Gieben 24bc5b8041 Actually use strings.HasPrefix correctly 2012-07-11 11:09:52 +02:00
Miek Gieben 722460f52d documentation 2012-07-06 20:44:41 +02:00
Miek Gieben a3fb69689b use buffered channels, as per Robs suggestion 2012-07-03 20:06:02 +02:00
Miek Gieben 26a6d3f833 small tweaks 2012-05-20 20:46:25 +02:00
Miek Gieben ba99579516 documentation 2012-05-20 17:39:06 +02:00
Miek Gieben 9c67491aee cleanup and extra test 2012-05-20 15:31:35 +02:00
Miek Gieben 7a3af5b729 Support $GENERATE (the bind extension).
It is even better than the bind one, because all records are
supported (as long as the output is valid)
2012-05-20 15:28:27 +02:00
Miek Gieben 95c1154930 documentation 2012-05-08 14:17:17 +02:00
Miek Gieben 52d391e251 Add more documentation 2012-05-03 09:05:30 +02:00
Miek Gieben 7562c68094 documentation updates 2012-05-03 08:53:38 +02:00
Miek Gieben 79ea0f8e31 Fix LOC parsing 2012-05-01 22:21:44 +02:00
Miek Gieben d85d8f9fe9 Start adding LOC tests 2012-04-30 21:42:58 +02:00
Miek Gieben b50e3f690e First chunk in parsing LOC RRs 2012-04-30 16:54:02 +02:00
Miek Gieben 0940f549bf Skeleton function for parsing LOC records 2012-04-30 16:01:07 +02:00
Miek Gieben 7f78754c1d Some tweaks about errors 2012-04-18 14:06:10 +02:00
Miek Gieben 49f41fb17b Install example right away 2012-03-04 10:41:16 +01:00
Miek Gieben df6d86e937 Fix for when not seeing an RR at all 2012-03-03 17:40:30 +01:00
Miek Gieben c7d38a11f1 Prefix with dns: here too 2012-02-29 21:15:58 +01:00
Miek Gieben aed704524c Make the parsing even faster 100K RR/s 2012-02-27 21:12:04 +01:00
Miek Gieben 0c0b97f72b Parsing fix for lines starting with class or TTL
name.   IN SOA  a6.nstld.com. hostmaster.nic.name ....
              IN 7200   NS      j6.nstld.com.
              7200 IN     NS      k6.nstld.com.

Wasn't handled properly
2012-02-27 18:48:53 +01:00
Miek Gieben 3b089b94fc slightly faster parsing 2012-02-23 20:13:37 +01:00
Miek Gieben f9d3068eb9 Parsing speed increase of facter 2/3
Implemented my own little tokenizer in scanner.go. I only use the
stuff I need.
2012-02-21 22:41:00 +01:00
Miek Gieben fee04d5ef9 Small tweaks to make it faster 2012-02-19 20:51:04 +01:00
Miek Gieben c15712dbf6 remove unneed byte() 2012-02-19 19:57:01 +01:00
Miek Gieben 88a0052d1d Fix newline/space handling and braces
( dsjkdjk
djsdjk
)

( dkjsdjsd
  djskdjsd
)

Are two different strings, the above contains NO spaces, the bottom
one does. This doesn't matter anywhere, except in HIP record, which
say some data may not contain spaces.
2012-02-19 12:04:27 +01:00
Miek Gieben c2e99e8b41 Get started for the LOC record 2012-02-18 19:24:53 +01:00
Miek Gieben ef709d6e77 remove empty line 2012-02-15 23:08:21 +01:00
Miek Gieben 4f118afe8c Error start wth a lowercase 2012-02-15 23:04:46 +01:00
Miek Gieben 73c743feb2 Compile error 2012-02-15 21:55:34 +01:00
Miek Gieben 596e0618a7 Update the documentation 2012-02-15 12:50:23 +01:00
Miek Gieben ef524d882a Add features to soa parsing 2012-02-15 09:04:09 +01:00
Miek Gieben 697d67ea96 Fix origin handling and fix lines which start with ownernames
Zonefile handling is more robust and more up to the specs.
Also added a new zone file which has some nice properties
which trigger corner cases.
2012-02-15 08:47:31 +01:00
Miek Gieben 0a79fd28e0 nicer 2012-02-14 16:15:44 +01:00
Miek Gieben 63d8b1feb1 Implement TTLs in words
1H, 1M, 1W2D, etc. should now be parsed in TTLs
2012-02-14 15:14:54 +01:00
Miek Gieben b3a58abd24 discard \r when reading zonefile 2012-02-14 14:05:33 +01:00
Miek Gieben 35bd7ac4f4 Slightly shorter 2012-02-14 13:57:12 +01:00
Miek Gieben 7ef88cf5b3 Add support for @
For this to work ParseZone was extended to accept a starting
origin. This way even zonefiles without $ORIGIN would work
as expected. This is an api change.
2012-02-14 13:46:40 +01:00
Miek Gieben b49e4f2411 Allow @ to be recognized as zone origin 2012-02-14 13:23:09 +01:00
Miek Gieben d10b0f731e We indeed need a larger buffer 2012-02-13 21:57:22 +01:00
Miek Gieben 5dbfc48a5e start fixing for unknown rrs parsing/printing 2012-02-13 21:12:14 +01:00
Miek Gieben b888c94542 Update defttl as we go 2012-02-13 19:26:44 +01:00