Syntax Reference
LMC uses simple, regex-parseable markers to link selections in a document to categorized comments.
Document Structure
Every LMC-annotated document follows this structure:
[Annotated document with inline selection markers]
{== COMMENTS ==}
[Comments referencing the markers above]
{== SUMMARY ==}
[Optional: Overall assessment]Selection Markers
Wrap text to be commented on with paired markers:
{#ID}selected text{/ID}ID Rules
- 1-3 alphanumeric characters (e.g.,
a,b1,s12) - Must be unique within a document
- Sequential IDs recommended for clarity:
a,b,cor1,2,3
Valid Examples
The {#a}quick brown fox{/a} jumped over the {#b}lazy dog{/b}.Invalid Examples
The qui{#a}ck brown f{/a}ox jumped. // breaks words
The {#a}quick {#b}brown{/a} fox{/b}. // overlapping markersNested Selections
Selections may be nested when a comment applies to a phrase within a larger commented section:
The {#1}theory of {#2}relativity{/2} changed physics{/1}.
{== COMMENTS ==}
{#1|E} This entire claim needs a citation.
{#2|C} Specify: special or general relativity?Comments Block
The comments block begins with the {== COMMENTS ==} delimiter. Each comment follows this format:
{#ID|TYPE} Comment text here.Components
- ID — References the selection marker
- TYPE — Single-character category code (P, G, S, L, etc.)
- Comment text — Your feedback (may span multiple lines)
Example
{== COMMENTS ==}
{#a|P} Strong thesis statement with clear argumentative direction.
{#b|S} Consider: "demonstrates" → "illustrates" for variation.
{#c|L} Run-on sentence. Split after "however" with a period.Global Comments
For feedback that doesn't attach to specific text—such as structural issues, missing content, or recurring patterns—append :global to the type code:
{#ID|TYPE:global} Comment text here.Global comments require no corresponding selection marker in the document.
Use global comments for:
- Document-wide structural issues
- Missing content or sections
- Recurring patterns (reference specific examples where helpful)
- Overall observations about tone, style, or approach
- Word count or formatting issues
Example
{== COMMENTS ==}
{#a|G} Spelling: "teh" → "the"
{#b|S} Consider more active voice here.
{#10|T:global} Document exceeds word limit by 270 words.
{#11|E:global} No methodology framework cited — consider adding Rose (2016).
{#12|G:global} Recurring comma splices throughout — see {#a}, {#c}, {#f} for examples.Summary Block
The optional summary block provides holistic feedback:
{== SUMMARY ==}
[Overall assessment here]
Strengths: [List key strengths]
Areas for improvement: [List priority areas]
Grade/Score: [If applicable]Parser Regex Patterns
For systems consuming LMC output:
Selection Regex
\{#([a-zA-Z0-9]{1,3})\}([\s\S]*?)\{/\1\}Comment Regex (with optional :global modifier)
\{#([a-zA-Z0-9]{1,3})\|([A-Z?!])(:global)?\}\s*([\s\S]*?)(?=\{#|\{==|$)Delimiter Detection
\{==\s*(COMMENTS|SUMMARY)\s*==\}Handling Global Comments
- Comments with
:globalmodifier have no corresponding selection - Display these in a separate "General Feedback" section
- Do not treat orphan comment IDs as parse errors if they include
:global