小编Mug*_*tsu的帖子

分析器帮助程序不起作用

- > ---> a | b ---> 1 | 1

它假设从a或b开始,然后是1.a或b之后有多少1并不重要.例如:a1,b1,b111111,a111我输入的所有内容都无效但这应该是有效的:a1,b1,b111111,a111

/*
<S> --> <A><B>
<A> --->  a | b
<B> --->  1 | 1 <B>

It suppose to be vaild for example: a1, b1, b111111, a111
*/
#include <iostream>
#include<stdlib.h>  // for the exit(1) function
using namespace std;

char text[100];
char ToBeChecked;

char lexical(); //identify the characters
void SProd();
void AProd();
void BProd();


int main()
{
    cout<<"Enter a string(max. 100 characters"<<endl;
    cin>>text;

    ToBeChecked = lexical(); //identify the character; find …
Run Code Online (Sandbox Code Playgroud)

c++ parsing

1
推荐指数
1
解决办法
66
查看次数

标签 统计

c++ ×1

parsing ×1