Re: [PATCH 3/5] dts: add parsing utility module

2024-04-30 Thread Jeremy Spewock
On Tue, Apr 30, 2024 at 6:49 AM Luca Vizzarro wrote: > > > > Is it simpler to default this to base 10? I assume that's what it'll > > be most of the time so we might as well allow users to skip this > > parameter. > > Base 0 just assumes the base of the number from the number prefix[1]. So > if i

Re: [PATCH 3/5] dts: add parsing utility module

2024-04-30 Thread Luca Vizzarro
On 29/04/2024 17:15, Jeremy Spewock wrote: It would be helpful if this top level docstring explained more of how to use the text parser and some examples of using a small dataclass that chains some of these methods together. At first glance it wasn't clear to me why things were done the way they

Re: [PATCH 3/5] dts: add parsing utility module

2024-04-29 Thread Jeremy Spewock
On Fri, Apr 12, 2024 at 7:11 AM Luca Vizzarro wrote: > > @@ -0,0 +1,147 @@ > +# SPDX-License-Identifier: BSD-3-Clause > +# Copyright(c) 2024 Arm Limited > + > +"""Parsing utility module. > + > +This module provides :class:`~TextParser` which can be used to model any > data structure > +that can

Re: [PATCH 3/5] dts: add parsing utility module

2024-04-16 Thread Luca Vizzarro
On 16/04/2024 09:59, Juraj Linkeš wrote: From this commit message, I don't know why we're adding the module. What are we going to use it for? Since you mentioned you'll send a v2, I'll wait with review after that as I think it'll make it a bit easier to review. Ack. Will rewrite the commit bod

Re: [PATCH 3/5] dts: add parsing utility module

2024-04-16 Thread Juraj Linkeš
On Fri, Apr 12, 2024 at 1:11 PM Luca Vizzarro wrote: > > Adds parsing text into a custom data structure. It provides a new > `TextParser` dataclass to be inherited. This implements the `parse` > method, which combined with the parser functions, it can automatically > parse the value for each field

[PATCH 3/5] dts: add parsing utility module

2024-04-12 Thread Luca Vizzarro
Adds parsing text into a custom data structure. It provides a new `TextParser` dataclass to be inherited. This implements the `parse` method, which combined with the parser functions, it can automatically parse the value for each field. Signed-off-by: Luca Vizzarro Reviewed-by: Paul Szczepanek -