/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
grammar HermitRule;
axioms : ( axiom | ruleN | dGAxiom )*;
ruleN : dLSafeRule | dGRule;
dLSafeRule : DL_SAFE_RULE '(' annotation* BODY '(' atom* ')'
HEAD '(' head ')' ')';
head: atom*;
axiom : declaration | classAxiom | objectPropertyAxiom | dataPropertyAxiom | datatypeDefinition | hasKey | assertion | annotationAxiom;
declaration: DECLARATION '(' axiomAnnotations entity ')';
entity: class_entity | data_type_entity | object_property_entity
| data_property_entity | annotation_property_entity | named_individual_entity;
class_entity:CLASS '(' classN ')';
data_type_entity:DATA_TYPE '(' datatype ')';
object_property_entity:OBJECT_PROPERTY '(' objectProperty ')';
data_property_entity:DATA_PROPERTY '(' dataProperty ')';
annotation_property_entity:ANNOTATION_PROPERTY '(' annotationProperty ')';
named_individual_entity:NAMED_INDIVIDUAL '(' namedIndividual ')';
classAxiom:subClassOf | equivalentClasses | disjointClasses | disjointUnion;
subClassOf:SUB_CLASS_OF '(' axiomAnnotations subClassExpression superClassExpression ')';
equivalentClasses:EQUIVALENT_CLASSES '(' axiomAnnotations classExpression classExpression classExpression* ')';
subClassExpression : classExpression;
superClassExpression:classExpression;
disjointClasses:DISJOINT_CLASSES '(' axiomAnnotations classExpression classExpression classExpression* ')';
disjointUnion:DISJOINT_UNION '(' axiomAnnotations classN disjointClassExpressions ')';
disjointClassExpressions:classExpression classExpression classExpression*;
objectPropertyAxiom:
subObjectPropertyOf | equivalentObjectProperties |
disjointObjectProperties | inverseObjectProperties |
objectPropertyDomain | objectPropertyRange |
functionalObjectProperty | inverseFunctionalObjectProperty |
reflexiveObjectProperty | irreflexiveObjectProperty |
symmetricObjectProperty | asymmetricObjectProperty |
transitiveObjectProperty;
subObjectPropertyOf:SUB_OBJECT_PROPERTY_OF '(' axiomAnnotations subObjectPropertyExpression superObjectPropertyExpression ')';
subObjectPropertyExpression:objectPropertyExpression | propertyExpressionChain;
propertyExpressionChain:OBJECT_PROPERTY_CHAIN '(' objectPropertyExpression objectPropertyExpression objectPropertyExpression* ')';
superObjectPropertyExpression:objectPropertyExpression;
equivalentObjectProperties:EQUIVALENT_OBJECT_PROPERTIES '(' axiomAnnotations objectPropertyExpression objectPropertyExpression objectPropertyExpression* ')';
disjointObjectProperties:DISJOINT_OBJECT_PROPERTIES '(' axiomAnnotations objectPropertyExpression objectPropertyExpression objectPropertyExpression* ')';
objectPropertyDomain : OBJECT_PROPERTY_DOMAIN '(' axiomAnnotations objectPropertyExpression classExpression ')';
objectPropertyRange : OBJECT_PROPERTY_RANGE '(' axiomAnnotations objectPropertyExpression classExpression ')';
inverseObjectProperties : INVERSE_OBJECT_PROPERTIES '(' axiomAnnotations objectPropertyExpression objectPropertyExpression ')';
functionalObjectProperty : FUNCTIONAL_OBJECT_PROPERTY '(' axiomAnnotations objectPropertyExpression ')';
inverseFunctionalObjectProperty : INVERSE_FUNCTIONAL_OBJECT_PROPERTY '(' axiomAnnotations objectPropertyExpression ')';
reflexiveObjectProperty : REFLEXIVE_OBJECT_PROPERTY '(' axiomAnnotations objectPropertyExpression ')';
irreflexiveObjectProperty : IRREFLEXIVE_OBJECT_PROPERTY '(' axiomAnnotations objectPropertyExpression ')';
symmetricObjectProperty : SYMMETRIC_OBJECT_PROPERTY '(' axiomAnnotations objectPropertyExpression ')';
asymmetricObjectProperty : ASYMMETRIC_OBJECT_PROPERTY '(' axiomAnnotations objectPropertyExpression ')';
transitiveObjectProperty : TRANSITIVE_OBJECT_PROPERTY '(' axiomAnnotations objectPropertyExpression ')';
dataPropertyAxiom :
subDataPropertyOf | equivalentDataProperties | disjointDataProperties |
dataPropertyDomain | dataPropertyRange | functionalDataProperty;
subDataPropertyOf : SUB_DATA_PROPERTY_OF '(' axiomAnnotations subDataPropertyExpression superDataPropertyExpression ')';
subDataPropertyExpression : dataPropertyExpression;
superDataPropertyExpression : dataPropertyExpression;
equivalentDataProperties : EQUIVALENT_DATA_PROPERTIES '(' axiomAnnotations dataPropertyExpression dataPropertyExpression dataPropertyExpression* ')';
disjointDataProperties : DISJOINT_DATA_PROPERTIES '(' axiomAnnotations dataPropertyExpression dataPropertyExpression dataPropertyExpression* ')';
dataPropertyDomain : DATA_PROPERTY_DOMAIN '(' axiomAnnotations dataPropertyExpression classExpression ')';
dataPropertyRange : DATA_PROPERTY_RANGE '(' axiomAnnotations dataPropertyExpression dataRange ')';
functionalDataProperty :FUNCTIONAL_DATA_PROPERTY '(' axiomAnnotations dataPropertyExpression ')';
datatypeDefinition : DATATYPE_DEFINITION '(' axiomAnnotations datatype dataRange ')';
hasKey : HAS_KEY '(' axiomAnnotations classExpression '(' objectPropertyExpression* ')' '(' dataPropertyExpression* ')' ')';
atom:
class_atom | data_range_atom | object_property_atom
| data_property_atom | built_in_atom | same_individual_atom
| different_individuals_atom
;
class_atom:CLASS_ATOM '(' classExpression iArg ')';
data_range_atom:DATA_RANGE_ATOM '(' dataRange dArg ')';
object_property_atom:OBJECT_PROPERTY_ATOM '(' objectPropertyExpression iArg iArg ')';
data_property_atom:DATA_PROPERTY_ATOM '(' dataProperty iArg dArg ')';
built_in_atom:BUILT_IN_ATOM '(' iRI dArg dArg* ')';
same_individual_atom:SAME_INDIVIDUAL_ATOM '(' iArg iArg ')';
different_individuals_atom:DIFFERENT_INDIVIDUALS_ATOM '(' iArg iArg')';
iArg : VARIABLE '(' iRI ')' | individual;
dArg : VARIABLE '(' iRI ')' | literal;
dGRule : DESCRIPTION_GRAPH_RULE '(' annotation* BODY '(' dGAtom* ')'
HEAD '(' headDGRule ')' ')';
headDGRule:dGAtom*;
dGAtom : CLASS_ATOM '(' classExpression iArg ')'
| OBJECT_PROPERTY_ATOM '(' objectPropertyExpression iArg iArg ')';
dGAxiom : DESCRIPTION_GRAPH '(' annotation* dGNodes
dGEdges mainClasses')';
dGNodes : NODES'(' nodeAssertion nodeAssertion* ')';
nodeAssertion : NODE_ASSERTION'(' classN dGNode ')';
dGNode : iRI;
dGEdges : EDGES'(' edgeAssertion edgeAssertion* ')';
edgeAssertion : EDGE_ASSERTION '(' objectProperty dGNode dGNode')';
mainClasses : MAIN_CLASSES '(' classN classN* ')';
annotationSubject : iRI | anonymousIndividual;
annotationValue : anonymousIndividual | iRI | literal;
axiomAnnotations : annotation*;
annotation : ANNOTATION '(' annotationAnnotations annotationProperty annotationValue ')';
annotationAnnotations : annotation*;
annotationProperty : iRI;
annotationAxiom : annotationAssertion | subAnnotationPropertyOf | annotationPropertyDomain | annotationPropertyRange;
annotationAssertion : ANNOTATION_ASSERTION '(' axiomAnnotations annotationProperty annotationSubject annotationValue ')';
subAnnotationPropertyOf : SUB_ANNOTATION_PROPERTY_OF '(' axiomAnnotations subAnnotationProperty superAnnotationProperty ')';
subAnnotationProperty : annotationProperty;
superAnnotationProperty : annotationProperty;
annotationPropertyDomain : ANNOTATION_PROPERTY_DOMAIN '(' axiomAnnotations annotationProperty iRI ')';
annotationPropertyRange : ANNOTATION_PROPERTY_RANGE '(' axiomAnnotations annotationProperty iRI ')' ;
classExpression: classN |
objectIntersectionOf | objectUnionOf | objectComplementOf | objectOneOf |
objectSomeValuesFrom | objectAllValuesFrom | objectHasValue | objectHasSelf |
objectMinCardinality | objectMaxCardinality | objectExactCardinality |
dataSomeValuesFrom | dataAllValuesFrom | dataHasValue |
dataMinCardinality | dataMaxCardinality | dataExactCardinality;
objectIntersectionOf : OBJECT_INTERSECTION_OF '(' classExpression classExpression classExpression* ')';
objectUnionOf : OBJECT_UNION_OF '(' classExpression classExpression classExpression* ')';
objectComplementOf : OBJECT_COMPLEMENT_OF '(' classExpression ')';
objectOneOf : OBJECT_ONE_OF '(' individual individual*')';
objectSomeValuesFrom : OBJECT_SOME_VALUES_FROM '(' objectPropertyExpression classExpression ')';
objectAllValuesFrom : OBJECT_ALL_VALUES_FROM '(' objectPropertyExpression classExpression ')';
objectHasValue : OBJECT_HAS_VALUE '(' objectPropertyExpression individual ')';
objectHasSelf : OBJECT_HAS_SELF '(' objectPropertyExpression ')';
objectMinCardinality : OBJECT_MIN_CARDINALITY '(' INTEGER objectPropertyExpression classExpression? ')';
objectMaxCardinality : OBJECT_MAX_CARDINALITY '(' INTEGER objectPropertyExpression classExpression ? ')';
objectExactCardinality : OBJECT_EXACT_CARDINALITY '(' INTEGER objectPropertyExpression classExpression? ')';
dataSomeValuesFrom : DATA_SOME_VALUES_FROM '(' dataPropertyExpression dataPropertyExpression* dataRange ')';
dataAllValuesFrom : DATA_ALL_VALUES_FROM '(' dataPropertyExpression dataPropertyExpression* dataRange ')';
dataHasValue : DATA_HAS_VALUE '(' dataPropertyExpression literal ')';
dataMinCardinality : DATA_MIN_CARDINALITY '(' INTEGER dataPropertyExpression dataRange? ')';
dataMaxCardinality : DATA_MAX_CARDINALITY '(' INTEGER dataPropertyExpression dataRange? ')';
dataExactCardinality : DATA_EXACT_CARDINALITY '(' INTEGER dataPropertyExpression dataRange? ')';
dataPropertyExpression : dataProperty;
assertion :
sameIndividual | differentIndividuals | classAssertion |
objectPropertyAssertion | negativeObjectPropertyAssertion |
dataPropertyAssertion | negativeDataPropertyAssertion;
sourceIndividual : individual;
targetIndividual : individual;
targetValue : literal;
sameIndividual : SAME_INDIVIDUAL '(' axiomAnnotations individual individual individual* ')';
differentIndividuals : DIFFERENT_INDIVIDUALS '(' axiomAnnotations individual individual individual* ')';
classAssertion : CLASS_ASSERTION '(' axiomAnnotations classExpression individual ')';
objectPropertyAssertion : OBJECT_PROPERTY_ASSERTION '(' axiomAnnotations objectPropertyExpression sourceIndividual targetIndividual ')';
negativeObjectPropertyAssertion : NEGATIVE_OBJECT_PROPERTY_ASSERTION '(' axiomAnnotations objectPropertyExpression sourceIndividual targetIndividual ')';
dataPropertyAssertion : DATA_PROPERTY_ASSERTION '(' axiomAnnotations dataPropertyExpression sourceIndividual targetValue ')';
negativeDataPropertyAssertion : NEGATIVE_DATA_PROPERTY_ASSERTION '(' axiomAnnotations dataPropertyExpression sourceIndividual targetValue ')' ;
dataRange :
datatype |
dataIntersectionOf |
dataUnionOf |
dataComplementOf |
dataOneOf |
datatypeRestriction ;
dataIntersectionOf : DATA_INTERSECTION_OF '(' dataRange dataRange dataRange* ')' ;
dataUnionOf : DATA_UNION_OF '(' dataRange dataRange dataRange* ')' ;
dataComplementOf : DATA_COMPLEMENT_OF '(' dataRange ')' ;
dataOneOf : DATA_ONE_OF '(' literal literal* ')' ;
datatype : iRI;
objectPropertyExpression : objectProperty | inverseObjectProperty;
inverseObjectProperty : OBJECT_INVERSE_OF '(' objectProperty ')';
datatypeRestriction : DATATYPE_RESTRICTION '(' datatype constrainingFacet restrictionValue ( constrainingFacet restrictionValue)* ')';
constrainingFacet : iRI ;
restrictionValue : literal;
dataProperty:iRI;
individual: namedIndividual | anonymousIndividual;
namedIndividual:iRI;
anonymousIndividual:BLANK_NODE_LABEL;
literal: String ( LANGTAG | xsdIri)? ;
String : STRING_LITERAL1 | STRING_LITERAL2 | STRING_LITERAL_LONG1 | STRING_LITERAL_LONG2 ;
classN:iRI;
objectProperty:iRI;
iRI: IRIREF | prefixedName ;
prefixedName : PNAME_LN | PNAME_NS ;
blankNode : BLANK_NODE_LABEL | ANON ;
xsdIri: '^^' (IRIREF | prefixedName);//PNAME_LN | PNAME_NS;
COMMENT:
('#' .*? ('\r'| '\r\n')) {skip();}
;
IRIREF : '<' (~[\u0000-\u0020<>"{}|^`\\])* '>' ;
PNAME_NS : PN_PREFIX? ':' ;
PNAME_LN : PNAME_NS PN_LOCAL ;
BLANK_NODE_LABEL : '_:' ( PN_CHARS_U | [0-9] ) ((PN_CHARS|'.')* PN_CHARS)? ;
VAR1 : '?' VARNAME ;
VAR2 : '$' VARNAME ;
LANGTAG : '@' [a-zA-Z]+ ('-' [a-zA-Z0-9]+)* ;
INTEGER : [0-9]+ ;
DECIMAL : [0-9]* '.' [0-9]+ ;
DOUBLE : [0-9]+ '.' [0-9]* EXPONENT | '.' ([0-9])+ EXPONENT | ([0-9])+ EXPONENT ;
INTEGER_POSITIVE : '+' INTEGER ;
DECIMAL_POSITIVE : '+' DECIMAL ;
DOUBLE_POSITIVE : '+' DOUBLE ;
INTEGER_NEGATIVE : '-' INTEGER ;
DECIMAL_NEGATIVE : '-' DECIMAL ;
DOUBLE_NEGATIVE : '-' DOUBLE ;
fragment EXPONENT : E [+-]? [0-9]+ ;
fragment STRING_LITERAL1 : QUOTE1 ( (~[\u0027\u005C\u000A\u000D]) | ECHAR )* QUOTE1 ;
fragment STRING_LITERAL2 : QUOTE2 ( (~[\u0022\u005C\u000A\u000D]) | ECHAR )* QUOTE2 ;
fragment STRING_LITERAL_LONG1 : '\'\'\'' ( ( '\'' | '\'\'' )? ( ~[\'\\] | ECHAR ) )* '\'\'\'' ;
fragment STRING_LITERAL_LONG2 : '"""' ( ( '"' | '""' )? ( ~["\\] | ECHAR ) )* '"""' ;
fragment ECHAR : '\\' [tbnrf\\"'] ;
NIL : '(' WS* ')' ;
WS : ('\u0020' | '\u0009' | '\u000D' | '\u000A') {skip();} ;
ANON : '[' WS* ']' ;
DL_SAFE_RULE:'DLSafeRule';
BODY:'Body';
HEAD:'Head';
DECLARATION:'Declaration';
CLASS:'Class';
DATA_TYPE:'Datatype';
OBJECT_PROPERTY:'ObjectProperty';
DATA_PROPERTY:'DataProperty';
ANNOTATION_PROPERTY:'AnnotationProperty';
NAMED_INDIVIDUAL:'NamedIndividual';
SUB_CLASS_OF:'SubClassOf';
EQUIVALENT_CLASSES:'EquivalentClasses';
DISJOINT_CLASSES:'DisjointClasses';
DISJOINT_UNION:'DisjointUnion';
SUB_OBJECT_PROPERTY_OF:'SubObjectPropertyOf';
OBJECT_PROPERTY_CHAIN:'ObjectPropertyChain';
EQUIVALENT_OBJECT_PROPERTIES:'EquivalentObjectProperties';
DISJOINT_OBJECT_PROPERTIES:'DisjointObjectProperties';
OBJECT_PROPERTY_DOMAIN:'ObjectPropertyDomain';
OBJECT_PROPERTY_RANGE:'ObjectPropertyRange';
INVERSE_OBJECT_PROPERTIES:'InverseObjectProperties';
FUNCTIONAL_OBJECT_PROPERTY:'FunctionalObjectProperty';
INVERSE_FUNCTIONAL_OBJECT_PROPERTY:'InverseFunctionalObjectProperty';
REFLEXIVE_OBJECT_PROPERTY:'ReflexiveObjectProperty';
IRREFLEXIVE_OBJECT_PROPERTY :'IrreflexiveObjectProperty';
SYMMETRIC_OBJECT_PROPERTY:'SymmetricObjectProperty';
ASYMMETRIC_OBJECT_PROPERTY:'AsymmetricObjectProperty';
TRANSITIVE_OBJECT_PROPERTY:'TransitiveObjectProperty';
SUB_DATA_PROPERTY_OF:'SubDataPropertyOf';
EQUIVALENT_DATA_PROPERTIES:'EquivalentDataProperties';
DISJOINT_DATA_PROPERTIES:'DisjointDataProperties';
DATA_PROPERTY_DOMAIN:'DataPropertyDomain';
DATA_PROPERTY_RANGE:'DataPropertyRange';
FUNCTIONAL_DATA_PROPERTY:'FunctionalDataProperty';
DATATYPE_DEFINITION:'DatatypeDefinition';
HAS_KEY:'HasKey';
CLASS_ATOM:'ClassAtom';
DATA_RANGE_ATOM:'DataRangeAtom';
OBJECT_PROPERTY_ATOM:'ObjectPropertyAtom';
DATA_PROPERTY_ATOM:'DataPropertyAtom';
BUILT_IN_ATOM:'BuiltInAtom';
SAME_INDIVIDUAL_ATOM:'SameIndividualAtom';
DIFFERENT_INDIVIDUALS_ATOM:'DifferentIndividualsAtom';
VARIABLE:'Variable';
DESCRIPTION_GRAPH_RULE:'DescriptionGraphRule';
DESCRIPTION_GRAPH:'DescriptionGraph';
NODES:'Nodes';
NODE_ASSERTION:'NodeAssertion';
EDGES:'Edges';
EDGE_ASSERTION:'EdgeAssertion';
MAIN_CLASSES:'MainClasses';
ANNOTATION:'Annotation';
ANNOTATION_ASSERTION:'AnnotationAssertion';
SUB_ANNOTATION_PROPERTY_OF:'SubAnnotationPropertyOf';
ANNOTATION_PROPERTY_DOMAIN:'AnnotationPropertyDomain';
ANNOTATION_PROPERTY_RANGE:'AnnotationPropertyRange';
OBJECT_INTERSECTION_OF:'ObjectIntersectionOf';
OBJECT_UNION_OF:'ObjectUnionOf';
OBJECT_COMPLEMENT_OF:'ObjectComplementOf';
OBJECT_ONE_OF:'ObjectOneOf';
OBJECT_SOME_VALUES_FROM:'ObjectSomeValuesFrom';
OBJECT_ALL_VALUES_FROM:'ObjectAllValuesFrom';
OBJECT_HAS_VALUE:'ObjectHasValue';
OBJECT_HAS_SELF:'ObjectHasSelf';
OBJECT_MIN_CARDINALITY:'ObjectMinCardinality';
OBJECT_MAX_CARDINALITY:'ObjectMaxCardinality';
OBJECT_EXACT_CARDINALITY:'ObjectExactCardinality';
DATA_SOME_VALUES_FROM:'DataSomeValuesFrom';
DATA_ALL_VALUES_FROM:'DataAllValuesFrom';
DATA_HAS_VALUE:'DataHasValue';
DATA_MIN_CARDINALITY:'DataMinCardinality';
DATA_MAX_CARDINALITY:'DataMaxCardinality';
DATA_EXACT_CARDINALITY:'DataExactCardinality';
SAME_INDIVIDUAL:'SameIndividual';
DIFFERENT_INDIVIDUALS:'DifferentIndividuals';
CLASS_ASSERTION:'ClassAssertion';
OBJECT_PROPERTY_ASSERTION:'ObjectPropertyAssertion';
NEGATIVE_OBJECT_PROPERTY_ASSERTION:'NegativeObjectPropertyAssertion';
DATA_PROPERTY_ASSERTION:'DataPropertyAssertion';
NEGATIVE_DATA_PROPERTY_ASSERTION:'NegativeDataPropertyAssertion';
DATA_INTERSECTION_OF:'DataIntersectionOf';
DATA_UNION_OF:'DataUnionOf';
DATA_COMPLEMENT_OF:'DataComplementOf';
DATA_ONE_OF:'DataOneOf';
OBJECT_INVERSE_OF:'ObjectInverseOf';
DATATYPE_RESTRICTION:'DatatypeRestriction';
fragment PN_CHARS_BASE : (A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z) | [\u00C0-\u00D6] | [\u00D8-\u00F6] | [\u00F8-\u02FF] | [\u0370-\u037D] | [\u037F-\u1FFF] | [\u200C-\u200D] | [\u2070-\u218F] | [\u2C00-\u2FEF] | [\u3001-\uD7FF] | [\uF900-\uFDCF] | [\uFDF0-\uFFFD];// | [\u10000-\uEFFFF] ;
fragment PN_CHARS_U : PN_CHARS_BASE | '_' ;
fragment VARNAME : ( PN_CHARS_U | [0-9] ) ( PN_CHARS_U | [0-9] | '\u00B7' | [\u0300-\u036F] | [\u203F-\u2040] )* ;
fragment PN_CHARS : PN_CHARS_U | '-' | [0-9] | '\u00B7' | [\u0300-\u036F] | [\u203F-\u2040] ;
fragment PN_PREFIX : PN_CHARS_BASE ((PN_CHARS|'.')* PN_CHARS)? ;
fragment PN_LOCAL : (PN_CHARS_U | ':' | [0-9] | PLX ) ((PN_CHARS | '.' | ':' | PLX)* (PN_CHARS | ':' | PLX) )? ;
fragment PLX : PERCENT | PN_LOCAL_ESC ;
fragment PERCENT : '%' HEX HEX ;
fragment HEX : [0-9] | (A|B|C|D|E|F) ;
fragment PN_LOCAL_ESC : '\\' ( '_' | '~' | '.' | '-' | '!' | '$' | '&' | '"\'"' | '(' | ')' | '*' | '+' | ',' | ';' | '=' | '/' | '?' | '#' | '@' | '%' ) ;
fragment QUOTE2:'"';
fragment QUOTE1:'\'';
fragment A:[aA];
fragment B:[bB];
fragment C:[cC];
fragment D:[dD];
fragment E:[eE];
fragment F:[fF];
fragment G:[gG];
fragment H:[hH];
fragment I:[iI];
fragment J:[jJ];
fragment K:[kK];
fragment L:[lL];
fragment M:[mM];
fragment N:[nN];
fragment O:[oO];
fragment P:[pP];
fragment Q:[qQ];
fragment R:[rR];
fragment S:[sS];
fragment T:[tT];
fragment U:[uU];
fragment V:[vV];
fragment W:[wW];
fragment X:[xX];
fragment Y:[yY];
fragment Z:[zZ];
fragment UNDERLINE:'_';
用antlr文法编写的hermit swrl规则(分享)的更多相关文章
-
如何编写snort的检测规则
如何编写snort的检测规则 2013年09月08日 ⁄ 综合 ⁄ 共 16976字 前言 snort是一个强大的轻量级的网络入侵检测系统.它具有实时数据流量分析和日志IP网络数据包的能力,能够进行协 ...
-
编写基本的 udev 规则
来自: https://linux.cn/article-9365-1.html?utm_source=index&utm_medium=more 读者对象 理解 udev 背后的基本概念,学 ...
-
CentOS 7上编写自定义系统审计规则
1)简介 Linux审计系统创建审计跟踪,这是一种跟踪系统上各种信息的方法.它可以记录大量数据,如事件类型,日期和时间,用户ID,系统调用,进程,使用的文件,SELinux上下文和敏感度级别.它可以跟 ...
-
Python3简单登录接口编写及遇到的问题分享
1.程序目标 输入用户名密码 认证成功后显示欢迎信息 输错三次后锁定 2.思路 利用python中的pickle模块,实现用户登录信息(采用dict)和被锁定用户信息(采用list)的存储.所以我预先 ...
-
udev规则以及编写
主要内容: udev简介 如何配置和使用udev 如何编写udev规则 字符串替换和匹配 udev主要作用 编写udev规则实例 难点解析 1. udev简介 1.1 什么是udev? udev是Li ...
-
ANTLR随笔(一)
学习背景 最近做项目需要开发一个类似Graphql的简单版的自定义查询功能. 功能主要是通过前端自定义的复查询条件来控制后端的查询字段以及最终返回的JSON格式. 最初准备直接使用Graphql实现但 ...
-
ANTLR 语法设计
下面学习如何编写语法. 如何定义语法规则 一种语言模式就是一种递归的语法结构. 我们需要从一系列有代表性的输入文件中归纳出一门语言的结构.在完成这样的归纳工作后,我们就可以正式使用ANTLR语法来表达 ...
-
如何用 ANTLR 4 实现自己的脚本语言?
ANTLR 是一个 Java 实现的词法/语法分析生成程序,目前最新版本为 4.5.2,支持 Java,C#,JavaScript 等语言,这里我们用 ANTLR 4.5.2 来实现一个自己的脚本语言 ...
-
北航 编译实践 PL/0文法
编译实践-PL\0编译系统实现 姓名: 专业: 计算机科学与技术 学院: 软件学院 提交时间: 2013年12月25日 北京航空航天大学·软件学院 编译实践-PL\0编译系统实现 实验要求 以个人 ...
随机推荐
-
NSData与其它类型的转换
NSString转换成NSData对象 NSData *xmlData = [@"testdata" dataUsingEncoding:NSUTF8StringEncoding] ...
-
Unity3D在IOS上的优化小结
http://www.58player.com/blog-635-122.html 最近一段時間一直在做Unity 在IOS設備上的資源優化,結合Unity的官方文檔以及自己遇到的實際問題,我把自己認 ...
-
linux环境下deb格式 转换成rpm格式
linux环境下deb格式 转换成rpm格式 使用alien工具转换deb格式到rpm格式 alien_8.87.tar.gz 下载alien_8.87.tar.gz [root@mysqlnode2 ...
-
阿里巴巴 Java 开发规约插件初体验
阿里巴巴 Java 开发手册 又一次来谈<阿里巴巴 Java 开发手册>,经过这大半年的版本迭代,这本阿里工程师们总结出来避免写出那么多 Bug 的规范,对于 Java 开发者简直就是必备 ...
-
New UWP Community Toolkit - XAML Brushes
概述 上一篇 New UWP Community Toolkit 文章中,我们对 V2.2.0 版本的重要更新做了简单回顾.接下来会针对每个重要更新,结合 SDK 源代码和调用代码详细讲解. 本篇我们 ...
-
git window安装与注册邮箱用户名
1.git window版本下载 https://git-scm.com/downlods 下载完后点击安装包安装,一直下一步就行; 2.验证安装是否成功 在开始菜单里找到“Git”->“Git ...
-
一些日常工具集合(C++代码片段)
一些日常工具集合(C++代码片段) ——工欲善其事,必先利其器 尽管不会松松松,但是至少维持一个比较小的常数还是比较好的 在此之前依然要保证算法的正确性以及代码的可写性 本文依然会持久更新,因为一次写 ...
-
九、K3 WISE 开发插件《工业单据老单序时薄插件工具栏按钮开发实例》
=============================== 目录: 1.添加工具栏按钮 2.查询被添加工具栏按钮的业务单据的FMenuID和FID 3.添加工具栏按钮和业务单据的映射关系 4.工具 ...
-
第十一次ScrumMeeting博客
第十一次ScrumMeeting博客 本次会议于11月29日(三)22时整在3公寓725房间召开,持续30分钟. 与会人员:刘畅.辛德泰张安澜.赵奕.方科栋. 1. 每个人的工作(有Issue的内容和 ...
-
GDB高级用法
http://blog.csdn.net/wwwsq/article/details/7086151