Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Long line truncation issues? #22

Open
Daniel314 opened this issue Oct 12, 2018 · 1 comment
Open

Long line truncation issues? #22

Daniel314 opened this issue Oct 12, 2018 · 1 comment

Comments

@Daniel314
Copy link

I'm having a problem with Gelatin failing to match on long lines. Is there a line length limit?

Case in point: given the following line

set ca "-----BEGIN CERTIFICATE-----MIIDyTCCArGgAwIBAgIQfL6Zck9KLYFGZ0kGPboOdTANBgkqhkiG9w0BAQUFADBrMRMwEQYKCZImiZPyLGQBGRYDZWR1MRwwGgYKCZImiZPyLGQBGRYMY29sb3JhZG9tZXNhMRIwEAYKCZImiZPyLGQBGRYCYWQxIjAgBgNVBAMTGUNvbG9yYWRvTWVzYVVuaXZlcnNpdHktQ0EwHhcNMTIwNDI1MTcxOTI2WhcNMjcwNDI1MTcyOTI1WjBrMRMwEQYKCZImiZPyLGQBGRYDZWR1MRwwGgYKCZImiZPyLGQBGRYMY29sb3JhZG9tZXNhMRIwEAYKCZImiZPyLGQBGRYCYWQxIjAgBgNVBAMTGUNvbG9yYWRvTWVzYVVuaXZlcnNpdHktQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCe+cda5Xk4AbJFNiN6sVXMsl5QGBcIfPnPa6ytmpSmRQD0Ce/bCBQU4mxruBczlVinJ6UR+jslrnWF7bwSHKmN8CDNYVYGnTIYOqnnx8N89d2RE00agycDHlg6pV3PB5azbo5cG1M9JmKaWlNXZDGpTurTmFE6rOr5yGPAgZ1eunZTMiHq1uQhpXF/sIEOEx/3hYkLHmFW4HGXww27i5G4/rl81qLOqevsCf85uMTrVuE9xvSU+VuabxkR1sajV+o5cMsRY84BZJToHl+ECIZP9pBzWSheVMYMg2ZgX0uNAg6OVgNJ3P2Wpi4VG3rRrSsOCZ6xRD0UdgvhAxdy5+zRAgMBAAGjaTBnMBMGCSsGAQQBgjcUAgQGHgQAQwBBMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBQVC6yhHmS+36I8MNBd54scdWnCujAQBgkrBgEEAYI3FQEEAwIBADANBgkqhkiG9w0BAQUFAAOCAQEAWnQVv32b92Gbabe22YSOwZQ5uTx3mwsoiYROTjQEGoTje+F21nynmD8Qn5GgVardg2Yk2bYvDvBdCk3GxuBgGgPm4PrhcrQmrxP5KnlCwt6Co7aw6/dY7UvzX5zZSjv/EiDLa0MsfLDFf+o9EmtyeL4tel4eqSo/qpUW9A22KgULiLFnvllkdlaYLbizLSiOobvWrJ/ygto8O/RFGy3n/qLeOcpy3U1U1HhK5Cf3js/M80ADFgHqyWkycWTY6C/wJ5n8Ku1Lk6ZdQejDAFkcuTOwteUS7YA4UCx3Mxik1I+oOiTlbLy6C8UMzRwhcygne5Zw6AgLhi8tzeFZpa4mZw==-----END CERTIFICATE-----"

Fails to match the following grammar:

define set      /\s*set/
define ws /[ \t]+/
define bareword       /[^"\s]+/
define dq /"/
define eol /[ \t]*[\r\n]/
define longtext /[^"\r\n]+/

grammar input:
    match set ws bareword ws dq longtext dq eol:
        do.return()

However, if I shorten that line down considerably by truncating the double-quoted string, then it matches....

@knipknap
Copy link
Owner

knipknap commented Oct 12, 2018

I'm currently not on a PC, but the quick answer is, there is an internal buffer limit for performance reasons somewhere. I'm sure it can be changed, but I don't remember where are the moment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants