本文翻译自:lexers vs parsers

Are lexers and parsers really that different in theory? 词法分析器和解析器在理论上真的有那么不同吗?

It seems fashionable to hate regular expressions: coding horror , another blog post . 讨厌正则表达式似乎很时髦: 编码恐怖 , 另一篇博客文章 。

However, popular lexing based tools: pygments , geshi , or prettify , all use regular expressions. 然而,流行的基于乐兴的工具: pygments , geshi或者美化 ,都使用正则表达式。 They seem to lex anything... 他们好像有什么东西......

When is lexing enough, when do you need EBNF? 什么时候足够兴奋,什么时候需要EBNF?

Has anyone used the tokens produced by these lexers with bison or antlr parser generators? 有没有人使用这些词法分析器生成的令牌与野牛或antlr解析器生成器?


#1楼

参考:https://stackoom.com/question/BvXl/词法分析者与解析者


#2楼

When is lexing enough, when do you need EBNF? 什么时候足够兴奋,什么时候需要EBNF?

EBNF really doesn't add much to the power of grammars. EBNF确实不会增加语法的力量 It's just a convenience / shortcut notation / "syntactic sugar" over the standard Chomsky's Normal Form (CNF) grammar rules. 它只是标准乔姆斯基普通形式(CNF)语法规则的便利/快捷符号/ “语法糖” For example, the EBNF alternative: 例如,EBNF替代方案:

S --> A | B

you can achieve in CNF by just listing each alternative production separately: 您可以通过单独列出每个替代产品来实现CNF:

S --> A      // `S` can be `A`,
S --> B      // or it can be `B`.

The optional element from EBNF: EBNF的可选元素:

S --> X?

you can achieve in CNF by using a nullable production, that is, the one which can be replaced by an empty string (denoted by just empty production here; others use epsilon or lambda or crossed circle): 您可以在CNF通过使用可空的生产,也就是说,它可以通过一个空字符串替换的一个实现(通过这里只是空洞的生产表示;其他人使用小量或lambda或十字圆):

S --> B       // `S` can be `B`,
B --> X       // and `B` can be just `X`,
B -->         // or it can be empty.

A production in a form like the last one B above is called "erasure", because it can erase whatever it stands for in other productions (product an empty string instead of something else). 像上面最后一个B形式的制作被称为“擦除”,因为它可以擦除其他制作中的任何形式(产品是空字符串而不是其他字符串)。

Zero-or-more repetiton from EBNF: 来自EBNF的零次或多次重复:

S --> A*

you can obtan by using recursive production, that is, one which embeds itself somewhere in it. 你可以通过使用递归生产来实现,也就是说,将其自身嵌入其中。 It can be done in two ways. 它可以通过两种方式完成。 First one is left recursion (which usually should be avoided, because Top-Down Recursive Descent parsers cannot parse it): 第一个是左递归 (通常应该避免,因为自上而下的递归下降解析器无法解析它):

S --> S A    // `S` is just itself ended with `A` (which can be done many times),
S -->        // or it can begin with empty-string, which stops the recursion.

Knowing that it generates just an empty string (ultimately) followed by zero or more A s, the same string ( but not the same language! ) can be expressed using right-recursion : 知道它只生成一个空字符串(最终)后跟零个或多个A s,可以使用右递归表示相同的字符串( 但不是相同的语言! ):

S --> A S    // `S` can be `A` followed by itself (which can be done many times),
S -->        // or it can be just empty-string end, which stops the recursion.

And when it comes to + for one-or-more repetition from EBNF: 而当谈到+从EBNF一个或更多的重复:

S --> A+

it can be done by factoring out one A and using * as before: 它可以通过分解一个A并使用*来完成:

S --> A A*

which you can express in CNF as such (I use right recursion here; try to figure out the other one yourself as an exercise): 您可以在CNF中表达(我在这里使用正确的递归;尝试将另一个自己想象为练习):

S --> A S   // `S` can be one `A` followed by `S` (which stands for more `A`s),
S --> A     // or it could be just one single `A`.

Knowing that, you can now probably recognize a grammar for a regular expression (that is, regular grammar ) as one which can be expressed in a single EBNF production consisting only from terminal symbols. 知道了,您现在可以将正则表达式(即常规语法 )的语法识别为可以在仅包含终端符号的单个EBNF生成中表达的语法 More generally, you can recognize regular grammars when you see productions similar to these: 更一般地说,当您看到与以下类似的作品时,您可以识别常规语法:

A -->        // Empty (nullable) production (AKA erasure).
B --> x      // Single terminal symbol.
C --> y D    // Simple state change from `C` to `D` when seeing input `y`.
E --> F z    // Simple state change from `E` to `F` when seeing input `z`.
G --> G u    // Left recursion.
H --> v H    // Right recursion.

