tmp
This commit is contained in:
parent
65cb26a627
commit
1ead32d84a
71 changed files with 199 additions and 282 deletions
43
.wip/Language/tests/Test.hpp
Normal file
43
.wip/Language/tests/Test.hpp
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
#pragma once
|
||||
|
||||
// #include "SimpleParser.hpp"
|
||||
|
||||
const char* gGrammar = R"(
|
||||
# Grammar in the CF-RE United Format (Defined by language module)
|
||||
|
||||
Rules : {
|
||||
ScopeList : ScopeList Scope | Scope ;
|
||||
Scope : \ScopeBegin StatementList \ScopeEnd;
|
||||
StatementList : StatementList Statement \StatementEnd;
|
||||
StatementList : Statement \StatementEnd;
|
||||
Statement : \StatementBody;
|
||||
}
|
||||
|
||||
Terminals : {
|
||||
Space : " " | "\t" | "\n" | "\r";
|
||||
ScopeBegin : "{";
|
||||
ScopeEnd : "}";
|
||||
StatementEnd : ";";
|
||||
StatementBody : "a" | "b";
|
||||
}
|
||||
|
||||
Start : Scope;
|
||||
Ignore : Space;
|
||||
)";
|
||||
|
||||
const char* gSentence = R"(
|
||||
{}
|
||||
|
||||
{ }
|
||||
|
||||
{
|
||||
a;
|
||||
a ; a ;
|
||||
|
||||
}
|
||||
|
||||
{
|
||||
a;
|
||||
a;
|
||||
}
|
||||
)";
|
||||
Loading…
Add table
Add a link
Reference in a new issue