# Using brag as a submodule

**URL:** <https://racket.discourse.group/t/using-brag-as-a-submodule/1622>\
**Category:** Questions & Answers\
**Created:** [January 5, 2023, 11:24pm UTC](https://racket.discourse.group/t/using-brag-as-a-submodule/1622 "2023-01-05T23:24:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bremner](https://avatars.discourse-cdn.com/v4/letter/b/aca169/32.png) [@bremner](https://racket.discourse.group/u/bremner)\
**Post date:** [January 5, 2023, 11:24pm UTC](https://racket.discourse.group/t/using-brag-as-a-submodule/1622/1 "2023-01-05T23:24:48Z")

</div>

When I was using ragg in class, I could use something like

```
(module grammar1 ragg/sexp/lang
dog: sentence+

sentence: BARK+ "."
)

(require (prefix-in grammar1: (submod "." grammar1)))

```

to embed a brag grammar inside e.g. a "#lang racket" driver. This was useful because it allowed me to stick with single files and avoid handin-server complications.

Is there some way to have similar embedding with brag? I understand brag/sexp/lang is not a thing. I looked at the brag test suite, and it seems to have all the grammars in external files (except where it uses what looks like syntax-parse output).

P.S. Apologies if this appears multiple times. I've been having troubles  
with mailing list mode.
