Commit Graph

15 Commits

Author SHA1 Message Date
Daniel Colson 466876dbe9 Use full path for ragel svg task
Currently the ragel:svg task is broken. We need to use the full path
because of a change to Rake in https://github.com/ruby/rake/pull/39.

We already changed this for the ragel:generate task in
20ffe29a45
2021-03-10 16:22:09 -08:00
Yusuke Nakamura c8657d7576
Format generated ruby files by ragel using rufo gem
Closes #1222
2018-04-13 00:07:04 -07:00
Yusuke Nakamura 20ffe29a45 Set full path of the ragel source file to rake task
In Rake v12.1.0 or higher, the algorithm of resolve file dependency
was changed in https://github.com/ruby/rake/pull/39 .

Then rake task "ragel:generate" is works incorrectry that require
wrong ragel source file.
As the example, rake resolves "lib/mail/parsers/address_lists_parser.rb"
needs "lib/mail/parsers/address_lists.rl", but this file is not exist.

Therefore, fixed that to pass full path of the ragel source file
to rule.
2018-04-13 00:29:51 +09:00
Jeremy Daer 7ef5694b77 Shush parser warnings without using an unreliable autoload
We already explicitly require parsers from message elements,
so drop the toplevel autoload and move warning suppression
into the parsers themselves.

Fixes #1162
2017-11-01 18:01:23 -07:00
Jeremy Daer 322ba78b04
Fix regexps syntax broken in 1be3e5fee9 2017-11-01 17:34:13 -07:00
swamp09 1be3e5fee9 Suppress `warning: ambiguous first argument; put parentheses or a space even after `/' operator` 2017-09-12 16:54:34 -07:00
Jeremy Daer 7724ef106f
Parse UTF-8 mail headers per RFC6532
Implement RFC6532 extension to RFC5322 for parsing UTF-8 messages.

* Ragel parser for valid UTF-8 characters
* Parse as bytes rather than chars
* Encode parsed strings as UTF-8
* No longer b/q-encode UTF-8 header values when parsing emails
* For compatibility with others, b/q-encode UTF-8 headers when generating emails

Closes #1103. Fixes #39.
2017-05-14 11:21:43 -07:00
Jeremy Daer 88b17697ab
Ragel: drop source line numbers from generated parsers since any definition change causes giant commits to update all numbers. Reenable selectively for debugging. 2016-09-27 23:03:05 -07:00
Jeremy Daer 0778261131
Ragel: merge machines into parsers 2016-09-25 22:33:31 -07:00
Jeremy Daer a1078a0a55
Ragel: drop intermediate Ragel module, move everything into Parsers 2016-09-20 20:47:00 -07:00
Jeremy Daer 8ab27f4b31
Ragel: move generated machines up with parsers 2016-09-20 20:16:18 -07:00
Jeremy Daer 874ad7c24d
Modular Ragel definitions and incremental parser builds
* Annotate and modularize Ragel parser
* Set up Rake rules and dependencies for incremental builds
* Generate dot + SVG for parser
2016-09-19 18:25:10 -07:00
Jeremy Daer 2de9ab1091
Corpus verification cleanup and benchmarking 2016-09-19 18:14:35 -07:00
Benjamin Fleischer 01263a8ad0 Remove ActiveSupport definition dependency; Update to Unicode 7.0.0 2015-07-07 09:16:28 -05:00
Conrad Irwin 91205d6a58 Move tasks out of lib/ to avoid namespace pollution Issue #566 2013-06-27 00:02:23 -07:00