Skip to content

update desc.xsd to allow entry-point - #5065

Open
teverett wants to merge 4 commits into
antlr:masterfrom
teverett:xsd
Open

teverett wants to merge 4 commits into
antlr:masterfrom
teverett:xsd

Conversation

@teverett

Copy link
Copy Markdown
Member

No description provided.

@teverett

Copy link
Copy Markdown
Member Author

@kaby76 are there other allowable elements in an desc.xml?

@kaby76

kaby76 commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

The current desc.xsd is at https://github.com/kaby76/Trash/blob/main/desc.xsd. It's a pretty good description, but it looks like <entry-point> is now out of date. <entry-point> is only required when there is not exactly one EOF-terminated parser rule. You can still specify <entry-point> even if there is a unique EOF-terminated parser rule, and it can be different. I just updated the file in the 4.5.0 release PR: https://github.com/kaby76/Trash/blob/0596d964d8542a1ce9f4faedc5d67fa547ccba9d/desc.xsd.

I had to change the way start rules are decided in version 3.7.0. Trash now has its own parser generator for ANTLR4 grammars, which bypasses trgen completely. (It's still somewhat experimental, but it is complete table-based, and almost as fast as ANTLR4-generated parsers.) In addition, when comparing grammars, I have to change the sort, so the "first parser rule is the start rule" can't hold. Preferably, one always marks the start rule with an EOF at the end of the rule rather than using the desc.xml or pom.xml. This is also necessary for some grammars because ANTLR4 (after version 4.7) can report a successful parse even though the input is invalid.

@teverett

Copy link
Copy Markdown
Member Author

@kaby76 I've removed the local copy of desc.xsd and changed every desc.xml file to point to the current version

@teverett

Copy link
Copy Markdown
Member Author

@dependabot rebase

@kaby76

kaby76 commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

@kaby76 I've removed the local copy of desc.xsd and changed every desc.xml file to point to the current version

Very good.

Looks like a bug in trgen. I was trying to accommodate the changes to cpp grammar, where both C++14 and C++20 are in the same directory. I have a fix, but I'm testing it over the current repo locally to make sure it works.

@kaby76

kaby76 commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

@teverett Bug fixed. Merge #5074 and synch to use updated toolkit. Thanks.

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.

2 participants