使用编译原理的 LL(1)文法
EBNF范式
lexp -> id | number [lexp-seq] lexp-seq
lexp-seq -> lexp{lexp}
Code:
class Solution {
public:
int token=0;
string str;
inline bool match(char expect){
return str[token]==expect?++token,true:false;
}
string decodeString(string s) {
if(s.empty(