You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
instead of defining regex rules in individual functions with names like t_<some_name>
can't we use python classes to define these functions in, and then pass a class instance to lex.lex()?
I'm new to writing lexers/parsers as part of my course on compilers, so I might as well ask :-
Can this be done in the current implementation?
and if not, is it even fruitful and beneficial in some way?
The text was updated successfully, but these errors were encountered:
instead of defining regex rules in individual functions with names like
t_<some_name>
can't we use python classes to define these functions in, and then pass a class instance to
lex.lex()
?I'm new to writing lexers/parsers as part of my course on compilers, so I might as well ask :-
Can this be done in the current implementation?
and if not, is it even fruitful and beneficial in some way?
The text was updated successfully, but these errors were encountered: