Libre RISC-V Mailing list Archives (accessible via public-inbox)
 help / color / Atom feed
From: bugzilla-daemon@libre-riscv.org
To: libre-riscv-dev@lists.libre-riscv.org
Subject: [libre-riscv-dev] [Bug 280] POWER spec parser needs to support fall-through cases
Date: Mon, 06 Apr 2020 12:45:11 +0000
Message-ID: <bug-280-13-cSLAaGDH2Q@http.bugs.libre-riscv.org/> (raw)
In-Reply-To: <bug-280-13@http.bugs.libre-riscv.org/>

http://bugs.libre-riscv.org/show_bug.cgi?id=280

--- Comment #8 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
@@ -152,6 +154,8 @@ def annoying_case_hack_filter(code):
     for l in code.split("\n"):
         spc_count = count_spaces(l)
         nwhite = l[spc_count:]
+        if len(nwhite) == 0: # skip blank lines
+            continue
         if nwhite.startswith("case") or nwhite.startswith("default"):
             #print ("case/default", nwhite, spc_count, prev_spc_count)
             if (prev_spc_count is not None and
@@ -473,9 +477,11 @@ switch (n)

that was enough to get it to skip blank lines.  it "Does The Job".

yes it's not "clean / nice" however it's quick and it works.
moving on to the next task, kinda important.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

      parent reply index

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-05 15:57 [libre-riscv-dev] [Bug 280] New: " bugzilla-daemon
2020-04-05 15:58 ` [libre-riscv-dev] [Bug 280] " bugzilla-daemon
2020-04-05 17:01 ` bugzilla-daemon
2020-04-05 20:37 ` bugzilla-daemon
2020-04-05 21:43 ` bugzilla-daemon
2020-04-05 22:12 ` bugzilla-daemon
2020-04-05 22:32 ` bugzilla-daemon
2020-04-06 12:33 ` bugzilla-daemon
2020-04-06 12:45 ` bugzilla-daemon [this message]

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=bug-280-13-cSLAaGDH2Q@http.bugs.libre-riscv.org/ \
    --to=bugzilla-daemon@libre-riscv.org \
    --cc=libre-riscv-dev@lists.libre-riscv.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

Libre RISC-V Mailing list Archives (accessible via public-inbox)

Archives are clonable: git clone --mirror https://inbox.libre-soc.org/libre-riscv-dev

Example config snippet for mirrors


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git