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
Hello Everyone. I want to search for a function in a specific .c file using flex and then verify if the found result is a function definition or a function call ? I am able to search the function call without any problem but trying to verify if it's a call or a definition. I can write rules for the same but it can get complicated very fast as I'll have to take care of a lot of border cases. Is there any inbuilt functionality in flex that can help me achieve the same. Thanks in advance.
The text was updated successfully, but these errors were encountered:
This use case crosses over to the job of a parser like bison. A flex
scanner tokenizes your input file, according to your rules, them a parser
determines what different sequences of tokens mean, again according to your
rules. A function definition and call use many of the same tokens just in a
different sequence, so this is a parsing problem.
To keep your code same, use flex to recognize that a word is a type name,
numeric literal, identifier, operator, etc. Then use bison or another
parser generator to recognize and interpret token sequences.
On Fri, Jul 15, 2022, 02:06 sahil-ecosmob ***@***.***> wrote:
Hello Everyone. I want to search for a function in a specific .c file
using flex and then verify if the found result is a function definition or
a function call ? I am able to search the function call without any problem
but trying to verify if it's a call or a definition. I can write rules for
the same but it can get complicated very fast as I'll have to take care of
a lot of border cases. Is there any inbuilt functionality in flex that can
help me achieve the same. Thanks in advance.
—
Reply to this email directly, view it on GitHub
<#534>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAVJXIJZ6NS2D4KJGHTKVNLVUD5UZANCNFSM53UPC65A>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
Hello Everyone. I want to search for a function in a specific .c file using flex and then verify if the found result is a function definition or a function call ? I am able to search the function call without any problem but trying to verify if it's a call or a definition. I can write rules for the same but it can get complicated very fast as I'll have to take care of a lot of border cases. Is there any inbuilt functionality in flex that can help me achieve the same. Thanks in advance.
The text was updated successfully, but these errors were encountered: