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

Clarification of terms "symbol" and "token" #231

Open
avekens opened this issue Jan 6, 2022 · 2 comments
Open

Clarification of terms "symbol" and "token" #231

avekens opened this issue Jan 6, 2022 · 2 comments

Comments

@avekens
Copy link
Contributor

avekens commented Jan 6, 2022

At the beginning of section 4.2, it is clearly defined that:

  • "... tokens ... are strings of non-whitespace printable characters ... separated by white space ...".
  • "... tokens ... consist of keywords ... together with user-defined tokens"
  • user-defined tokens are either labels or (math) symbols.

At least in section 4.4.2, however, these strict definitions seem not to be used consequently:

  • the term "math token" or "math-token" is used (but not defined). Does it mean "math symbol"?
  • $t is sometimes called "token", sometimes "symbol", but according to the strict definition it should be called a "keyword"

Should section 4.4.2 be revised accordingly?

@benjub
Copy link
Contributor

benjub commented Jan 6, 2022 via email

@benjub
Copy link
Contributor

benjub commented Jan 7, 2022

My comment above sounds a bit off since I thought I was posting in #2422, which triggered this issue. Sorry about that. Putting the discussions there and here together, this makes more sense.
Maybe a solution is to replace "(math) symbol" by "math token" everywhere in the book ? This would permit to reserve the word "symbol" for what is display on a webpage. E.g., the $t statement would look like:

htmldef "math-token" as "gif-symbol";
althtmldef "math-token" as "unicode-symbol";
latexdef "math-token" as "latex-symbol";

But honestly, I think it can stay as is and is not a big problem. The formal grammar is given in Appendix E. For instance, it has:

essential-stmt ::= LABEL ’$e’ typecode MATH-SYMBOL* ’$.’

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

No branches or pull requests

2 participants