Posted 18 years ago
by Benjamin Lewis
Is it possible to hook into the lexical parser, and modify the language during the parsing sequence? I'd like to recognize variables declared at the beginning of a block, and add them as explicit patterns.
For example, for a pascal-ish language, I'd like to do something like the following
var foo : int; // recognize "foo" as a variable via regex match, add to language as
// explicit pattern
begin
foo := 3; // highlight using syntax rules for variables
end.
Thanks,
--
Benjamin Lewis
For example, for a pascal-ish language, I'd like to do something like the following
var foo : int; // recognize "foo" as a variable via regex match, add to language as
// explicit pattern
begin
foo := 3; // highlight using syntax rules for variables
end.
Thanks,
--
Benjamin Lewis