poke-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] pkl: add `\r\n' sequence to newline definition


From: Jose E. Marchesi
Subject: Re: [PATCH] pkl: add `\r\n' sequence to newline definition
Date: Wed, 06 Sep 2023 15:16:04 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

In principle I don't see anything wrong in recognizing DOS-like newline
sequences in the lexer.

But this is gonna need a documentation part as well :)

> 2023-09-06  Mohammad-Reza Nabipoor  <mnabipoor@gnu.org>
>
>       * libpoke/pkl-lex.l (NEWLINE): Add `\r\n' sequence to newline
>       definition.
> ---
>  ChangeLog         | 5 +++++
>  libpoke/pkl-lex.l | 2 +-
>  2 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/ChangeLog b/ChangeLog
> index 6c357831..8a014681 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -1,3 +1,8 @@
> +2023-09-06  Mohammad-Reza Nabipoor  <mnabipoor@gnu.org>
> +
> +     * libpoke/pkl-lex.l (NEWLINE): Add `\r\n' sequence to newline
> +     definition.
> +
>  2023-09-06  Jose E. Marchesi  <jemarch@gnu.org>
>  
>       * doc/poke.texi (elfextractor): Fix example.
> diff --git a/libpoke/pkl-lex.l b/libpoke/pkl-lex.l
> index 283bacd5..0af3406a 100644
> --- a/libpoke/pkl-lex.l
> +++ b/libpoke/pkl-lex.l
> @@ -189,7 +189,7 @@ build_overflow_error_msg (uint64_t value, int width)
>  
>  %}
>  
> -NEWLINE            \n
> +NEWLINE            (\r\n)|\n
>  BLANK              [ \t]
>  LETTER             [a-zA-Z]
>  FIELD_NAME         {LETTER}[a-zA-Z0-9_]*



reply via email to

[Prev in Thread] Current Thread [Next in Thread]