That is, using only empty strings, terminal symbols, simple non-terminals for substitutions and state changes, and using recursion only to achieve repetition (iteration, which is just linear recursion - the one which doesn't branch tree-like). 也就是说,仅使用空字符串,终端符号,简单的非终端进行替换和状态更改,并且仅使用递归来实现重复(迭代,这只是线性递归 - 不是树状分支的那种)。 Nothing more advanced above these, then you're sure it's a regular syntax and you can go with just lexer for that. 没有比这更高级的东西了,那么你肯定它是一个常规语法,你可以用lexer来实现。

But when your syntax uses recursion in a non-trivial way, to produce tree-like, self-similar, nested structures, like the following one: 但是,当您的语法以非平凡的方式使用递归时,要生成类似树的,自相似的嵌套结构,如下所示:

S --> a S b    // `S` can be itself "parenthesized" by `a` and `b` on both sides.
S -->          // or it could be (ultimately) empty, which ends recursion.

then you can easily see that this cannot be done with regular expression, because you cannot resolve it into one single EBNF production in any way; 然后你可以很容易地看到这不能通过正则表达式完成,因为你无法以任何方式将其解析为单个EBNF生产; you'll end up with substituting for S indefinitely, which will always add another a s and b s on both sides. 你最终会与替代S无限,这将永远再添a S和b两侧秒。 Lexers (more specifically: Finite State Automata used by lexers) cannot count to arbitrary number (they are finite, remember?), so they don't know how many a s were there to match them evenly with so many b s. 词法分析器(更具体:由词法分析器使用有限状态自动机),也不能算到任意数量(它们是有限的,还记得吗?),所以他们不知道有多少a小号在那里有这么多的均匀与它们匹配b秒。 Grammars like this are called context-free grammars (at the very least), and they require a parser. 像这样的语法被称为无上下文语法 (至少),它们需要一个解析器。

Context-free grammars are well-known to parse, so they are widely used for describing programming languages' syntax. 无上下文语法是众所周知的解析,因此它们被广泛用于描述编程语言的语法。 But there's more. 但还有更多。 Sometimes a more general grammar is needed -- when you have more things to count at the same time, independently. 有时候需要一个更通用的语法 - 当你有更多的东西可以同时计算,独立时。 For example, when you want to describe a language where one can use round parentheses and square braces interleaved, but they have to be paired up correctly with each other (braces with braces, round with round). 例如,当您想要描述一种语言,其中可以使用圆括号和方括号交错,但它们必须彼此正确配对(带括号的大括号,圆形的圆形)。 This kind of grammar is called context-sensitive . 这种语法称为上下文敏感 You can recognize it by that it has more than one symbol on the left (before the arrow). 您可以通过左侧(箭头前)有多个符号来识别它。 For example: 例如:

A R B --> A S B

You can think of these additional symbols on the left as a "context" for applying the rule. 您可以将左侧的这些附加符号视为应用规则的“上下文”。 There could be some preconditions, postconditions etc. For example, the above rule will substitute R into S , but only when it's in between A and B , leaving those A and B themselves unchanged. 可能存在一些先决条件,后置条件等。例如,上述规则将R替换为S ,但仅当它在AB之间时,将AB本身保持不变。 This kind of syntax is really hard to parse, because it needs a full-blown Turing machine. 这种语法很难解析,因为它需要一台成熟的图灵机。 It's a whole another story, so I'll end here. 这是另一个故事,所以我会在这里结束。


#3楼

There are a number of reasons why the analysis portion of a compiler is normally separated into lexical analysis and parsing ( syntax analysis) phases. 编译器的分析部分通常分为词法分析和语法分析(语法分析)阶段有很多原因。

  1. Simplicity of design is the most important consideration. 设计的简单性是最重要的考虑因素。 The separation of lexical and syntactic analysis often allows us to simplify at least one of these tasks. 词法和句法分析的分离通常允许我们简化这些任务中的至少一个。 For example, a parser that had to deal with comments and white space as syntactic units would be. 例如,一个必须处理注释和空格作为语法单元的解析器。 Considerably more complex than one that can assume comments and white space have already been removed by the lexical analyzer. 词法分析器已经删除了可以假设注释和空格的复杂程度。 If we are designing a new language, separating lexical and syntactic concerns can lead to a cleaner overall language design. 如果我们正在设计一种新语言,将词汇和句法问题分开可以使整体语言设计更加清晰。
  2. Compiler efficiency is improved. 编译器效率得到提高。 A separate lexical analyzer allows us to apply specialized techniques that serve only the lexical task, not the job of parsing. 一个单独的词法分析器允许我们应用专门的技术,只用于词法任务,而不是解析工作。 In addition, specialized buffering techniques for reading input characters can speed up the compiler significantly. 此外,用于读取输入字符的专用缓冲技术可以显着加速编译器。
  3. Compiler portability is enhanced. 编译器的可移植性得到增强。 Input-device-specific peculiarities can be restricted to the lexical analyzer. 输入设备特定的特性可以限制在词法分析器中。

resource___ Compilers (2nd Edition) written by- Alfred V. Abo Columbia University Monica S. Lam Stanford University Ravi Sethi Avaya Jeffrey D. Ullman Stanford University 资源___编者 (第2版) - Alfred V. Abo哥伦比亚大学Monica S. Lam斯坦福大学Ravi Sethi Avaya Jeffrey D. Ullman斯坦福大学


#4楼

To answer the question as asked (without repeating unduly what appears in other answers) 按要求回答问题(不要过度重复其他答案中出现的问题)

Lexers and parsers are not very different, as suggested by the accepted answer. 根据公认的答案,Lexers和解析器并没有太大差异。 Both are based on simple language formalisms: regular languages for lexers and, almost always, context-free (CF) languages for parsers. 两者都基于简单的语言形式:词法分析器的常规语言,以及几乎总是用于解析器的无上下文(CF)语言。 They both are associated with fairly simple computational models, the finite state automaton and the push-down stack automaton. 它们都与相当简单的计算模型相关联,即有限状态自动机和下推堆栈自动机。 Regular languages are a special case of context-free languages, so that lexers could be produced with the somewhat more complex CF technology. 常规语言是无上下文语言的特例,因此可以使用更复杂的CF技术生成词法分析器。 But it is not a good idea for at least two reasons. 至少有两个原因并不是一个好主意

A fundamental point in programming is that a system component should be buit with the most appropriate technology, so that it is easy to produce, to understand and to maintain. 编程的一个基本点是系统组件应该使用最合适的技术进行编写,以便易于生成,理解和维护。 The technology should not be overkill (using techniques much more complex and costly than needed), nor should it be at the limit of its power, thus requiring technical contortions to achieve the desired goal. 该技术不应过度使用(使用比所需技术复杂且成本更高的技术),也不应超出其功率限制,因此需要技术扭曲才能达到预期目标。

That is why "It seems fashionable to hate regular expressions". 这就是为什么“讨厌正则表达式似乎很时髦”。 Though they can do a lot, they sometimes require very unreadable coding to achieve it, not to mention the fact that various extensions and restrictions in implementation somewhat reduce their theoretical simplicity. 虽然它们可以做很多事情,但它们有时需要非常难以理解的编码来实现它,更不用说实现中的各种扩展和限制在某种程度上降低了它们的理论简单性。 Lexers do not usually do that, and are usually a simple, efficient, and appropriate technology to parse token. Lexers通常不这样做,并且通常是一种简单,有效且适当的解析令牌的技术。 Using CF parsers for token would be overkill, though it is possible. 虽然有可能,但使用CF解析器进行令牌可能会过度。

Another reason not to use CF formalism for lexers is that it might then be tempting to use the full CF power. 不使用CF形式主义用于词法分析器的另一个原因是它可能很容易使用完整的CF能力。 But that might raise sructural problems regarding the reading of programs. 但这可能会引发有关阅读节目的问题。

Fundamentally, most of the structure of program text, from which meaning is extracted, is a tree structure. 从根本上说,提取含义的程序文本的大部分结构是树结构。 It expresses how the parse sentence (program) is generated from syntax rules. 它表示如何从语法规则生成解析句(程序)。 Semantics is derived by compositional techniques (homomorphism for the mathematically oriented) from the way syntax rules are composed to build the parse tree. 语义学是通过组合技术(数学导向的同态)从语法规则组成的方式构建的,以构建解析树。 Hence the tree structure is essential. 因此树结构是必不可少的。 The fact that tokens are identified with a regular set based lexer does not change the situation, because CF composed with regular still gives CF (I am speaking very loosely about regular transducers, that transform a stream of characters into a stream of token). 使用基于规则集的词法分析器来识别令牌的事实并没有改变这种情况,因为由常规组成的CF仍然给出了CF(我对常规换能器的说法非常松散,将字符流转换为令牌流)。

However, CF composed with CF (via CF transducers ... sorry for the math), does not necessarily give CF, and might makes things more general, but less tractable in practice. 然而,由CF组成的CF(通过CF传感器...对于数学抱歉),不一定给CF,并且可能使事情更通用,但在实践中不易处理。 So CF is not the appropriate tool for lexers, even though it can be used. 所以CF不是词法分析器的合适工具,即使它可以使用。

One of the major differences between regular and CF is that regular languages (and transducers) compose very well with almost any formalism in various ways, while CF languages (and transducers) do not, not even with themselves (with a few exceptions). 常规语言和CF之间的主要区别之一是常规语言(和传感器)以各种方式与几乎任何形式主义很好地组合,而CF语言(和传感器)则没有,甚至没有自己(除了少数例外)。

(Note that regular transducers may have others uses, such as formalization of some syntax error handling techniques.) (请注意,常规传感器可能有其他用途,例如某些语法错误处理技术的形式化。)

BNF is just a specific syntax for presenting CF grammars. BNF只是呈现CF语法的特定语法。

EBNF is a syntactic sugar for BNF , using the facilities of regular notation to give terser version of BNF grammars. EBNF是BNF的一种语法糖 ,使用常规符号设施来提供更为简洁的BNF语法。 It can always be transformed into an equivalent pure BNF. 它总是可以转换为等效的纯BNF。

However, the regular notation is often used in EBNF only to emphasize these parts of the syntax that correspond to the structure of lexical elements, and should be recognized with the lexer, while the rest with be rather presented in straight BNF. 然而,常规符号通常在EBNF中用于强调语法的这些部分,这些部分对应于词法​​元素的结构,并且应该用词法分析器识别,而其余部分则用直接BNF表示。 But it is not an absolute rule. 但这不是一个绝对的规则。

To summarize, the simpler structure of token is better analyzed with the simpler technology of regular languages, while the tree oriented structure of the language (of program syntax) is better handled by CF grammars. 总而言之, 使用常规语言的简单技术可以更好地分析令牌的简单结构,而CF语法可以更好地处理语言(程序语法)的树形结构。

I would suggest also looking at AHR's answer . 我建议也看一下AHR的答案 。

But this leaves a question open: Why trees? 但这留下了一个问题: 为什么是树木?

Trees are a good basis for specifying syntax because 树是指定语法的良好基础,因为

  • they give a simple structure to the text 它们为文本提供了一个简单的结构

  • there are very convenient for associating semantics with the text on the basis of that structure, with a mathematically well understood technology (compositionality via homomorphisms), as indicated above. 如上所述,基于该结构将语义与文本相关联是非常方便的,具有数学上易于理解的技术(通过同态的组合性)。 It is a fundamental algebraic tool to define the semantics of mathematical formalisms. 它是定义数学形式主义语义的基本代数工具。

Hence it is a good intermediate representation, as shown by the success of Abstract Syntax Trees (AST). 因此,它是一个很好的中间表示,如抽象语法树(AST)的成功所示。 Note that AST are often different from parse tree because the parsing technology used by many professionals (Such as LL or LR) applies only to a subset of CF grammars, thus forcing grammatical distorsions which are later corrected in AST. 请注意,AST通常与解析树不同,因为许多专业人员(例如LL或LR)使用的解析技术仅适用于CF语法的子集,因此强制语法扭曲,后来在AST中进行了纠正。 This can be avoided with more general parsing technology (based on dynamic programming) that accepts any CF grammar. 使用接受任何CF语法的更通用的解析技术(基于动态编程)可以避免这种情况。

Statement about the fact that programming languages are context-sensitive (CS) rather than CF are arbitrary and disputable. 关于编程语言是上下文敏感(CS)而不是CF的事实的陈述是任意的和有争议的。

The problem is that the separation of syntax and semantics is arbitrary. 问题是语法和语义的分离是任意的。 Checking declarations or type agreement may be seen as either part of syntax, or part of semantics. 检查声明或类型协议可以被视为语法的一部分或语义的一部分。 The same would be true of gender and number agreement in natural languages. 自然语言中的性别和数字协议也是如此。 But there are natural languages where plural agreement depends on the actual semantic meaning of words, so that it does not fit well with syntax. 但是有些自然语言中复数一致性取决于单词的实际语义,因此它不适合语法。

Many definitions of programming languages in denotational semantics place declarations and type checking in the semantics. 指称语义中的许多编程语言定义在语义中放置声明和类型检查。 So stating as done by Ira Baxter that CF parsers are being hacked to get a context sensitivity required by syntax is at best an arbitrary view of the situation. 因此, Ira Baxter所说的CF语法分析器被黑客攻击以获得语法所需的上下文敏感性充其量只是对情况的任意看法。 It may be organized as a hack in some compilers, but it does not have to be. 它可能被组织为一些编译器中的hack,但它不一定是。

Also it is not just that CS parsers (in the sense used in other answers here) are hard to build, and less efficient. 此外,不仅CS解析器(在此处的其他答案中使用的意义上)难以构建,而且效率较低。 They are are also inadequate to express perspicuously the kinf of context-sensitivity that might be needed. 它们也不足以明显地表达可能需要的背景敏感性。 And they do not naturally produce a syntactic structure (such as parse-trees) that is convenient to derive the semantics of the program, ie to generate the compiled code. 并且它们不会自然地产生一种语法结构(例如解析树),它便于导出程序的语义,即生成编译的代码。


#5楼

Yes, they are very different in theory, and in implementation. 是的,它们在理论和实施方面都有很大的不同。

Lexers are used to recognize "words" that make up language elements, because the structure of such words is generally simple. 词汇表用于识别构成语言元素的“单词”,因为这些单词的结构通常很简单。 Regular expressions are extremely good at handling this simpler structure, and there are very high-performance regular-expression matching engines used to implement lexers. 正则表达式非常擅长处理这种更简单的结构,并且有非常高性能的正则表达式匹配引擎用于实现词法分析器。

Parsers are used to recognize "structure" of a language phrases. 解析器用于识别语言短语的“结构”。 Such structure is generally far beyond what "regular expressions" can recognize, so one needs "context sensitive" parsers to extract such structure. 这种结构通常远远超出“正则表达式”可以识别的结构,因此需要“上下文敏感”解析器来提取这样的结构。 Context-sensitive parsers are hard to build, so the engineering compromise is to use "context-free" grammars and add hacks to the parsers ("symbol tables", etc.) to handle the context-sensitive part. 上下文敏感的解析器很难构建,因此工程方面的妥协是使用“无上下文”语法并向解析器添加黑客(“符号表”等)来处理上下文敏感的部分。

Neither lexing nor parsing technology is likely to go away soon. lexing和解析技术都不会很快消失。

They may be unified by deciding to use "parsing" technology to recognize "words", as is currently explored by so-called scannerless GLR parsers. 它们可以通过决定使用“解析”技术来识别“单词”来统一,正如目前由所谓的无扫描器GLR解析器所探索的那样。 That has a runtime cost, as you are applying more general machinery to what is often a problem that doesn't need it, and usually you pay for that in overhead. 这有一个运行时成本,因为您将更多通用机器应用于通常不需要它的问题,通常您需要在开销中支付。 Where you have lots of free cycles, that overhead may not matter. 如果你有很多自由周期,那么开销可能无关紧要。 If you process a lot of text, then the overhead does matter and classical regular expression parsers will continue to be used. 如果您处理大量文本,那么开销就很重要,并且将继续使用经典的正则表达式解析器。


#6楼

What parsers and lexers have in common: 解析器和词法分析者的共同点是:

  1. They read symbols of some alphabet from their input. 他们从输入中读取某些字母的 符号

    • Hint: The alphabet doesn't necessarily have to be of letters. 提示:字母表不一定是字母。 But it has to be of symbols which are atomic for the language understood by parser/lexer. 但它必须是解析器/词法分析器理解的语言的原子符号。
    • Symbols for the lexer: ASCII characters. 词法分子的符号:ASCII字符。
    • Symbols for the parser: the particular tokens, which are terminal symbols of their grammar. 解析器的符号:特定的令牌,它们是语法的终端符号。
  2. They analyse these symbols and try to match them with the grammar of the language they understood. 他们分析这些符号并尝试将它们与他们理解的语言的语法相匹配。

    • Here's where the real difference usually lies. 这是真正的差异通常所在。 See below for more. 见下文了解更多。
    • Grammar understood by lexers: regular grammar (Chomsky's level 3). 词法学者理解语法:常规语法(乔姆斯基的3级)。
    • Grammar understood by parsers: context-free grammar (Chomsky's level 2). 解析器理解语法:无上下文语法(乔姆斯基的2级)。
  3. They attach semantics (meaning) to the language pieces they find. 他们将语义 (意义)附加到他们找到的语言片段上。

    • Lexers attach meaning by classifying lexemes (strings of symbols from the input) as the particular tokens . 词法分析器通过分类的词位 (从输入码元串)作为特定令牌附加的含义。 Eg All these lexemes: * , == , <= , ^ will be classified as "operator" token by the C/C++ lexer. 例如,所有这些词汇: *==<=^将被C / C ++词法分类器归类为“运算符”标记。
    • Parsers attach meaning by classifying strings of tokens from the input (sentences) as the particular nonterminals and building the parse tree . 解析器通过将输入(句子)中的标记字符串分类为特定的非终结符并构建解析树来附加含义。 Eg all these token strings: [number][operator][number] , [id][operator][id] , [id][operator][number][operator][number] will be classified as "expression" nonterminal by the C/C++ parser. 例如,所有这些令牌字符串: [number][operator][number][id][operator][id][id][operator][number][operator][number]将被分类为“表达式”非终结符C / C ++解析器。
  4. They can attach some additional meaning (data) to the recognized elements. 他们可以为识别的元素附加一些额外的含义(数据)。

    • When a lexer recognizes a character sequence constituting a proper number, it can convert it to its binary value and store with the "number" token. 当词法分析器识别出构成正确数字的字符序列时,它可以将其转换为二进制值并以“数字”标记存储。
    • Similarly, when a parser recognize an expression, it can compute its value and store with the "expression" node of the syntax tree. 类似地,当解析器识别表达式时,它可以计算其值并与语法树的“表达式”节点一起存储。
  5. They all produce on their output a proper sentences of the language they recognize. 他们都在他们的输出上产生他们认可的语言的正确句子

    • Lexers produce tokens , which are sentences of the regular language they recognize. 词典生成令牌 ,这些令牌是他们认可的常用语言的 句子 Each token can have an inner syntax (though level 3, not level 2), but that doesn't matter for the output data and for the one which reads them. 每个令牌都可以具有内部语法(虽然级别3,而不是级别2),但这对输出数据和读取它们的数据无关紧要。
    • Parsers produce syntax trees , which are representations of sentences of the context-free language they recognize. 解析器生成语法树 ,它们是他们识别的无上下文语言句子的表示。 Usually it's only one big tree for the whole document/source file, because the whole document/source file is a proper sentence for them. 通常它只是整个文档/源文件的一个大树,因为整个文档/源文件对于它们来说是恰当的句子 But there aren't any reasons why parser couldn't produce a series of syntax trees on its output. 但是没有任何理由可以解析为什么解析器无法在其输出上生成一系列语法树。 Eg it could be a parser which recognizes SGML tags sticked into plain-text. 例如,它可以是一个解析器,它可以识别粘贴在纯文本中的SGML标签。 So it'll tokenize the SGML document into a series of tokens: [TXT][TAG][TAG][TXT][TAG][TXT]... . 因此它会将SGML文档标记为一系列令牌: [TXT][TAG][TAG][TXT][TAG][TXT]...

As you can see, parsers and tokenizers have much in common. 如您所见,解析器和标记器有许多共同点。 One parser can be a tokenizer for other parser, which reads its input tokens as symbols from its own alphabet (tokens are simply symbols of some alphabet) in the same way as sentences from one language can be alphabetic symbols of some other, higher-level language. 一个解析器可以是其他解析器的标记器,它将其输入标记作为符号从其自己的字母表中读取(标记只是某些字母表的符号),就像来自一种语言的句子可以是其他一些语言的字母符号一样。语言。 For example, if * and - are the symbols of the alphabet M (as "Morse code symbols"), then you can build a parser which recognizes strings of these dots and lines as letters encoded in the Morse code. 例如,如果*-是字母M的符号(作为“莫尔斯代码符号”),那么您可以构建一个解析器,将这些点和线的字符串识别为摩尔斯电码中编码的字母。 The sentences in the language "Morse Code" could be tokens for some other parser, for which these tokens are atomic symbols of its language (eg "English Words" language). 语言“摩尔斯电码”中的句子可以是其他解析器的标记 ,其中这些标记是其语言的原子符号(例如“英语单词”语言)。 And these "English Words" could be tokens (symbols of the alphabet) for some higher-level parser which understands "English Sentences" language. 对于理解“英语句子”语言的某些更高级别的解析器,这些“英语单词”可以是令牌(字母表的符号)。 And all these languages differ only in the complexity of the grammar . 所有这些语言的区别仅在于语法的复杂性 Nothing more. 而已。

So what's all about these "Chomsky's grammar levels"? 那么这些“乔姆斯基的语法水平”究竟是什么呢? Well, Noam Chomsky classified grammars into four levels depending on their complexity: 好吧,Noam Chomsky将语法分为四个级别,具体取决于它们的复杂程度:

  • Level 3: Regular grammars 3级:常规语法

    They use regular expressions, that is, they can consist only of the symbols of alphabet ( a , b ), their concatenations ( ab , aba , bbb etd.), or alternatives (eg a|b ). 它们使用正则表达式,也就是说,它们只能由字母表符号( ab ),它们的连接符号( abababbb etd。)或替代符号(例如a|b )组成。
    They can be implemented as finite state automata (FSA), like NFA (Nondeterministic Finite Automaton) or better DFA (Deterministic Finite Automaton). 它们可以实现为有限状态自动机(FSA),如NFA(非确定性有限自动机)或更好的DFA(确定性有限自动机)。
    Regular grammars can't handle with nested syntax , eg properly nested/matched parentheses (()()(()())) , nested HTML/BBcode tags, nested blocks etc. It's because state automata to deal with it should have to have infinitely many states to handle infinitely many nesting levels. 常规语法无法处理嵌套语法 ,例如正确嵌套/匹配的括号(()()(()())) ,嵌套的HTML / BBcode标签,嵌套块等。这是因为处理它的状态自动机应该必须有无限多个状态来处理无限多的嵌套级别。
  • Level 2: Context-free grammars 第2级:无上下文语法

    They can have nested, recursive, self-similar branches in their syntax trees, so they can handle with nested structures well. 它们可以在语法树中具有嵌套的,递归的,自相似的分支,因此它们可以很好地处理嵌套结构。
    They can be implemented as state automaton with stack. 它们可以实现为具有堆栈的状态自动机。 This stack is used to represent the nesting level of the syntax. 此堆栈用于表示语法的嵌套级别。 In practice, they're usually implemented as a top-down, recursive-descent parser which uses machine's procedure call stack to track the nesting level, and use recursively called procedures/functions for every non-terminal symbol in their syntax. 实际上,它们通常被实现为自上而下的递归下降解析器,它使用机器的过程调用栈来跟踪嵌套级别,并在语法中对每个非终端符号使用递归调用的过程/函数。
    But they can't handle with a context-sensitive syntax. 但他们无法处理上下文相关的语法。 Eg when you have an expression x+3 and in one context this x could be a name of a variable, and in other context it could be a name of a function etc. 例如,当你有一个表达式x+3并且在一个上下文中,这个x可以是变量的名称,而在其他上下文中它可以是函数的名称等。
  • Level 1: Context-sensitive grammars 第1级:上下文敏感的语法

  • Level 0: Unrestricted grammars 0级:不受限制的语法
    Also called recursively enumerable grammars. 也称为递归可枚举语法。

查看全文
如若内容造成侵权/违法违规/事实不符,请联系编程学习网邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!

相关文章

  1. maven里面web.xml的配置文件

    这是一个servlet 3 的web.xml 配置文件的模板 <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/javaee"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation=&…...

    2024/4/27 14:25:25
  2. 这个怎么做……

    ...

    2024/4/27 13:55:19
  3. HihoCoder1410 Powers of Two

    传送门:HihoCoder1410 Powers of Two 题目描述测试样例 Sample Input 7Sample Output 2题目大意给定一个正整数N,可以将N表示为2的几个正或负幂的和。例如:7=22+21+20或7=23+(-2)0。求最少的加数个数。 AC代码 #include<cstdio> #include<algorithm> using nam…...

    2024/4/27 3:53:21
  4. 神经网络:正则化 范数 Droupout BN 方差 偏差 距离 损失 梯度 指标 学习率 超参数 归一化 标准化 激活 过拟合抑制 数据增强 标签平滑

    日萌社人工智能AI:Keras PyTorch MXNet TensorFlow PaddlePaddle 深度学习实战(不定时更新)1.梯度下降1.随机梯度下降算法:计算一个随机样本的损失函数关于参数θ的梯度来更新权重。每迭代更新一次权重都需要计算所有样本误差,效率偏低。容易陷入局部最优解。2.全梯度下降…...

    2024/4/9 19:00:30
  5. Vue 导入外部css样式文件

    1.css文件一般放在src下,新建style文件夹中。 2.引入文件,在app.vue中添加如下: <template><div id="app"><router-view /></div> </template><style lang="scss"> //取消页面的默认外边距。 body {margin: 0;padd…...

    2024/4/9 19:00:28
  6. Linux内核提权漏洞发现与利用

    漏洞发现 针对相应系统版本的cve提权漏洞 uname -a 所有版本 uname -r 内核版本信息 cat /proc/version 内核信息 Linux Exploit Suggester 下载linux-exploit-suggester.sh文件 wget https://raw.githubusercontent.com/mzet-/linux-exploit-suggester/master/linux-exploit-s…...

    2024/4/21 19:47:05
  7. Ajax实战-通过Ajax完成删除用户

    目录1 通过 Ajax 完成删除用户2 在 Servlet 处理删除用户请求3 运行效果1 通过 Ajax 完成删除用户<script>$(function () {//获取页面初始化数据getData();//添加按钮绑定点击事件$("#add").click(function(){addOrUpdateUser("addUser");});//更新按…...

    2024/4/25 12:06:50
  8. SpringBoot学习-part49缓存工作原理&Cachable运行流程

    Cache的自动配置 启动后根据加载的依赖,导入相应Cache配置模块 缓存的配置类:org.springframework.boot.autoconfigure.cache.GenericCacheConfiguration org.springframework.boot.autoconfigure.cache.JCacheCacheConfiguration org.springframework.boot.autoconfigure.ca…...

    2024/4/20 14:41:59
  9. cocos creator微信小游戏 加载进度页面

    参考文档 1、Cocos creator 微信小游戏 加载远程资源启动页 https://blog.csdn.net/nihaoqlw/article/details/85139823 2、手把手教你制作微信小游戏的下载进度条-适用于cocos3D https://forum.cocos.org/t/cocos3d/89614 正文 1、添加 loading-scene 页面内容loading-scene.j…...

    2024/4/26 13:57:41
  10. LeetCode-Algorithms-[Easy]121. 买卖股票的最佳时机

    给定一个数组,它的第 i 个元素是一支给定股票第 i 天的价格。 如果你最多只允许完成一笔交易(即买入和卖出一支股票一次),设计一个算法来计算你所能获取的最大利润。 注意:你不能在买入股票前卖出股票。 示例 1:输入: [7,1,5,3,6,4] 输出: 5 解释: 在第 2 天(股票价格 = …...

    2024/4/20 6:05:11
  11. mui 总结

    折叠面板:accordion 代码激活字符:maccordion 可以在折叠面板中放置任何内容;折叠面板默认收缩,若希望某个面板默认展开,只需要在包含 .mui-collapse 类的 li 节点上 增加 .mui-active 类即可; 操作表:actionsheet 代码激活字符:mactionsheet actionsheet 一般从底部弹…...

    2024/4/23 13:22:54
  12. Assembly-Lab 8

    文章目录实验8实验分析汇编编译器(masm.exe)对jmp的相关处理 实验8 分析下面程序,这个程序可以正确返回吗? assume cs:codesg codesg segmentmov ax,4c00hint 21hstart: mov ax,0s: nopnopmov di,offset smov si,offset s2mov ax,cs:[si]mov cs:[di],axs0: jmp short ss1: mo…...

    2024/4/21 12:20:17
  13. 21--最小栈

    文章目录1.问题描述2. 代码详情 1.问题描述 设计一个支持 push ,pop ,top 操作,并能在常数时间内检索到最小元素的栈。 push(x) —— 将元素 x 推入栈中。 pop() —— 删除栈顶的元素。 top() —— 获取栈顶元素。 getMin() —— 检索栈中的最小元素。 示例: 输入: [“MinS…...

    2024/4/9 19:00:20
  14. linux常用命令

    linux常用命令查找大文件find . -type f -size +800Modps的log文件居然涨到100G了,Mac自带的功能不能发现这种隐藏大文件,还是linux命令好用...

    2024/4/9 19:00:19
  15. HTML3-视频图像的插入

    目标:分帧窗口实例:左右分割:<html> <head> <title>分帧窗口示例</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> </head> <frameset cols="20%,*" > <frame…...

    2024/4/17 18:22:05
  16. IP地址、子网掩码、网络号、主机号、直接广播地址 | 计算机网络中的这些高频考题你到底知道多少?

    原文链接:原文来自个人公众号:C you again,欢迎关注对于IT从业者来说,计算机网络是一门必修课,也是一块硬骨头,不论是你是在工作中还是面试时,都需要掌握一些网络技术。从本期开始,小编对计算机网络中出现的高频知识点和题目进行收集整理,方便大家使用。题目:计算并填…...

    2024/4/17 15:41:05
  17. RedisTemplate取值多双引号问题

    RedisTemplate取值多双引号问题 原本的配置类: @Beanpublic RedisTemplate<String, Object> redisTemplate(RedisConnectionFactory factory) {RedisTemplate<String, Object> template = new RedisTemplate<String, Object>();template.setConnectionFacto…...

    2024/4/24 23:27:35
  18. shiro限制同一账号登录限制

    一 shiro整合kickoutSessionFilter 1 注入kickoutSessionFilter <bean id="kickoutSessionFilter" name="kickoutSessionFilter" class="com.msunsoft.listener.KickoutSessionFilter"><property name="cacheManager" ref=&q…...

    2024/4/16 20:56:34
  19. return 和 exit

    return和exit都表示退出的意思,但是二者大有区别,先来说区别吧。区别:1.retrun是关键字,exit()是函数调用2.return 返回表示函数的调用结束,释放栈帧。exit表示退出进程,程序的结束。二者在调用函数的区别较明显,在主函数的话,功能一致,都退出程序。不管是return 0还是…...

    2024/4/13 3:00:09
  20. 史上最强超融合入门干货:超融合与传统架构特性及收益详细对比

    在IT基础架构领域工作有十年了,亲眼目睹和参与了上一代网络存储架构在中国的兴起和衰败。的确,新IT浪潮已经到来,超融合就是诸多风口之一,成为了近几年IT业界备受关注的话题。虽然超融合这个概念已经被厂商热炒了至少两年,但看到市场上依旧存在着很多模糊的定义和理解,所…...

    2024/4/9 18:53:43

最新文章

  1. Matlab|交直流混合配电网潮流计算(统一求解法)

    目录 1 主要内容 算例模型 统一求解法迭代方程 算法流程图 2 部分代码 3 程序结果 4 下载链接 1 主要内容 该程序为matlab代码&#xff0c;采用统一求解法对交直流混合配电网进行潮流计算&#xff0c;统一迭代法又称统一求解法&#xff0c;其思路是将混联系统中的交流网…...

    2024/4/27 15:11:12
  2. 梯度消失和梯度爆炸的一些处理方法

    在这里是记录一下梯度消失或梯度爆炸的一些处理技巧。全当学习总结了如有错误还请留言&#xff0c;在此感激不尽。 权重和梯度的更新公式如下&#xff1a; w w − η ⋅ ∇ w w w - \eta \cdot \nabla w ww−η⋅∇w 个人通俗的理解梯度消失就是网络模型在反向求导的时候出…...

    2024/3/20 10:50:27
  3. 【C++】map set 底层刨析

    文章目录 1. 红黑树的迭代器2. 改造红黑树3. map 的模拟实现4. set 的模拟实现 在 C STL 库中&#xff0c;map 与 set 的底层为红黑树&#xff0c;那么在不写冗余代码的情况下使用红黑树同时实现 map 与 set 便是本文的重点。 1. 红黑树的迭代器 迭代器的好处是可以方便遍历&…...

    2024/4/25 6:15:29
  4. 手搓 Docker Image Creator(DIC)工具(02):预备知识

    此节主要简单介绍一下 Docker、Dockerfile 的基本概念&#xff0c;Dockerfile 对的基本语法&#xff0c;Windows 和 macOS 下 Docker 桌面的安装&#xff0c;Docker 镜像的创建和运行测试等。 1 关于 Docker Docker 是一个开源的应用容器引擎&#xff0c;它允许开发者打包应用…...

    2024/4/26 16:52:01
  5. 416. 分割等和子集问题(动态规划)

    题目 题解 class Solution:def canPartition(self, nums: List[int]) -> bool:# badcaseif not nums:return True# 不能被2整除if sum(nums) % 2 ! 0:return False# 状态定义&#xff1a;dp[i][j]表示当背包容量为j&#xff0c;用前i个物品是否正好可以将背包填满&#xff…...

    2024/4/27 1:53:53
  6. 【Java】ExcelWriter自适应宽度工具类(支持中文)

    工具类 import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.CellType; import org.apache.poi.ss.usermodel.Row; import org.apache.poi.ss.usermodel.Sheet;/*** Excel工具类** author xiaoming* date 2023/11/17 10:40*/ public class ExcelUti…...

    2024/4/27 3:39:11
  7. Spring cloud负载均衡@LoadBalanced LoadBalancerClient

    LoadBalance vs Ribbon 由于Spring cloud2020之后移除了Ribbon&#xff0c;直接使用Spring Cloud LoadBalancer作为客户端负载均衡组件&#xff0c;我们讨论Spring负载均衡以Spring Cloud2020之后版本为主&#xff0c;学习Spring Cloud LoadBalance&#xff0c;暂不讨论Ribbon…...

    2024/4/27 12:24:35
  8. TSINGSEE青犀AI智能分析+视频监控工业园区周界安全防范方案

    一、背景需求分析 在工业产业园、化工园或生产制造园区中&#xff0c;周界防范意义重大&#xff0c;对园区的安全起到重要的作用。常规的安防方式是采用人员巡查&#xff0c;人力投入成本大而且效率低。周界一旦被破坏或入侵&#xff0c;会影响园区人员和资产安全&#xff0c;…...

    2024/4/27 12:24:46
  9. VB.net WebBrowser网页元素抓取分析方法

    在用WebBrowser编程实现网页操作自动化时&#xff0c;常要分析网页Html&#xff0c;例如网页在加载数据时&#xff0c;常会显示“系统处理中&#xff0c;请稍候..”&#xff0c;我们需要在数据加载完成后才能继续下一步操作&#xff0c;如何抓取这个信息的网页html元素变化&…...

    2024/4/27 3:39:08
  10. 【Objective-C】Objective-C汇总

    方法定义 参考&#xff1a;https://www.yiibai.com/objective_c/objective_c_functions.html Objective-C编程语言中方法定义的一般形式如下 - (return_type) method_name:( argumentType1 )argumentName1 joiningArgument2:( argumentType2 )argumentName2 ... joiningArgu…...

    2024/4/27 3:39:07
  11. 【洛谷算法题】P5713-洛谷团队系统【入门2分支结构】

    &#x1f468;‍&#x1f4bb;博客主页&#xff1a;花无缺 欢迎 点赞&#x1f44d; 收藏⭐ 留言&#x1f4dd; 加关注✅! 本文由 花无缺 原创 收录于专栏 【洛谷算法题】 文章目录 【洛谷算法题】P5713-洛谷团队系统【入门2分支结构】&#x1f30f;题目描述&#x1f30f;输入格…...

    2024/4/27 3:39:07
  12. 【ES6.0】- 扩展运算符(...)

    【ES6.0】- 扩展运算符... 文章目录 【ES6.0】- 扩展运算符...一、概述二、拷贝数组对象三、合并操作四、参数传递五、数组去重六、字符串转字符数组七、NodeList转数组八、解构变量九、打印日志十、总结 一、概述 **扩展运算符(...)**允许一个表达式在期望多个参数&#xff0…...

    2024/4/27 12:44:49
  13. 摩根看好的前智能硬件头部品牌双11交易数据极度异常!——是模式创新还是饮鸩止渴?

    文 | 螳螂观察 作者 | 李燃 双11狂欢已落下帷幕&#xff0c;各大品牌纷纷晒出优异的成绩单&#xff0c;摩根士丹利投资的智能硬件头部品牌凯迪仕也不例外。然而有爆料称&#xff0c;在自媒体平台发布霸榜各大榜单喜讯的凯迪仕智能锁&#xff0c;多个平台数据都表现出极度异常…...

    2024/4/26 17:59:13
  14. Go语言常用命令详解(二)

    文章目录 前言常用命令go bug示例参数说明 go doc示例参数说明 go env示例 go fix示例 go fmt示例 go generate示例 总结写在最后 前言 接着上一篇继续介绍Go语言的常用命令 常用命令 以下是一些常用的Go命令&#xff0c;这些命令可以帮助您在Go开发中进行编译、测试、运行和…...

    2024/4/26 22:35:59
  15. 用欧拉路径判断图同构推出reverse合法性:1116T4

    http://cplusoj.com/d/senior/p/SS231116D 假设我们要把 a a a 变成 b b b&#xff0c;我们在 a i a_i ai​ 和 a i 1 a_{i1} ai1​ 之间连边&#xff0c; b b b 同理&#xff0c;则 a a a 能变成 b b b 的充要条件是两图 A , B A,B A,B 同构。 必要性显然&#xff0…...

    2024/4/26 17:00:23
  16. 【NGINX--1】基础知识

    1、在 Debian/Ubuntu 上安装 NGINX 在 Debian 或 Ubuntu 机器上安装 NGINX 开源版。 更新已配置源的软件包信息&#xff0c;并安装一些有助于配置官方 NGINX 软件包仓库的软件包&#xff1a; apt-get update apt install -y curl gnupg2 ca-certificates lsb-release debian-…...

    2024/4/27 3:39:03
  17. Hive默认分割符、存储格式与数据压缩

    目录 1、Hive默认分割符2、Hive存储格式3、Hive数据压缩 1、Hive默认分割符 Hive创建表时指定的行受限&#xff08;ROW FORMAT&#xff09;配置标准HQL为&#xff1a; ... ROW FORMAT DELIMITED FIELDS TERMINATED BY \u0001 COLLECTION ITEMS TERMINATED BY , MAP KEYS TERMI…...

    2024/4/27 13:52:15
  18. 【论文阅读】MAG:一种用于航天器遥测数据中有效异常检测的新方法

    文章目录 摘要1 引言2 问题描述3 拟议框架4 所提出方法的细节A.数据预处理B.变量相关分析C.MAG模型D.异常分数 5 实验A.数据集和性能指标B.实验设置与平台C.结果和比较 6 结论 摘要 异常检测是保证航天器稳定性的关键。在航天器运行过程中&#xff0c;传感器和控制器产生大量周…...

    2024/4/27 13:38:13
  19. --max-old-space-size=8192报错

    vue项目运行时&#xff0c;如果经常运行慢&#xff0c;崩溃停止服务&#xff0c;报如下错误 FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory 因为在 Node 中&#xff0c;通过JavaScript使用内存时只能使用部分内存&#xff08;64位系统&…...

    2024/4/27 1:03:20
  20. 基于深度学习的恶意软件检测

    恶意软件是指恶意软件犯罪者用来感染个人计算机或整个组织的网络的软件。 它利用目标系统漏洞&#xff0c;例如可以被劫持的合法软件&#xff08;例如浏览器或 Web 应用程序插件&#xff09;中的错误。 恶意软件渗透可能会造成灾难性的后果&#xff0c;包括数据被盗、勒索或网…...

    2024/4/27 3:22:12
  21. JS原型对象prototype

    让我简单的为大家介绍一下原型对象prototype吧&#xff01; 使用原型实现方法共享 1.构造函数通过原型分配的函数是所有对象所 共享的。 2.JavaScript 规定&#xff0c;每一个构造函数都有一个 prototype 属性&#xff0c;指向另一个对象&#xff0c;所以我们也称为原型对象…...

    2024/4/26 21:29:56
  22. C++中只能有一个实例的单例类

    C中只能有一个实例的单例类 前面讨论的 President 类很不错&#xff0c;但存在一个缺陷&#xff1a;无法禁止通过实例化多个对象来创建多名总统&#xff1a; President One, Two, Three; 由于复制构造函数是私有的&#xff0c;其中每个对象都是不可复制的&#xff0c;但您的目…...

    2024/4/27 3:39:00
  23. python django 小程序图书借阅源码

    开发工具&#xff1a; PyCharm&#xff0c;mysql5.7&#xff0c;微信开发者工具 技术说明&#xff1a; python django html 小程序 功能介绍&#xff1a; 用户端&#xff1a; 登录注册&#xff08;含授权登录&#xff09; 首页显示搜索图书&#xff0c;轮播图&#xff0…...

    2024/4/26 23:53:24
  24. 电子学会C/C++编程等级考试2022年03月(一级)真题解析

    C/C++等级考试(1~8级)全部真题・点这里 第1题:双精度浮点数的输入输出 输入一个双精度浮点数,保留8位小数,输出这个浮点数。 时间限制:1000 内存限制:65536输入 只有一行,一个双精度浮点数。输出 一行,保留8位小数的浮点数。样例输入 3.1415926535798932样例输出 3.1…...

    2024/4/26 9:43:45
  25. 配置失败还原请勿关闭计算机,电脑开机屏幕上面显示,配置失败还原更改 请勿关闭计算机 开不了机 这个问题怎么办...

    解析如下&#xff1a;1、长按电脑电源键直至关机&#xff0c;然后再按一次电源健重启电脑&#xff0c;按F8健进入安全模式2、安全模式下进入Windows系统桌面后&#xff0c;按住“winR”打开运行窗口&#xff0c;输入“services.msc”打开服务设置3、在服务界面&#xff0c;选中…...

    2022/11/19 21:17:18
  26. 错误使用 reshape要执行 RESHAPE,请勿更改元素数目。

    %读入6幅图像&#xff08;每一幅图像的大小是564*564&#xff09; f1 imread(WashingtonDC_Band1_564.tif); subplot(3,2,1),imshow(f1); f2 imread(WashingtonDC_Band2_564.tif); subplot(3,2,2),imshow(f2); f3 imread(WashingtonDC_Band3_564.tif); subplot(3,2,3),imsho…...

    2022/11/19 21:17:16
  27. 配置 已完成 请勿关闭计算机,win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机...

    win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机”问题的解决方法在win7系统关机时如果有升级系统的或者其他需要会直接进入一个 等待界面&#xff0c;在等待界面中我们需要等待操作结束才能关机&#xff0c;虽然这比较麻烦&#xff0c;但是对系统进行配置和升级…...

    2022/11/19 21:17:15
  28. 台式电脑显示配置100%请勿关闭计算机,“准备配置windows 请勿关闭计算机”的解决方法...

    有不少用户在重装Win7系统或更新系统后会遇到“准备配置windows&#xff0c;请勿关闭计算机”的提示&#xff0c;要过很久才能进入系统&#xff0c;有的用户甚至几个小时也无法进入&#xff0c;下面就教大家这个问题的解决方法。第一种方法&#xff1a;我们首先在左下角的“开始…...

    2022/11/19 21:17:14
  29. win7 正在配置 请勿关闭计算机,怎么办Win7开机显示正在配置Windows Update请勿关机...

    置信有很多用户都跟小编一样遇到过这样的问题&#xff0c;电脑时发现开机屏幕显现“正在配置Windows Update&#xff0c;请勿关机”(如下图所示)&#xff0c;而且还需求等大约5分钟才干进入系统。这是怎样回事呢&#xff1f;一切都是正常操作的&#xff0c;为什么开时机呈现“正…...

    2022/11/19 21:17:13
  30. 准备配置windows 请勿关闭计算机 蓝屏,Win7开机总是出现提示“配置Windows请勿关机”...

    Win7系统开机启动时总是出现“配置Windows请勿关机”的提示&#xff0c;没过几秒后电脑自动重启&#xff0c;每次开机都这样无法进入系统&#xff0c;此时碰到这种现象的用户就可以使用以下5种方法解决问题。方法一&#xff1a;开机按下F8&#xff0c;在出现的Windows高级启动选…...

    2022/11/19 21:17:12
  31. 准备windows请勿关闭计算机要多久,windows10系统提示正在准备windows请勿关闭计算机怎么办...

    有不少windows10系统用户反映说碰到这样一个情况&#xff0c;就是电脑提示正在准备windows请勿关闭计算机&#xff0c;碰到这样的问题该怎么解决呢&#xff0c;现在小编就给大家分享一下windows10系统提示正在准备windows请勿关闭计算机的具体第一种方法&#xff1a;1、2、依次…...

    2022/11/19 21:17:11
  32. 配置 已完成 请勿关闭计算机,win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机”的解决方法...

    今天和大家分享一下win7系统重装了Win7旗舰版系统后&#xff0c;每次关机的时候桌面上都会显示一个“配置Windows Update的界面&#xff0c;提示请勿关闭计算机”&#xff0c;每次停留好几分钟才能正常关机&#xff0c;导致什么情况引起的呢&#xff1f;出现配置Windows Update…...

    2022/11/19 21:17:10
  33. 电脑桌面一直是清理请关闭计算机,windows7一直卡在清理 请勿关闭计算机-win7清理请勿关机,win7配置更新35%不动...

    只能是等着&#xff0c;别无他法。说是卡着如果你看硬盘灯应该在读写。如果从 Win 10 无法正常回滚&#xff0c;只能是考虑备份数据后重装系统了。解决来方案一&#xff1a;管理员运行cmd&#xff1a;net stop WuAuServcd %windir%ren SoftwareDistribution SDoldnet start WuA…...

    2022/11/19 21:17:09
  34. 计算机配置更新不起,电脑提示“配置Windows Update请勿关闭计算机”怎么办?

    原标题&#xff1a;电脑提示“配置Windows Update请勿关闭计算机”怎么办&#xff1f;win7系统中在开机与关闭的时候总是显示“配置windows update请勿关闭计算机”相信有不少朋友都曾遇到过一次两次还能忍但经常遇到就叫人感到心烦了遇到这种问题怎么办呢&#xff1f;一般的方…...

    2022/11/19 21:17:08
  35. 计算机正在配置无法关机,关机提示 windows7 正在配置windows 请勿关闭计算机 ,然后等了一晚上也没有关掉。现在电脑无法正常关机...

    关机提示 windows7 正在配置windows 请勿关闭计算机 &#xff0c;然后等了一晚上也没有关掉。现在电脑无法正常关机以下文字资料是由(历史新知网www.lishixinzhi.com)小编为大家搜集整理后发布的内容&#xff0c;让我们赶快一起来看一下吧&#xff01;关机提示 windows7 正在配…...

    2022/11/19 21:17:05
  36. 钉钉提示请勿通过开发者调试模式_钉钉请勿通过开发者调试模式是真的吗好不好用...

    钉钉请勿通过开发者调试模式是真的吗好不好用 更新时间:2020-04-20 22:24:19 浏览次数:729次 区域: 南阳 > 卧龙 列举网提醒您:为保障您的权益,请不要提前支付任何费用! 虚拟位置外设器!!轨迹模拟&虚拟位置外设神器 专业用于:钉钉,外勤365,红圈通,企业微信和…...

    2022/11/19 21:17:05
  37. 配置失败还原请勿关闭计算机怎么办,win7系统出现“配置windows update失败 还原更改 请勿关闭计算机”,长时间没反应,无法进入系统的解决方案...

    前几天班里有位学生电脑(windows 7系统)出问题了&#xff0c;具体表现是开机时一直停留在“配置windows update失败 还原更改 请勿关闭计算机”这个界面&#xff0c;长时间没反应&#xff0c;无法进入系统。这个问题原来帮其他同学也解决过&#xff0c;网上搜了不少资料&#x…...

    2022/11/19 21:17:04
  38. 一个电脑无法关闭计算机你应该怎么办,电脑显示“清理请勿关闭计算机”怎么办?...

    本文为你提供了3个有效解决电脑显示“清理请勿关闭计算机”问题的方法&#xff0c;并在最后教给你1种保护系统安全的好方法&#xff0c;一起来看看&#xff01;电脑出现“清理请勿关闭计算机”在Windows 7(SP1)和Windows Server 2008 R2 SP1中&#xff0c;添加了1个新功能在“磁…...

    2022/11/19 21:17:03
  39. 请勿关闭计算机还原更改要多久,电脑显示:配置windows更新失败,正在还原更改,请勿关闭计算机怎么办...

    许多用户在长期不使用电脑的时候&#xff0c;开启电脑发现电脑显示&#xff1a;配置windows更新失败&#xff0c;正在还原更改&#xff0c;请勿关闭计算机。。.这要怎么办呢&#xff1f;下面小编就带着大家一起看看吧&#xff01;如果能够正常进入系统&#xff0c;建议您暂时移…...

    2022/11/19 21:17:02
  40. 还原更改请勿关闭计算机 要多久,配置windows update失败 还原更改 请勿关闭计算机,电脑开机后一直显示以...

    配置windows update失败 还原更改 请勿关闭计算机&#xff0c;电脑开机后一直显示以以下文字资料是由(历史新知网www.lishixinzhi.com)小编为大家搜集整理后发布的内容&#xff0c;让我们赶快一起来看一下吧&#xff01;配置windows update失败 还原更改 请勿关闭计算机&#x…...

    2022/11/19 21:17:01
  41. 电脑配置中请勿关闭计算机怎么办,准备配置windows请勿关闭计算机一直显示怎么办【图解】...

    不知道大家有没有遇到过这样的一个问题&#xff0c;就是我们的win7系统在关机的时候&#xff0c;总是喜欢显示“准备配置windows&#xff0c;请勿关机”这样的一个页面&#xff0c;没有什么大碍&#xff0c;但是如果一直等着的话就要两个小时甚至更久都关不了机&#xff0c;非常…...

    2022/11/19 21:17:00
  42. 正在准备配置请勿关闭计算机,正在准备配置windows请勿关闭计算机时间长了解决教程...

    当电脑出现正在准备配置windows请勿关闭计算机时&#xff0c;一般是您正对windows进行升级&#xff0c;但是这个要是长时间没有反应&#xff0c;我们不能再傻等下去了。可能是电脑出了别的问题了&#xff0c;来看看教程的说法。正在准备配置windows请勿关闭计算机时间长了方法一…...

    2022/11/19 21:16:59
  43. 配置失败还原请勿关闭计算机,配置Windows Update失败,还原更改请勿关闭计算机...

    我们使用电脑的过程中有时会遇到这种情况&#xff0c;当我们打开电脑之后&#xff0c;发现一直停留在一个界面&#xff1a;“配置Windows Update失败&#xff0c;还原更改请勿关闭计算机”&#xff0c;等了许久还是无法进入系统。如果我们遇到此类问题应该如何解决呢&#xff0…...

    2022/11/19 21:16:58
  44. 如何在iPhone上关闭“请勿打扰”

    Apple’s “Do Not Disturb While Driving” is a potentially lifesaving iPhone feature, but it doesn’t always turn on automatically at the appropriate time. For example, you might be a passenger in a moving car, but your iPhone may think you’re the one dri…...

    2022/11/19 21:16:57