W3C home > Mailing lists > Public > public-css-archive@w3.org > August 2021

Re: [csswg-drafts] [css-values] Automatic parsing of value definitions (#2921)

From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
Date: Thu, 19 Aug 2021 19:36:46 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-902187106-1629401805-sysbot+gh@w3.org>
Re: parsing greediness, I'm not sure I understand your response.

As I said, parsing is *non*-greedy; if the first branch that starts to match eventually fails, you just move on to the second branch and try again. There's no need to order the branches in any particular way to accommodate this, so we order them for readability usually.

If you're trying to match CSS grammars against values using a greedy (non-backtracking) parser, you're gonna have a bad time. You have to be able to backtrack.

GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2921#issuecomment-902187106 using your GitHub account

Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 19 August 2021 19:36:47 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:42 UTC