This morning then was work on Tangent. Whimsy pushed me to work on simple parsing for expressions. Not quite sure why since it's not the next step in the work (though it's probably because the actual next steps are more daunting).
Anyways, the lexical stuff is using the Lexer stuff for C# I have from an existing project. The grammar for things is currently very, very simple:
block := { statement* }statement := element* ;element := identifier|member_access|type_parameterization|paren_expression|operator_shorthand|blockidentifier := member_access := .type_parameterization := < element >paren_expression := ( element* )operator_shorthand :=
Very simple. Most of the work will be done later taking the stream of elements and organizing them into a sane order of operations. There is a slight problem with this compared to more traditional parsers, mainly the type parameterization.
Something like Dictionary foo will need to be Dictionary<(int,string)> foo. Mildly annoying, but multi-parameter generics aren't terribly common and I can't think of a better way to keep things intuitive-ish, while also disambiguating the angle bracket usages.
And I don't suspect things will get much more complex for code that isn't type declarations.