the-gss/vfl-compiler — pull request #7 by paulyoung (2014-06-03 18:25:00+00:00)
Title: Fix strength and weight

#6 revealed what I think is a bug with the grammar. I made this change and now tests are failing.

@d4tocchini - need some input from you on a few things:

**1.** Should these outer square brackets be valid?

```vfl
@vertical [#box(<=100!required,>=30!strong100)]; // multiple predicates w/ strength & weight
Error on line 1, column 11: Expected VFL Element, [a-zA-Z0-9#.\-_$:""], comment, end of line or whitespace but "[" found.

1 : @vertical [#box(<=100!required,>=30!strong100)]; // multiple predicates w/ strength & weight
^ : ----------^
```

**2.** This change matches the rule in the CCSS grammar but some specs are now failing because strength is missing. Is strength optional in VFL, e.g. `!99`?

**3.** Some specs are failing because they expect `!required` but the actual is `!require`. Rather than update the specs, I think the right thing to do is update the `Strength` rule to `/ ("required" / "REQUIRED" / "Required") {return "required";}` and then the CCSS compiler should convert `required` to `require`. Now "required" is never matched. Any ideas why?

**4.** Some specs are now failing because they have an additional item in the array of CCSS rules. Any pointers on why this is happening?
```vfl
AssertionError: expected [ Array(5) ] to deeply equal [ Array(4) ]
+ expected - actual

[
"#b1[right] == #b2[left]",
"#b2[right] == #b3[left]",
"#b1[width] == [colwidth] == #b2[width] == [colwidth] == #b3[width] !strong",
+ "#b1[width] <= 500 >= #b2[width] <= 500 >= #b3[width] !required"
- "#b1[width] <= 500 >= #b2[width] <= 500 >= #b3[width] !require",
- "#b1[width] == d == #b2[width] == d == #b3[width]"
]
```