racket / parser-tools

11 stars 20 forks source link

doc: add examples for lexer and parser #12

Closed sorawee closed 2 years ago

sorawee commented 3 years ago
mflatt commented 3 years ago

Would it make sense to move the lexer example to either the beginning of the section or in define-tokens? It seems more easily overlooked at the end of the section.

sorawee commented 3 years ago

Thanks. I moved the examples to the beginning of the section. I also changed racket to racketmodname and fix parser-tools/parser -> parser-tools/yacc + parser-tools/cfg-parser.

Here's an updated rendered doc for the lexer.

sorawee commented 3 years ago

@mflatt I notice that in the parser page, token-id and expr are italicized. Is there a way to use the normal style? IIUC, _id italicizes an identifier, but I want the opposite.

token-id, in particular, is very weird, since the earlier token-id in the lexer page is styled correctly. I presume that's because it notices that token-id is bound. But why doesn't it work similarly in the parser page?

sorawee commented 2 years ago

I accidentally deleted my fork, so I will close this PR for now, and will resubmit a new one.