;;; hello, world ;;; ;;; simplest correct document [[document title;'hello.carrot']] hello, world! ;;; document plaintext
With this, 3 years of effort comes to fruition, and Carrot takes a giant step towards being real. Here's what happened:
- A Grammarian object is instantiated
- A Lexer object is instantiated within the Grammarian
- The Grammarian, controlling the Lexer, reads through the document until something that isn't a comment or whitespace comes along
- A Document pragma handler is instantiated
- The Document handler is asked if it handles the token the Grammarian is looking at
- If not, the document is nonconformant, a status is set, and processing terminates here
- Else, the Document handler is passed control of the Lexer
- If all goes well, the Document handler parses the contents of the document trigger into a datastructure, which is returned to the Grammarian
- The Grammarian then instantiates a DOM object, giving it the results of the Document handlers's work as the root node of the new document
- I do a little dance because it works It Works IT WORKS!!
Tomorrow I'll be writing (lots) more tests, and I hope to have a demo online by Wednesday, 1 October.
No comments:
Post a Comment