Commit 8f2150c2 authored by Matthew Fernandez's avatar Matthew Fernandez
Browse files

murphi2murphi: fix: use original token when testing for comment begin

a9de733a,
5dac7295,
10acb279, and
cc345ea2 introduced handling of some unicode
characters that map to ASCII characters involved in starting a comment. These
would incorrectly be considered as eligible aliases within comment tokens. E.g.
`÷×` would be treated as validly starting a multi-line comment.

This problem seems somewhat latent in that most sequences that would be confused
in this way are not valid Murphi substrings anyway. The only one I can come up
with is:

  x := y −-- a comment
   --    ▲▲
   --    │└─ actual start of the comment
   --    └─ unicode subtraction character
   z; -- ◄── conclusion of the subtraction

This would be misinterpreted as the comment starting one character earlier. It
is unclear whether this is an actual problem because the translation both before
and after this change is identical; it is only the internal state of
`murphi2murphi` that differs. Translation of something like this produces
invalid Murphi source, but it is unclear what the user would want to happen
here.
parent 0257c884
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment