symphonytool / symphony

The Symphony IDE
5 stars 4 forks source link

Channel parsing `c.1.2` produces unexpected results #215

Closed joey-coleman closed 10 years ago

joey-coleman commented 10 years ago

Anywhere a channel is parsed –communications, chansets, etc– the parsing of numbers will produce unexpected results. For example, c.1.2 -> Skip will produce the equivalent of c.(1.2) -> Skip. Things like c.1.2.3 -> Skip are undefined.

The current workaround is to parenthesise numbers, so, if a channel is declared as c : nat * nat, use c.(1).(2) -> Skip to synchronise on the values 1 and 2. Using ! instead of . also avoids the problem (but that option is only available in communications).

joey-coleman commented 10 years ago

Cost to fix is fairly high on this — it would take a fair bit of re-engineering in the parser/tokenizer, as the problem is actually in the scanner (we cannot have two tokenizer rules that both match numbers). So this will have to be documented out unless we suddenly have a large block of time.