|
|
|
|
|
by sttaft
2687 days ago
|
|
There is no doubt that ParaSail syntax is verbose, mainly because it was designed more with readability than writeability in mind. But knowing how strong are the feelings about syntax, we actually designed four different parsers (all of which are included in the downloadable release). The one we use normally is the one we wrote about, and is the most oriented toward readability. The other three have somewhat winsome names and presumably obvious connections to Python, Java, and SPARK: Parython, Javallel, and Sparkel. In fact, the ParaSail parser permits the use of Python-like syntax, with ":" instead of keywords like "then" or "loop" and no "end blah" (so long as the indentation is all copacetic), and "def" instead of "func" -- hence: def Sum_Of_Squares(N : Int) -> Int:
return (for I in 1 .. N => <0> + I ** 2)
is legal ParaSail syntax. Parython uses a syntax similar to this, but with the "for loop" syntax re-arranged a bit to better match existing Python syntax.So the hope is for folks to look a bit beyond the surface syntax, and consider the underlying semantic model, which is hopefully where the more interesting issues reside in any case. -Tuck |
|