我想解析一个语法类似于 c++ 源代码的输入文件。该文件将包含以下组件:
//It will have comments.
//It will be able to recursively open other files.
include OtherInputFile.txt
//It will resolve scope
ObjectName::MemberVariable = 0.0;
OtherObjectName
{
MemberVariable1 = 1.0;
MemberVariable2 = 2.0;
}
问题是,我不知道自己在做什么。我想我需要的是关于解析的教科书章节,以使自己了解可用的技术或算法。