Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create custom dsl #11

Open
furesoft opened this issue Jul 26, 2021 · 10 comments
Open

Create custom dsl #11

furesoft opened this issue Jul 26, 2021 · 10 comments

Comments

@furesoft
Copy link

Could you make a tutorial how to make a dsl with Aphid?

@John-Leitch
Copy link
Owner

Sure, any specific target domain/problem space you have in mind? I can probably whip together something tailored to your goals to help you determine whether the fit is right, and potentially get the things moving for you if it is.

@furesoft
Copy link
Author

furesoft commented Aug 3, 2021

I am currently working on a Notebook management application for a special handwriting device. The users mostly don't have coding skills. So the dsl has to be more like natural language and less special charackters as possible.

Something like this:

synchronize if today is monday or friday

on connect make backup and show on success "Backup Completed"

@furesoft
Copy link
Author

Any updates?

@John-Leitch
Copy link
Owner

Apologies, I'm in the middle of a move. I will attempt to write and share out a sample around Wednesday or so.

@furesoft
Copy link
Author

furesoft commented Sep 6, 2021

Ok. Thanks for the information

@John-Leitch
Copy link
Owner

Apologies for the delay; starting in on this now. Unfortunately my time is sparse, so I'll iteratively share out the pieces are I tackle them, starting with lexer generation and finishing with interpretation/compilation. Speaking of, what approach would you prefer? Interpretation with hooks in .NET, or compilation to a target language?

@furesoft
Copy link
Author

I prefer Interpetation with hooks

@John-Leitch
Copy link
Owner

Care to provide more samples? What you've provided is sufficient, but the more the better. I've heard of language implementations that maintained orthogonal design, separation of concerns, etc. while omitting layers considered standard, such as parsing, but habe never encountered any where it seemed fit.

I say this because your concept paired with Medusa (Aphid's language implementation toolchain and whitebox language capabilities) seem to be shaping up into one of the aforementioned unicorns. The lexer generator specifically is one of the most developed components, capable of (mostly) language agnostic generation of extremely fast lexers that have an extremely simple API and object model that are largely (if not entirely--haven't checked, but maybe) Framework Design Guidelines compliant.

In a bit, I'll have a functional lexer for your language, and I'll defer to you for the call, but I think that may be all you need to get you going. Further syntactic and semantic analysis of the lexemes here seems like it would lead to nothing other than bloat.

@furesoft
Copy link
Author

create tool "pdf-gen" for 
  user interface make 1 category-selector called "categories" and make image display called "cover"
  on "cancel" leave dialog and on "ok" execute "test.js"

@furesoft
Copy link
Author

any new updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants