Izumi: Ralf - Hint Plan
Index: Home     | What Is Izumi | Misc Links   | Random Thoughts | Too Much To Read | The Rant Vault | Quotes
Dev:   Projects | Ideas For Dev | Nerdkill | Rig | Hint

The Hint Programming Language: Dev page - Plan page

0. Deprecated Project Notice

20050122 Warning: This project is indefinitely put on hold.


1. Milestone 1

1.1. Goal

20040723

Define the Hint Bootstrap, a minimal set of execution unit with the most simple language possible yet generic to serve as a base for expansion.

20050830

One of the design goals is to be able to expand the language from within. The best way to achieve this is to define a minimalistic syntax for both lexer, grammar and semantics that is going to be hardcoded in a bootstrap parser. This syntax should be able to override itself. Thus the language can be implemented in two parts, one in the bootstrap and then the rest using the language itself.

Implementation should be in two parts:


1.2. Stories

20040723


1.3. Tasks

TBD


1.4. Implementation Notes

20040424

20040425

Language semantics:

Language syntax (BNF) and interpretation:

:lexer: \:lexid\: lex-expr
	:arith:   expr + expr | expr - expr | expr * expr | expr / expr | \(expr\) | -expr (Source: Dragon book)
	:expr:    arith | fcall | onew | fnew | var | num
	:var:     id *( \. id ) ?array
	:array:   \[ list \] | \[ \]
	:list:    expr *( \, expr)
	:fcall:   fname fparams
	:fname:   id
	:fparams: *(expr)
	:affect:  var = expr
	:fnew:    (\func | \function) ?var - farg - fbody \end
	:farg:    *(id)
	:fbody:   *(stmt)
	:onew:    \new var
	:onewi:   \newi var array
	:stmt:    ( lexer | affect | expr ) [ ; \n ]

These are not perfect (and probably buggy) but will do for a start.
Note that :lex-expr: is not defined here.

20040508

Lexer tokens:

:binary-plus: + :binary-minus: - :binary-mult: * :binary-div:
:group-open: ( :group-close: ) :unary-minux: - :array-open: [ :array-close: ] :list-sep: , :affect-eq: = :func-decl: func | function :func-var: - :func-args: [ - \n ] :func-end: end :id-scope: . :stmt-end: [ ; \n ]

Note that new and newi should respectively match hint.new and hint.newi. They do not need to internal lexer-specific commands. That has the side effect that new and newi can be overriden by the local scope. No kidding.

20040723

Bootstrap Hint syntax:

These are defined as regexps (System.Text.RegularExpression.Regex is supported by the .Net Compact fx 1.1). No specific difference is made here between lexem and syntax rules definitions.

:ws: [ \t]+ :ws0: [ \t]* :lexid: [a-z]+ :lex-expr: .*$ :lexer: :lexid: ws0 lex-expr

:stmt: var-decl | fun-decl | expr
	:expr:		arith | fcall | var | num
	:arith:		expr + expr | expr - expr | expr * expr | expr / expr | \(expr\) | -expr (Source: Dragon book)

:sep: [;\n]

:var-decl: \var ws name = expr sep


1.5. Implementation


1.6. Plan

To do (sorted by priority)

20040508 [1.N] [2 p] Lexer: Minimal token table, reads from string & file via NUnit
20040508 [1.N] [2 p] Syntax: Structure grammar & AST, parse :arith: with numerals, create AST
20040508 [1.N] [2 p] VM: Structure VM, evaluate AST with :arith:

Working on (sorted by priority):

Done (sorted by date):

20040508 [1.F] [1 p] Specs: Defined lexer tokens. Updated bnf rules.
20040506 [1.F] [1 p] Specs: Define minimal language syntax and behavior.
20040425 [1.F] [1 p] Project: Create main test project with NUnit
20040425 [1.F] [1 p] Lexer: Create project
20040424 [1.F] [1 p] Project: Prepare project and plan document


Site License

Creative Commons License
This work is licensed by Raphaël Moll under a Creative Commons License.

Options
Color Theme: Gray  | Blue  | Black | Sand  | Khaki  | Egg  | None

Web ralf.alfray.com Powered by Google

Display Izumi & PHP Credits

Stats
371 accesses, 1 access from 38.107.179.207
Visited 7 times by Google, last 2012/03/16 10:35
Visited 8 times by Yahoo!, last 2011/10/09 11:53
Visited 1 times by MSN, last 2011/06/17 01:01

< Generated in 0.42 seconds the 05/20/2012, 07:14 AM by Izumi 1.1.4 >