User loginNavigation |
OO type systems and BNFsI'm looking at a type system that attempts to combine aspects of syntactic and semantic analysis. Say in a BFS, we have a grammar grammar production for a non-terminal like:
Now, to me, it simply looks like an OO type declaration with a closed set of subtypes; i.e.,
The BNF approach resembles ML datatype declarations, which exhibit sybtyping. The OO approach is more extensible (new sub-classes can be added anytime) but lacks the ability to define other aspects of syntax (adjacent elements). Also, we never really think of a type as something to drive refinement autoamtically (e.g., an automatic specialization from statement to method-call). So I'm wondering if anyone has ever tried to unify "types" with "grammars" before? I'm sure this isn't an original idea, but I'm not sure what keywords to google (term rewriting, transformational PL, ... haven't gotten me anywhere). By Sean McDirmid at 2012-07-17 11:24 | LtU Forum | previous forum topic | next forum topic | other blogs | 5038 reads
|
Browse archives
Active forum topics |
Recent comments
27 weeks 2 days ago
27 weeks 2 days ago
27 weeks 2 days ago
49 weeks 3 days ago
1 year 1 week ago
1 year 3 weeks ago
1 year 3 weeks ago
1 year 5 weeks ago
1 year 10 weeks ago
1 year 10 weeks ago