Answered step by step
Verified Expert Solution
Question
1 Approved Answer
i want the c program. please help Pseudocode for main Delimeter Get a string from user . If string has correctly matched delimiters print All
i want the c program. please help Pseudocode for main Delimeter Get a string from user . If string has correctly matched delimiters print "All matched correctly Pseudocode for FSM: Note: This is to be implemented as a subprogram thot returns a boolean value of true or false indicat delimiters matched correctly. ing whether or not all State 0 (Starting State) Read next character in input string . If char is open delimiter, next state is 1 . If char is close delimiter, next state is 2 . If char is end of string, next state is 3 .if character is anything else, next state is 4 State 1: . Push open delimiter on stack .Next state is 0 State 2: If stack is not empty . o If the character on top of stack is brother to current character Next state is 0 o Otherwise Display error message . Return false . Otherwise o Display error message o Return false Next state is O State 3: . If stack is empty o Return true . Otherwise o Display error message o Return false State 4 Next state is 0 te: You are to write and make use of subprograms like is open, is,close, and is brother for this program Pseudocode for main Delimeter Get a string from user . If string has correctly matched delimiters print "All matched correctly Pseudocode for FSM: Note: This is to be implemented as a subprogram thot returns a boolean value of true or false indicat delimiters matched correctly. ing whether or not all State 0 (Starting State) Read next character in input string . If char is open delimiter, next state is 1 . If char is close delimiter, next state is 2 . If char is end of string, next state is 3 .if character is anything else, next state is 4 State 1: . Push open delimiter on stack .Next state is 0 State 2: If stack is not empty . o If the character on top of stack is brother to current character Next state is 0 o Otherwise Display error message . Return false . Otherwise o Display error message o Return false Next state is O State 3: . If stack is empty o Return true . Otherwise o Display error message o Return false State 4 Next state is 0 te: You are to write and make use of subprograms like is open, is,close, and is brother for this program
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started