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

New DIY rep structure #16

Open
johnsonjh opened this issue Mar 2, 2021 · 0 comments
Open

New DIY rep structure #16

johnsonjh opened this issue Mar 2, 2021 · 0 comments

Comments

@johnsonjh
Copy link
Member


As discussed, we need a new DIY rep.

Here is what I propose:

Implementation:

I think I made the wrong decision to confine the DIY rep implementation to a Makefile. I think we should use shell-scripts as for the built-ins. These could, of course, include a Makefile (as does MTT). However, I do think it best to include all the languages in the one script, and the script always returns 2 (or some other non-zero error) if it does not implement a particular language.

Interface:

We extend mtt to include representation-specific options:

  • mtt [mtt-options] sys [rep-options] newrep lang

mtt then tries to run:

  • mtt_rep_newrep [rep-options] lang

...if the rep does not exist, mtt proper is invoked (as at present). But this also happens if mtt_rep_newrep returns 2 as above.

I think this overcomes the problem you mention in the previous mail. That is, newrep can extend (or indeed replace) built-in representations to include new languages.

All DIY reps can be interrogated by mtt e.g.:

  • mtt_rep_newrep --help writes helpful text to standard output
  • mtt_rep_newrep --usage writes usage info to standard output
  • mtt_rep_newrep --texi wites texinfo documentation to standard output

This provides the basis for a comprehensive help facility in mtt.

I like the idea of a single file for all of this; thus the script would contain other files and write them as
necessary.


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

No branches or pull requests

1 participant