Skip to content

Commit

Permalink
💡 comments: add grammar on code
Browse files Browse the repository at this point in the history
  • Loading branch information
The-Lum authored May 4, 2024
1 parent 9e4295f commit b2d01ab
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion app/src/main/java/math/ASCIIMathTeXImg.java
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,17 @@ private String aAMTremoveBrackets(String node) {
return node;
}

/* Parsing ASCII math expressions with the following grammar:
v ::= [A-Za-z] | greek letters | numbers | other constant symbols
u ::= sqrt | text | bb | other unary symbols for font commands
b ::= frac | root | stackrel binary symbols
l ::= ( | [ | { | (: | {: left brackets
r ::= ) | ] | } | :) | :} right brackets
S ::= v | lEr | uS | bSS Simple expression
I ::= S_S | S^S | S_S^S | S Intermediate expression
E ::= IE | I/I Expression
*/

private String aAMTgetTeXsymbol(Tuple symb) {
String pre;
if (symb.hasFlag(Flag.VAL)) {
Expand Down Expand Up @@ -1021,4 +1032,4 @@ public String getTeX(String asciiMathInput) {
aAMinitSymbols();
}

}
}

0 comments on commit b2d01ab

Please sign in to comment.