Now let's take a look at the situation where multiple options are available for the production formula. For example, the WSP can be a space SP or a hop type htab. In this case, we generally look forward to a character and select the production type based on this character. Of course, if the two generative types start with the same character, it is not enough to only look forward to one character. In this case, you need to look forward to two or more characters.
Grammar parsing of WSP, C-nl, and ElementProgram:
/* This file is one of the component a context-free grammar Parser Generator, which accept a piece of text as the input, and generates a parser for the inputted context-free grammar. copyright (c) 2013, junbiao Pan (Email: panjunbiao@gmail.com) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the license, or any later version. this program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a participant purpose. see the GNU General Public License for more details. you shoshould have your ed a copy of the GNU General Public License along with this program. if not, S EE
the corresponding unit test Code is not complex. If you do not need to check the code, please refer to the previous post:
/* This file is one of the component a context-free grammar Parser Generator, which accept a piece of text as the input, and generates a parser for the inputted context-free grammar. copyright (c) 2013, junbiao Pan (Email: panjunbiao@gmail.com) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the license, or any later version. this program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a participant purpose. see the GNU General Public License for more details. you shoshould have your ed a copy of the GNU General Public License along with this program. if not, see
In short, the goal of unit testing is to "Abuse" your code as much as possible, but I find that such code really cannot handle abuse...