
Hello,
New user here. I have a fairly simple expression language with syntax that looks like:
"IR." + P(Currency)
where P is a keyword and the identifier in parentheses (e.g. 'Currency') should appear in a symbol table and, if not present, should be tagged with a red squiggle. I have defined a lexer, grammar, and parser, but I am unclear where to insert the check for the whether or not the idetnifier is defined. Can you point me in the right direction?
I also have a non-standard variant of this problem. It is possible to put the parameter reference inside a string:
"IR.P(Currency)"
I wonder if it would be easiers to allow the lexer/parser to just tread strings as strings and to add specialized code that looks in the strings and tags accordingly. Can you provide some ideas here?
Thank you very much,
Scott Haney