From 2467dfcf3098482ac43dfa97b8852a637d6882f3 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Fri, 18 May 2018 18:49:28 -1000 Subject: [PATCH] fixes to docs --- brag/brag/brag.scrbl | 3 +-- brag/brag/main.rkt | 12 ++++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/brag/brag/brag.scrbl b/brag/brag/brag.scrbl index 3f4c7d8..ee720a1 100755 --- a/brag/brag/brag.scrbl +++ b/brag/brag/brag.scrbl @@ -3,8 +3,8 @@ racket/date file/md5 (for-label racket + brag brag/support - brag/examples/nested-word-list (only-in br-parser-tools/lex lexer-src-pos) (only-in syntax/parse syntax-parse ~literal))) @@ -888,7 +888,6 @@ Otherwise, @tt{brag} should be fairly tolerant and permit even ambiguous grammars. @subsection{Semantics} -@declare-exporting[brag/examples/nested-word-list] A program written in @litchar{#lang brag} produces a module that provides a few bindings. The most important of these is @racket[parse]: diff --git a/brag/brag/main.rkt b/brag/brag/main.rkt index 6ae6606..a071d48 100755 --- a/brag/brag/main.rkt +++ b/brag/brag/main.rkt @@ -3,3 +3,15 @@ (module+ reader (require "codegen/reader.rkt") (provide (all-from-out "codegen/reader.rkt"))) + +;; this creates dummy identifiers +;; so cross-refs in `brag` docs will work +(module names racket/base + (provide (all-defined-out)) + (define (parse) (void)) + (define (parse-to-datum) (void)) + (define (make-rule-parser) (void)) + (define (all-token-types) (void))) + +(require (for-label 'names)) +(provide (for-label (all-from-out 'names))) \ No newline at end of file