adrian-thurston / colm

The Colm Programming Language
MIT License
164 stars 31 forks source link

colm failing to parse a legal pattern #147

Open adrian-thurston opened 2 years ago

adrian-thurston commented 2 years ago

In the attached Colm program, at the end of the file, the pipe operators in the "" pattern text cause parse errors. Changing these to reference the literals by their name, as in the following code, allows the pattern to parse. Also to note, removing the unicode ualpha from identifier and replacing it with alpha also allows the pattern to parse.

for PE: pipe_expression in Flux {
    if match PE [
        pipe_expression
        `|> "aggregateWindow" call_expression
        `|> "to" call_expression
    ]
    {
        print[ "match\n" ]
    }
}

pattern-parse-error.lm