gpt4 book ai didi

JavaScript/Html Pl/sql 验证器。

转载 作者:太空宇宙 更新时间:2023-11-04 13:25:05 25 4
gpt4 key购买 nike

我正在创建一个应用程序,用户可以在其中输入 html/Javascript 和 PL/SQL 代码,这些代码将存储在数据库中。我想在将它们存储在数据库中之前验证这些语言的语法。我正在为应用程序使用 C# 语言。我想知道是否有任何库可以用来实现

最佳答案

我刚刚遇到 Irony ,它将自己定义为“.NET 语言实现工具包”。它真的很棒。不过,我将它用于更简单的任务:将用户搜索转换为与 SQL-Server CONTAINS 兼容的表达式,如 this article 中所述。 (这可能是理解 Irony 功能的一个很好的起点)。

这是他们在 Codeplex 上的项目描述:

Irony is a development kit for implementing languages on .NET platform. Unlike most existing yacc/lex-style solutions Irony does not employ any scanner or parser code generation from grammar specifications written in a specialized meta-language. In Irony the target language grammar is coded directly in c# using operator overloading to express grammar constructs. Irony's scanner and parser modules use the grammar encoded as c# class to control the parsing process.

因此,它“正式”是语言实现的工具,但您完全可以仅将其用于语法验证。

关于JavaScript/Html Pl/sql 验证器。,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9318631/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com