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

jsh 2.0 from the ground up #71

Open
jovanbulck opened this issue Oct 7, 2015 · 0 comments
Open

jsh 2.0 from the ground up #71

jovanbulck opened this issue Oct 7, 2015 · 0 comments
Labels
Milestone

Comments

@jovanbulck
Copy link
Owner

As you have probably noticed, jsh development has been lagging for a while. In the meantime however, my C skills and understanding of programming languages have vastly improved. jsh started as a proof-of-concept fun program and therefore lacks a solid formal programming language foundation. As a result, I've been considering a jsh redesign from scratch for a while now. A minimal elegant shell instead of hacking in new feature requests.

Design goals

  • jsh should be structured into pluggable C modules to allow for maximal
    cohesion, flexibility and code reuse
  • jsh's shell grammar should be rethought, unambiguously formalized and made compliant to the POSIX standard
  • jsh should have a clearly separated lexer, parser and interpreter. In short, the lexer converts the user's string input into a list of recognized tokens (and maybe also performs alias substitution as needed). Next, the parser converts the token list into an abstract syntax tree that can later be traversed by the interpreter, according to the grammar.

Proposed approach

jsh's grammar should start simple and subsequently be extended as desired. The lexer and parser should be generated from the formal grammar using the free software tools Flex and Bison.

Doing the above will take time, especially since I have no experience with lexers/parsers/interpreters --all help is appreciated ;-) I believe however that it will greatly improve the quality of the code base. And --which is more-- it will be fun...

When I have time --probably not very soonish-- I'll start working on this in a brand new jsh-dev branch. The first stable version will be released as jsh 2.0 and from then on the current master branch will be discontinued and moved to a jsh-legacy branch.

@jovanbulck jovanbulck added the core label Oct 7, 2015
@jovanbulck jovanbulck added this to the jsh-2.0 milestone Oct 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant