Skip to content

Add some docs on lex syntax#637

Merged
ltratt merged 1 commit intosoftdevteam:masterfrom
ratmice:lex_syntax_docs
May 4, 2026
Merged

Add some docs on lex syntax#637
ltratt merged 1 commit intosoftdevteam:masterfrom
ratmice:lex_syntax_docs

Conversation

@ratmice
Copy link
Copy Markdown
Collaborator

@ratmice ratmice commented May 4, 2026

I was looking to fix #597 by documenting the limitation of not having spaces in token names
there was one place in the major differences section where it mentions token names, but doesn't define them explicitly.

I figured it might be good to just add a node on lex syntax. Here was a very quickly thrown together overview of the lex syntax to test out whether we like that idea, and if it's worth expanding upon.

I didn't go through and document quirks though like regexes with trailing spaces or anything, not sure if we need to.

Copy link
Copy Markdown
Member

@ltratt ltratt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With a couple of quick edits, I think getting this in one would be good!

Comment thread doc/src/lexsyntax.md Outdated

## Rules

Each rule is given by
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should end in : and the following bits be an itemised list? Though "State operator" may well be best left in a subsubsection "State operator\n\nOptionally, a start state can be ..." etc.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated some text too, but I tried leaving state operator as an itemized list.
It seemed okay with the list being in a paragraph? Let me know what you think.

Comment thread doc/src/lexsyntax.md Outdated

The end of line finishes a rule.

## UserSubroutines
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space?

@ltratt
Copy link
Copy Markdown
Member

ltratt commented May 4, 2026

Thanks! Please squash.

@ratmice ratmice force-pushed the lex_syntax_docs branch from 5194d36 to ed28792 Compare May 4, 2026 08:47
@ratmice
Copy link
Copy Markdown
Collaborator Author

ratmice commented May 4, 2026

Squashed.

@ltratt ltratt added this pull request to the merge queue May 4, 2026
Merged via the queue into softdevteam:master with commit 3c5e7a1 May 4, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Production names can't contain whitespace

2 participants