Yttrium Parser: Grammar Preview
Like Math.NET Classic, Yttrium will provide a parser to construct a system from an infix string. During the last two days I've begun writing the parser, based on the new more systematic parsing infrastructure introduced in (never released) Symbolics Classic v0.19. Porting to Yttrium has shown to be astonishingly easy and quickly even though the completely different target. I could reuse about 80% of the code directly - looks like for once the modular architecture really made sense. Remember that due to the dynamic and configurable behavior the grammar is (at least in my opinion) not suitable for EBNF-like parser generators. The Language is not context-free, at least not in the strict textbook sense.
Some samples how the new Yttrium language will look like (most of it is already realized in code and working, but still easy modifiable - feedback is very welcome):
Concurrent signal assignment
Procedural assignments we know from classic imperative languages don't exist:
1: 2: |
|
Instantiation
Ports may define multiple outputs:
1:
|
|
Defining new entities and architectures
1: 2: 3: 4: |
|
Signal forwarding to the application
Other operations like signal assignments return signals as well:
1: 2: 3: |
|
Signal properties
This part is not fix yet:
1: 2: 3: 4: |
|
Feedback?
Full name: Microsoft.FSharp.Core.Operators.sin
Full name: Microsoft.FSharp.Core.Operators.not