removed pnet grammar
This commit is contained in:
parent
03942168e6
commit
75b002fcdd
File diff suppressed because it is too large
Load diff
|
|
@ -1,157 +0,0 @@
|
|||
##TEMPLATE-NAME '_ C# - Calitha Engine - PNET'
|
||||
##LANGUAGE 'C#'
|
||||
##ENGINE-NAME 'Calitha GOLD Parser Engine'
|
||||
##AUTHOR 'DarkStar'
|
||||
##FILE-EXTENSION 'cs'
|
||||
##NOTES
|
||||
PNET parser template.
|
||||
Version 0.3
|
||||
##END-NOTES
|
||||
##ID-CASE UPPERCASE
|
||||
##ID-SEPARATOR '_'
|
||||
##ID-SYMBOL-PREFIX 'Symbol'
|
||||
##ID-RULE-PREFIX 'Rule'
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//Äàííûé ôàéë çàïðåùåíî ïðàâèòü, îí ñîçäàåòñÿ àâòîìàòè÷åñêè!!!
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Collections;
|
||||
using PascalABCCompiler.SyntaxTree;
|
||||
using PascalABCCompiler.Errors;
|
||||
using PascalABCCompiler.PNETParser.Errors;
|
||||
using PascalABCCompiler.ParserTools;
|
||||
using GoldParser;
|
||||
|
||||
namespace PascalABCCompiler.PNETParser
|
||||
{
|
||||
public partial class GPBParser_PNET : GPBParser
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//SymbolConstants
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
public enum SymbolConstants : int
|
||||
{
|
||||
##SYMBOLS
|
||||
##DELIMITER ','
|
||||
%ID.Padded% = %Value.Padded%%Delimiter% // %Description%
|
||||
##END-SYMBOLS
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//RuleConstants
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
public enum RuleConstants : int
|
||||
{
|
||||
##RULES
|
||||
##DELIMITER ','
|
||||
%ID.Padded% = %Value.Padded%%Delimiter% // %Description%
|
||||
##END-RULES
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//CreateTerminalObject
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
private Object CreateTerminalObject(int TokenSymbolIndex)
|
||||
{
|
||||
switch (TokenSymbolIndex)
|
||||
{
|
||||
##SYMBOLS
|
||||
case (int)SymbolConstants.%ID% :
|
||||
//%Description%
|
||||
//TERMINAL:%Name%
|
||||
return null;
|
||||
//ENDTERMINAL
|
||||
##END-SYMBOLS
|
||||
}
|
||||
throw new SymbolException("Unknown symbol");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//CreateNonTerminalObject
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
public Object CreateNonTerminalObject(int ReductionRuleIndex)
|
||||
{
|
||||
switch (ReductionRuleIndex)
|
||||
{
|
||||
##RULES
|
||||
case (int)RuleConstants.%ID% :
|
||||
//%Description%
|
||||
//NONTERMINAL:%Description%
|
||||
return null;
|
||||
//ENDNONTERMINAL
|
||||
##END-RULES
|
||||
}
|
||||
throw new RuleException("Unknown rule");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
cls
|
||||
@echo off
|
||||
echo [PNET] GRM to CS,RES compiler. (c) DarkStar 2008
|
||||
echo.
|
||||
|
||||
echo Delete old files...
|
||||
del PNET.cs
|
||||
del PNET.cgt
|
||||
del PNETLang.resources
|
||||
|
||||
echo Compile: GRM to CGT...
|
||||
start /wait ..\..\Utils\gpbcmd\goldbuilder_main PNET.grm PNET.cgt
|
||||
copy PNET.log con
|
||||
echo.
|
||||
|
||||
echo Compile: CGT,PGT to TEMPLATE...
|
||||
start /wait ..\..\Utils\gpbcmd\createskelprog_main PNET.cgt PNET.pgt PNET.tmpl
|
||||
echo.
|
||||
|
||||
echo Compile: GRM,TEMPLATE to CS...
|
||||
..\..\Utils\grmCommentCompiler\bin\Debug\grmCommentCompiler.exe PNET.grm PNET.tmpl PNET.cs
|
||||
echo.
|
||||
|
||||
echo Compile: CGT to RES...
|
||||
..\..\Utils\ResXMaker\ResXMaker.exe PNET.CGT PNETLanguage PNETLang.resources
|
||||
echo.
|
||||
|
||||
copy PNETLang.resources ..\..\Parsers\PNETParser\PNETLang.resources
|
||||
copy PNET.cs ..\..\Parsers\PNETParser\PNET_lrparser_rules.cs
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
del PNET.cs
|
||||
..\..\Utils\grmCommentCompiler\bin\Debug\grmCommentCompiler.exe PNET.grm PNET.tmpl PNET.cs
|
||||
copy PNET.cs ..\..\Parsers\PNETParser\PNET_lrparser_rules.cs
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
del PABCParser.cs
|
||||
start /wait ..\..\Utils\gpbcmd\createskelprog_main PNET.cgt PNET.pgt PNET.tmpl
|
||||
..\..\Utils\grmCommentCompiler\bin\Debug\grmCommentCompiler.exe PNET.grm PNET.tmpl PNET.cs
|
||||
copy PNET.cs ..\..\..\PABCSVN\Parsers\PNETParser\PNET_lrparser_rules.cs
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
..\..\Utils\ResXMaker\ResXMaker.exe PNET.CGT PNETLanguage PNETLang.resources
|
||||
copy PNETLang.resources ..\..\Parsers\PNETParser\PNETLang.resources
|
||||
Loading…
Reference in a new issue