From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2 1/2] lib: Add generic boolean expression parser and eval
Date: Tue, 27 Oct 2020 16:45:29 +0100 [thread overview]
Message-ID: <20201027154529.GA20643@yuki.lan> (raw)
In-Reply-To: <874kmfvg3q.fsf@suse.de>
Hi!
> > +/*
> > + * Note that we avoid modifying the list until the end so that the caller can
> > + * free memory correctly, which is the reason we have a stack for
> > parentesis
>
> If you use a new vector/stack for the output queue instead of an
> intrusive list then this problem should go away. We have an upper bound
> for any token/expr vector which is the length of the input string. So it
> is possible to preallocate an input array instead of using a dynamically
> allocated linked list.
Or we can run the tokenizer twice and first time only record number of
tokens...
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2020-10-27 15:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-27 11:04 [LTP] [PATCH v2 0/2] Add support for kconfig constraints Cyril Hrubis
2020-10-27 11:04 ` [LTP] [PATCH v2 1/2] lib: Add generic boolean expression parser and eval Cyril Hrubis
2020-10-27 15:33 ` Richard Palethorpe
2020-10-27 15:45 ` Cyril Hrubis [this message]
2020-10-27 11:04 ` [LTP] [PATCH v2 2/2] lib/tst_kconfig: Make use of boolean expression eval Cyril Hrubis
2020-10-28 3:45 ` Xiao Yang
2020-10-29 10:39 ` Cyril Hrubis
2020-11-02 10:17 ` Li Wang
2020-11-02 10:38 ` Cyril Hrubis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201027154529.GA20643@yuki.lan \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.