public inbox for linux-trace-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>
To: Masami Hiramatsu <mhiramat@kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org
Subject: [PATCH v2 1/2] Documentation: bootconfig: Add EBNF definiton of bootconfig
Date: Sat, 14 Mar 2026 19:10:49 +0900	[thread overview]
Message-ID: <177348304960.463670.10025294494717117792.stgit@devnote2> (raw)
In-Reply-To: <177348304012.463670.8543295382997674229.stgit@devnote2>

From: Masami Hiramatsu (Google) <mhiramat@kernel.org>

Add the EBNF definition to Documentation/admin-guide/bootconfig.rst
as an additional section to formally define the bootconfig syntax.

Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
---
 Changes in v2:
  - Move EBNF as a separated section.
---
 Documentation/admin-guide/bootconfig.rst |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/Documentation/admin-guide/bootconfig.rst b/Documentation/admin-guide/bootconfig.rst
index f712758472d5..41bd1ee92395 100644
--- a/Documentation/admin-guide/bootconfig.rst
+++ b/Documentation/admin-guide/bootconfig.rst
@@ -152,6 +152,23 @@ Note that you can NOT put a comment or a newline between value and delimiter
  key = 1 # comment
        ,2
 
+EBNF definition
+===============
+
+The syntax is defined in EBNF as follows::
+
+  Config = { Statement }
+  Statement = [ Key [ Assignment | Block ] | Comment ] ( "\n" | ";" )
+  Assignment = ( "=" | "+=" | ":=" ) ValueList
+  ValueList = [ Value { "," [ { ( Comment | "\n" ) } ] Value } ]
+  Block = "{" { Statement } "}"
+  Key = Word { "." Word }
+  Word = [a-zA-Z0-9_-]+
+  Value = QuotedValue | UnquotedValue
+  QuotedValue = "\"" { any_character_except_double_quote } "\""
+              | "'" { any_character_except_single_quote } "'"
+  UnquotedValue = { any_printable_character_except_delimiters }
+  Comment = "#" { any_character_except_newline }
 
 /proc/bootconfig
 ================


  reply	other threads:[~2026-03-14 10:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-14 10:10 [PATCH v2 0/2] bootconfig: Add EBNF definition and more tests Masami Hiramatsu (Google)
2026-03-14 10:10 ` Masami Hiramatsu (Google) [this message]
2026-03-14 10:10 ` [PATCH v2 2/2] bootconfig: Add more test samples Masami Hiramatsu (Google)

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=177348304960.463670.10025294494717117792.stgit@devnote2 \
    --to=mhiramat@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox