Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax differences from thtk in seqmap syntax #49

Closed
ExpHP opened this issue Oct 18, 2021 · 2 comments
Closed

Syntax differences from thtk in seqmap syntax #49

ExpHP opened this issue Oct 18, 2021 · 2 comments
Labels
wontfix This will not be worked on

Comments

@ExpHP
Copy link
Owner

ExpHP commented Oct 18, 2021

thtk eclmaps use _ to denote an empty strings. This is part of the seqmap syntax itself, documented at thpatch/thtk#63.

I didn't realize this, and used _ to mean something else. (the dummy args in STD)

So in thtk where you have

!ins_signatures
0 _
1 S
2 So

in truth it is

!ins_signatures
0
1 S
2 So

There's some other issues here. That PR further goes to explicitly document what should happen if a section header appears twice, or if an individual entry gets redefined. I'm fairly certain that both of these will make truth report an error.

While truth obviously needs to extend signature syntax to support more fine-grained types, it is unfortunate that it diverges from thtk on such basic properties of the text file itself...

@ExpHP
Copy link
Owner Author

ExpHP commented Oct 18, 2021

This is a "tentative wontfix" because I'd kind of rather just replace mapfile syntax, and thanks to differences in the signature syntax itself, people who have signatures in their thtk mapfiles would need to update them to work with truth even without these problems. It'd be nice to have a much richer form of signature definitions than is even possible with seqmap syntax. Something like C-style declaration syntax

@ExpHP ExpHP added the wontfix This will not be worked on label Oct 18, 2021
DankRank added a commit to thpatch/thtk that referenced this issue Oct 19, 2021
The _ thing is a remnant from the old eclmap format where the
instruction signature was sandwiched between the opcode and the
mnemonic, and thus had to be non-empty.

relevant: ExpHP/truth#49
@ExpHP
Copy link
Owner Author

ExpHP commented Nov 10, 2021

Well Egor made a ninja change and apparently _ in thtk is now deprecated, so that's convenient.

There do remain some problems with redefinitions within a file. The plan is that truth should treat these identical to the way it already treats the same thing defined in two different files.

Basically just need to change some of the HashMaps used internally for Eclmap to simple Vecs for the most part.

@ExpHP ExpHP closed this as completed in eaa3abf Nov 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant