当前位置: 首页>>代码示例>>C#>>正文


C# PascalABCCompiler类代码示例

本文整理汇总了C#中PascalABCCompiler的典型用法代码示例。如果您正苦于以下问题:C# PascalABCCompiler类的具体用法?C# PascalABCCompiler怎么用?C# PascalABCCompiler使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


PascalABCCompiler类属于命名空间,在下文中一共展示了PascalABCCompiler类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: TokenReadError

 public TokenReadError(PascalABCCompiler.ParserTools.GPBParser parser)
     : base(string.Format(ParserErrorsStringResources.Get("UNEXPECTED_SYMBOL{0}"), parser.LRParser.TokenText!="" ? parser.LRParser.TokenText : "(EOF)"), 
             parser.current_file_name,
             parser.parsertools.GetTokenSourceContext(parser.LRParser), 
             (syntax_tree_node)parser.prev_node)
 {
 }
开发者ID:lisiynos,项目名称:pascalabcnet,代码行数:7,代码来源:Errors.cs

示例2: ChangeCompilerState

 private void ChangeCompilerState(ICompiler sender, PascalABCCompiler.CompilerState State, string FileName)
 {
     switch (State)
     {
         case CompilerState.CompilationFinished:
             if (compiler.ErrorsList.Count > 0)
                 foreach (Errors.Error er in compiler.ErrorsList)
                     SendErrorOrWarning(er);
             if (compiler.Warnings.Count > 0)
                 foreach (Errors.Error er in compiler.Warnings)
                     SendErrorOrWarning(er);
             SendCommand(ConsoleCompilerConstants.LinesCompiled, compiler.LinesCompiled.ToString());
             SendCommand(ConsoleCompilerConstants.BeginOffest, compiler.BeginOffset.ToString());
             SendCommand(ConsoleCompilerConstants.VarBeginOffest, compiler.VarBeginOffset.ToString());
             SendCommand(ConsoleCompilerConstants.CompilerOptionsOutputType, ((int)compiler.CompilerOptions.OutputFileType).ToString());
             sendWorkingSet();
             break;
         case CompilerState.Ready:
             if(compilerReloading)
                 sendWorkingSet();
             break;
     }
     if (FileName != null)
         SendCommand(ConsoleCompilerConstants.CommandStartNumber + (int)State, FileName);
     else
         SendCommand(ConsoleCompilerConstants.CommandStartNumber + (int)State);
 }
开发者ID:CSRedRat,项目名称:pascalabcnet,代码行数:27,代码来源:CommandConsoleCompiler.cs

示例3: VisualEnvironmentCompiler

 public VisualEnvironmentCompiler(InvokeDegegate beginInvoke, 
     SetFlagDelegate setCompilingButtonsEnabled, SetFlagDelegate setCompilingDebugEnabled, SetTextDelegate setStateText, 
     SetTextDelegate addTextToCompilerMessages, ToolStripMenuItem pluginsMenuItem, 
     ToolStrip pluginsToolStrip, ExecuteSourceLocationActionDelegate ExecuteSLAction, 
     ExecuteVisualEnvironmentCompilerActionDelegate ExecuteVECAction,
     PascalABCCompiler.Errors.ErrorsStrategyManager ErrorsManager, RunManager RunnerManager, DebugHelper DebugHelper,UserOptions UserOptions,System.Collections.Hashtable StandartDirectories,
     Dictionary<string, CodeFileDocumentControl> OpenDocuments, IWorkbench workbench)
 {
     this.StandartDirectories = StandartDirectories;
     this.ErrorsManager = ErrorsManager;
     this.ChangeVisualEnvironmentState += new ChangeVisualEnvironmentStateDelegate(onChangeVisualEnvironmentState);
     SetCompilingButtonsEnabled = setCompilingButtonsEnabled;
     SetDebugButtonsEnabled = setCompilingDebugEnabled;
     SetStateText = setStateText;
     AddTextToCompilerMessages = addTextToCompilerMessages;
     this.beginInvoke = beginInvoke;
     this.ExecuteSLAction=ExecuteSLAction;
     this.ExecuteVECAction = ExecuteVECAction;
     PluginsMenuItem = pluginsMenuItem;
     PluginsToolStrip = pluginsToolStrip;
     PluginsController = new VisualPascalABCPlugins.PluginsController(this, PluginsMenuItem, PluginsToolStrip, workbench);
     this.RunnerManager = RunnerManager;
     this.DebugHelper = DebugHelper;
     DebugHelper.Starting += new DebugHelper.DebugHelperActionDelegate(DebugHelper_Starting);
     DebugHelper.Exited += new DebugHelper.DebugHelperActionDelegate(DebugHelper_Exited);
     RunnerManager.Starting += new RunManager.RunnerManagerActionDelegate(RunnerManager_Starting);
     RunnerManager.Exited += new RunManager.RunnerManagerActionDelegate(RunnerManager_Exited);
     this.CodeCompletionParserController = WorkbenchServiceFactory.CodeCompletionParserController;
     this.CodeCompletionParserController.visualEnvironmentCompiler = this;
     this.UserOptions = UserOptions;
     this.OpenDocuments = OpenDocuments;
 }
开发者ID:Slav76,项目名称:pascalabcnet,代码行数:32,代码来源:VisualEnvironmentCompiler.cs

示例4: Compiler_OnChangeCompilerState

 void Compiler_OnChangeCompilerState(PascalABCCompiler.ICompiler sender, PascalABCCompiler.CompilerState State, string FileName)
 {
     if (!Visible) return;
     switch (State)
     {
         case PascalABCCompiler.CompilerState.CompilationStarting:
             BuildButtonsEnabled = syntaxTreeSelectComboBox.Enabled = false;                
             this.Refresh();
             break;
         case PascalABCCompiler.CompilerState.CompilationFinished:
             Errors.Clear();
             if (VisualEnvironmentCompiler.Compiler.ErrorsList.Count > 0)
             {
                 SyntaxError er;
                 for (int i = 0; i < VisualEnvironmentCompiler.Compiler.ErrorsList.Count; i++)
                 {
                     er = VisualEnvironmentCompiler.Compiler.ErrorsList[i] as SyntaxError;
                     if (er!=null && er.bad_node != null)
                         Errors[er.bad_node] = i;
                 }
             }
             UpdateSelectList();
             ShowTree();
             BuildButtonsEnabled = true;
             break;
     }
 }
开发者ID:lisiynos,项目名称:pascalabcnet,代码行数:27,代码来源:SyntaxTreeVisualisatorForm.cs

示例5: SetOptions

 public void SetOptions(PascalABCCompiler.IProjectInfo prj)
 {
     prj.DeleteEXE = this.cbDeleteExe.Checked;
     prj.DeletePDB = this.cbDeletePdb.Checked;
     prj.IncludeDebugInfo = this.cbDebugRelease.SelectedIndex == 0;
     prj.OutputDirectory = this.tbOutputDirectory.Text;
     prj.CommandLineArguments = this.tbRunArguments.Text;
     if (!string.IsNullOrEmpty(this.tbAppIcon.Text))
     {
         /*if (File.Exists(this.tbAppIcon.Text))
             prj.AppIcon = this.tbAppIcon.Text;
         else*/
             prj.AppIcon = Path.Combine(prj.ProjectDirectory, this.tbAppIcon.Text);
     }
     else
         prj.AppIcon = null;
     prj.MajorVersion = Convert.ToInt32(this.tbMajor.Text);
     prj.MinorVersion = Convert.ToInt32(this.tbMinor.Text);
     prj.BuildVersion = Convert.ToInt32(this.tbBuild.Text);
     prj.RevisionVersion = Convert.ToInt32(this.tbRevision.Text);
     prj.GenerateXMLDoc = this.cbGenerateXmlDoc.Checked;
     prj.Product = this.tbProduct.Text;
     prj.Company = this.tbCompany.Text;
     prj.Trademark = this.tbTradeMark.Text;
     prj.Copyright = this.tbCopyright.Text;
 }
开发者ID:lisiynos,项目名称:pascalabcnet,代码行数:26,代码来源:ProjectProperties.cs

示例6: LoadOptions

 public void LoadOptions(PascalABCCompiler.IProjectInfo prj)
 {
     proj = prj;
     this.cbDeleteExe.Checked = prj.DeleteEXE;
     this.cbDeletePdb.Checked = prj.DeletePDB;
     if (prj.IncludeDebugInfo)
         this.cbDebugRelease.SelectedIndex = 0;
     else
         this.cbDebugRelease.SelectedIndex = 1;
     this.tbOutputDirectory.Text = prj.OutputDirectory;
     this.tbRunArguments.Text = prj.CommandLineArguments;
     if (!string.IsNullOrEmpty(prj.AppIcon))
     {
         this.tbAppIcon.Text = prepare_icon_name(prj.AppIcon);
     }
     this.tbMajor.Text = Convert.ToString(prj.MajorVersion);
     this.tbMinor.Text = Convert.ToString(prj.MinorVersion);
     this.tbBuild.Text = Convert.ToString(prj.BuildVersion);
     this.tbRevision.Text = Convert.ToString(prj.RevisionVersion);
     this.cbGenerateXmlDoc.Checked = prj.GenerateXMLDoc;
     this.tbProduct.Text = prj.Product;
     this.tbCompany.Text = prj.Company;
     this.tbTradeMark.Text = prj.Trademark;
     this.tbCopyright.Text = prj.Copyright;
 }
开发者ID:lisiynos,项目名称:pascalabcnet,代码行数:25,代码来源:ProjectProperties.cs

示例7: GPB_PABCPreprocessor2

public GPB_PABCPreprocessor2(Stream stream, PascalABCCompiler.Preprocessor2.Preprocessor2 prepr1)
            : base(stream)
        {
            pascal_parsertools = new pascalabc_parsertools();
            parsertools = pascal_parsertools;

            prepr = prepr1;
        }
开发者ID:CSRedRat,项目名称:pascalabcnet,代码行数:8,代码来源:PABCPreprocessor2_lrparser.cs

示例8: Update

        public override void Update(PascalABCCompiler.Parsers.SymInfo si)
		{
    		ICompletionData val=null;
    		if (dict.TryGetValue(si,out val))
    		{
    			val.Description = si.description;
    		}
		}
开发者ID:PascalABC-CompilerLaboratory,项目名称:pascalabcnet,代码行数:8,代码来源:CodeCompletionHelpers.cs

示例9: ConvertSourceContextToSourceLocation

 public static SourceLocation ConvertSourceContextToSourceLocation(string FileName, PascalABCCompiler.SyntaxTree.SourceContext sc)
 {
     if (sc.FileName != null)
         FileName = sc.FileName;
     return new SourceLocation(FileName,
             sc.begin_position.line_num, sc.begin_position.column_num,
             sc.end_position.line_num, sc.end_position.column_num);
 }
开发者ID:lisiynos,项目名称:pascalabcnet,代码行数:8,代码来源:Tools.cs

示例10: GetName

 /// <summary>
 /// Получение имен после точки
 /// </summary>
 public SymInfo[] GetName(expression expr, string str, int line, int col, PascalABCCompiler.Parsers.KeywordKind keyword, ref SymScope root)
 {
     if (visitor.cur_scope == null) return null;
     if (col + 1 > str.Length)
         col -= str.Length;
     SymScope si = visitor.FindScopeByLocation(line + 1, col + 1);//stv.cur_scope;
     if (si == null)
     {
         si = visitor.FindScopeByLocation(line, col + 1);
         if (si == null)
             return null;
     }
     SetCurrentUsedAssemblies();
     ExpressionVisitor ev = new ExpressionVisitor(expr, si, visitor);
     si = ev.GetScopeOfExpression(true, false);
     root = si;
     if (si is ElementScope) root = (si as ElementScope).sc;
     else if (si is ProcScope) root = (si as ProcScope).return_type;
     if (si != null)
     {
         if (!(si is TypeScope) && !(si is NamespaceScope))
         {
             SymInfo[] syms = si.GetNamesAsInObject(ev);
             SymInfo[] ext_syms = null;
             if (si is ElementScope)
                 ext_syms = visitor.cur_scope.GetSymInfosForExtensionMethods((si as ElementScope).sc as TypeScope);
             List<SymInfo> lst = new List<SymInfo>();
             lst.AddRange(syms);
             if (ext_syms != null)
                 lst.AddRange(ext_syms);
             RestoreCurrentUsedAssemblies();
             List<SymInfo> lst_to_remove = new List<SymInfo>();
             foreach (SymInfo si2 in lst)
                 if (si2.name.StartsWith("operator"))
                     lst_to_remove.Add(si2);
             foreach (SymInfo si2 in lst_to_remove)
                 lst.Remove(si2);
             return lst.ToArray();
         }
         else
         {
             if (si is TypeScope)
             {
                 RestoreCurrentUsedAssemblies();
                 return (si as TypeScope).GetNames(ev, keyword, false);
             }
             else
             {
                 if (ev.entry_scope.InUsesRange(line + 1, col + 1))
                     keyword = PascalABCCompiler.Parsers.KeywordKind.Uses;
                 RestoreCurrentUsedAssemblies();
                 return (si as NamespaceScope).GetNames(ev, keyword);
             }
         }
     }
     RestoreCurrentUsedAssemblies();
     return null;
 }
开发者ID:Slav76,项目名称:pascalabcnet,代码行数:61,代码来源:DomConverter.cs

示例11: ShowCompletionWindow

        public static PABCNETCodeCompletionWindow ShowCompletionWindow(Form parent, TextEditorControl control, string fileName, ICompletionDataProvider completionDataProvider, char firstChar, bool visibleKeyPressed, bool is_by_dot,PascalABCCompiler.Parsers.KeywordKind keyw)
		{
        	ICompletionData[] completionData = (completionDataProvider as VisualPascalABC.CodeCompletionProvider).GenerateCompletionDataWithKeyword(fileName, control.ActiveTextAreaControl.TextArea, firstChar, keyw);
			if (completionData == null || completionData.Length == 0) {
				return null;
			}
            PABCNETCodeCompletionWindow codeCompletionWindow = new PABCNETCodeCompletionWindow(completionDataProvider, completionData, parent, control, visibleKeyPressed, is_by_dot);
			codeCompletionWindow.ShowCompletionWindow();
			return codeCompletionWindow;
		}
开发者ID:lisiynos,项目名称:pascalabcnet,代码行数:10,代码来源:CodeCompletionWindow.cs

示例12: RestoreSymbols

 static void RestoreSymbols(SymbolInfo si, PascalABCCompiler.TreeRealization.wrapped_definition_node wdn, string name)
 {
 	if (wdn.is_synonim)
 		si.sym_info = wdn.PCUReader.CreateTypeSynonim(wdn.offset, name);
 	else
 	if (si.scope is ClassScope)
         si.sym_info = wdn.PCUReader.CreateInterfaceInClassMember(wdn.offset, name);
     else
         si.sym_info = wdn.PCUReader.CreateImplementationMember(wdn.offset, false);
 }
开发者ID:Slav76,项目名称:pascalabcnet,代码行数:10,代码来源:SymbolTable.cs

示例13: ShowCompletionWindowWithFirstChar

        public static PABCNETCodeCompletionWindow ShowCompletionWindowWithFirstChar(Form parent, TextEditorControl control, string fileName, ICompletionDataProvider completionDataProvider, char firstChar, PascalABCCompiler.Parsers.KeywordKind keyw)
        {
        	ICompletionData[] completionData = (completionDataProvider as VisualPascalABC.CodeCompletionProvider).GenerateCompletionDataByFirstChar(fileName, control.ActiveTextAreaControl.TextArea, firstChar, keyw);
        	if (completionData == null || completionData.Length == 0) {
				return null;
			}
        	(completionDataProvider as VisualPascalABC.CodeCompletionProvider).preSelection = firstChar.ToString();
            PABCNETCodeCompletionWindow codeCompletionWindow = new PABCNETCodeCompletionWindow(completionDataProvider, completionData, parent, control, true, false);
			codeCompletionWindow.ShowCompletionWindow();
			return codeCompletionWindow;
        }
开发者ID:lisiynos,项目名称:pascalabcnet,代码行数:11,代码来源:CodeCompletionWindow.cs

示例14: SymbolsViwer

 public SymbolsViwer(ListView listView, ImageList imageList, bool showInThread, VisualPascalABCPlugins.InvokeDegegate beginInvoke,
     PascalABCCompiler.SourceFilesProviderDelegate sourceFilesProvider, VisualEnvironmentCompiler.ExecuteSourceLocationActionDelegate ExecuteSourceLocationAction)
 {
     this.listView = listView;
     this.imageList = imageList;
     this.showInThread = showInThread;
     this.beginInvoke = beginInvoke;
     this.sourceFilesProvider = sourceFilesProvider;
     this.ExecuteSourceLocationAction = ExecuteSourceLocationAction;
     listView.MouseDoubleClick += new MouseEventHandler(listView_MouseDoubleClick);
 }
开发者ID:lisiynos,项目名称:pascalabcnet,代码行数:11,代码来源:SymbolsViwer.cs

示例15: NetScope

		public NetScope(PascalABCCompiler.TreeRealization.using_namespace_list unar,System.Reflection.Assembly assembly,
			SymbolTable.TreeConverterSymbolTable tcst) : base(tcst)
		{
			_unar=unar;
			_assembly=assembly;
			UnitTypes = NetHelper.init_namespaces(assembly);
            if (UnitTypes.Count > 0)
            {
                entry_type = GetEntryType();
            }

			_tcst=tcst;
		}
开发者ID:lisiynos,项目名称:pascalabcnet,代码行数:13,代码来源:NetHelper.cs


注:本文中的PascalABCCompiler类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。