Ceylon Markdown

146 views
Skip to first unread message

Rohit Mohan

unread,
May 4, 2016, 1:32:47 AM5/4/16
to ceylon-dev

Hi,

I will be working on a Markdown processor in Ceylon this summer for my GSoC 2016 project.

I was just wondering if I can use the name ceylon.markdown for my module.

--

Rohit Mohan

Lucas Werkmeister

unread,
May 4, 2016, 10:43:48 AM5/4/16
to ceylo...@googlegroups.com

I guess I need to ask the same question for my project, the Ceylon to Typescript model converter.

Perhaps something in the ceylon.tool “namespace”? ceylon.tool.loader.typescript, ceylon.tool.processor.markdown, something like that?

--
You received this message because you are subscribed to the Google Groups "ceylon-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ceylon-dev+...@googlegroups.com.
To post to this group, send email to ceylo...@googlegroups.com.
Visit this group at https://groups.google.com/group/ceylon-dev.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceylon-dev/697f9a91-ff26-4e33-be0d-bb44dea06eac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tom Bentley

unread,
May 4, 2016, 10:50:41 AM5/4/16
to ceylon-dev
Personally I'd be quite happy to see ceylon.markdown. I think that's better than ceylon.tool.processor.markdown or similar because I expect this module to provide an API people can use to integrate markdown processing into their own modules.

For the typescript model loader, ceylon.tool.loader.typescript sounds OK to me. FTR the JVM compiler's model loader is in com.redhat.ceylon.compiler.java.loader.

Bastien Jansen

unread,
May 4, 2016, 10:54:20 AM5/4/16
to ceylo...@googlegroups.com

I think the markdown processor belongs to the SDK, and should be named ceylon.markdown

Rohit Mohan

unread,
May 4, 2016, 11:58:52 AM5/4/16
to ceylon-dev
The Markdown processor will mostly be split into multiple modules. 

Namely, 
  • One module for the AST classes and to convert the input to AST
  • One module for AST to HTML
  • One module for AST to plain text
  • One for the command line tool

So, I guess the modules would be named ceylon.markdown.something then?

 t​

Rohit Mohan

unread,
May 12, 2016, 4:14:15 AM5/12/16
to ceylon-dev

So I’ve got the project on https://github.com/rohitmohan96/ceylon.markdown

I have named the module for the AST classes and parser as ceylon.markdown.core.

Rohit Mohan

unread,
Jun 15, 2016, 5:14:38 PM6/15/16
to ceylon-dev
I've been working on the first phase of the parser for some time now and have been wondering on how to write tests for it.

Gavin King

unread,
Jun 15, 2016, 5:45:07 PM6/15/16
to ceylo...@googlegroups.com
Well, you need some way to compare input with output. Input is a
String (markdown text) but what is the output? A stream of tokens? AST
nodes?
> https://groups.google.com/d/msgid/ceylon-dev/137c90fd-bec6-4e07-9665-150c7bfec850%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



--
Gavin King
ga...@ceylon-lang.org
http://profiles.google.com/gavin.king
http://ceylon-lang.org
http://hibernate.org
http://seamframework.org

Rohit Mohan

unread,
Jun 15, 2016, 5:47:57 PM6/15/16
to ceylo...@googlegroups.com
The output is an AST.


For more options, visit https://groups.google.com/d/optout.
--
--

Rohit Mohan

Gavin King

unread,
Jun 15, 2016, 7:56:12 PM6/15/16
to ceylo...@googlegroups.com
Well, perhaps you could implement a toString() method that produces
something json-like, and compare the json with what you expect.
> https://groups.google.com/d/msgid/ceylon-dev/CAF7ZTxK5BH3L0yMDugGyhL7AdYnG184OCfastaNE2nt5NN71Wg%40mail.gmail.com.

Lucas Werkmeister

unread,
Jun 15, 2016, 8:01:10 PM6/15/16
to ceylo...@googlegroups.com
The CommonMark implementation seems to include an option to emit the AST
as XML: http://spec.commonmark.org/dingus/

The examples in the specification also double as test cases, so once you
emit HTML, you can check that your module emits the same HTML code for
those examples as in the specification. The format seems to be: a code
block starting with loads of backticks and the tag “example”, then the
Markdown code, then a line with a single period in it, then the HTML
code for that Markdown code, and then the end of the code block (more
backticks). This seems to be their code to parse that:
https://github.com/jgm/CommonMark/blob/master/test/spec_tests.py#L91-L111

Rohit Mohan

unread,
Jun 16, 2016, 8:26:46 AM6/16/16
to ceylo...@googlegroups.com

OK thanks.



For more options, visit https://groups.google.com/d/optout.
--
--

Rohit Mohan
Reply all
Reply to author
Forward
0 new messages