标签: parsing-error

HTML解析错误

我无法找出问题所在,以及为什么我一直在Internet Explorer 8中收到此错误,因为这是我收到的唯一错误.有什么想法,或简单的解决方案?我没有注意到我的代码有任何问题,这只是让我烦恼的消息.

网页错误详情.

用户代理:Mozilla/4.0(兼容; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)时间戳:2009年9月7日星期一19: 11:13 UTC

Message: HTML Parsing Error: Unable to modify the parent container element before the child element is closed (KB927917)
Line: 0
Char: 0
Code: 0
Run Code Online (Sandbox Code Playgroud)

html user-agent mozilla parsing-error

7
推荐指数
1
解决办法
9370
查看次数

在 create-react-app 中 EXTEND_ESLINT=true 时打字稿解析错误

精简演示 - GitHub

我们目前有一个 create-react-app 项目,该项目正在进行从 Flow 到 Typescript 的增量迁移。这意味着禁用一些不需要的 ESLint 规则。为了自定义 ESLint,我添加EXTEND_ESLINT=true.env文件中。

在添加此设置之前,我的 Typescript 代码编译良好。之后,我在某些(但不是全部)Typescript 语法上遇到解析错误。

// Type guards
export function f0<T>(x: T|undefined): x is T { ...

// Constrained generics
export function f1<T extends number>(x: T) { ...

// Type assertions
... return x as T
Run Code Online (Sandbox Code Playgroud)

可能还有其他无法识别的语法我还没有找到。

迄今为止

  • 我还没有发现任何类似的问题或错误报告。我知道某些 Typescript 功能在当前的 CRA 版本中不可用,例如const enum,但我没有发现上面列出的功能的任何提及。我也很确定我的Typescript 和 ESLint 版本typescript-eslint.

  • 我尝试了许多不同的.eslintrc组合。我.eslintrc.js在附加存储库的文件中留下了一些最有希望的。当前设置是create-react-app 推荐的设置,其中 Typescript linting 在 …

parsing-error typescript reactjs create-react-app typescript-eslint

7
推荐指数
1
解决办法
2258
查看次数

奇怪的编译器错误

我刚刚用msvc碰到了这个小错误.它看起来像是一个解析问题,但我不确定.
以下给出了C2143语法错误:缺少';' 之前'}'

#include <vector>

struct X { };

X f(const std::vector<int> v)
{
  for (auto i : v)
    if (true)
      return X{};     // <--

  return X{};
}

int main()
{
  const auto x = f(std::vector<int>{});
}
Run Code Online (Sandbox Code Playgroud)

接下来的4个版本编译得很好.
这个

X f(const std::vector<int> v)
{
  for (auto i : v)
    if (true)
      return X();     // <--

  return X{};
}
Run Code Online (Sandbox Code Playgroud)

还有这个

X f(const std::vector<int> v)
{
  for (auto i : v)
    if (true) {       // <--
      return X{};     // <--
    } …
Run Code Online (Sandbox Code Playgroud)

c++ compiler-errors parsing-error

5
推荐指数
1
解决办法
316
查看次数

为什么在执行XSLT转换时出现"文件过早结束"错误?

获得#1行; 列#-1; xslt转换时文件过早发生错误

XSL:

<xsl:template match="/">
    <html>
        <head>
            <title>Real's HowTo</title>
        </head>
        <body>
            <table border="1">
                <tr>
                    <th>Titleamit</th>
                    <th>Link</th>
                </tr>
                <xsl:for-each select="mx:feed/mx:entry">
                    <tr>
                        <td>
                            <xsl:value-of select="mx:title" />
                        </td>
                        <td>
                            <xsl:value-of select="mx:published" />
                        </td>
                    </tr>
                </xsl:for-each>
            </table>
        </body>
    </html>
</xsl:template>
Run Code Online (Sandbox Code Playgroud)

XML:

<?xml version="1.0" encoding="UTF-8" ?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:clearspace="http://www.jivesoftware.com/xmlns/clearspace/rss"
xmlns:dc="http://purl.org/dc/elements/1.1/">
    <title>
        Sprint Community: Space Polls - Android
    </title>
    <link rel="alternate" href="http://community.sprint.com/baw/poll.jspa?containerType=14&container=2130" />
    <subtitle>
        List of polls
    </subtitle>
    <id>
        http://community.sprint.com/baw/poll.jspa?containerType=14&container=2130
    </id>
    <generator uri="http://jivesoftware.com/products/clearspace/" version="4.5.4.1">
        Jive SBS
    </generator>
    <updated>
        2010-02-08T17:30:00Z
    </updated>
    <dc:date>
        2010-02-08T17:30:00Z
    </dc:date>
    <dc:language>
        en …
Run Code Online (Sandbox Code Playgroud)

java xml parsing-error

4
推荐指数
1
解决办法
4万
查看次数

Solidity ParserError:预期标识符但得到“=”

为什么下面的代码包含错误 ( ParserError: Expected identifier but got '=')。

contract Test {

    struct Box {
        uint size;
    }

    Box public box;
    box.size = 3;    //<-- error here

    constructor() public {
    }

}
Run Code Online (Sandbox Code Playgroud)

如果我把它box.size = 3;放入 constructor !

contract Test {

    struct Box {
        uint size;
    }

    Box public box;

    constructor() public {
        box.size = 3;
    }

}
Run Code Online (Sandbox Code Playgroud)

constructor identifier parsing-error ethereum solidity

4
推荐指数
1
解决办法
1万
查看次数

ANTLR4解析错误:输入时没有可行的替代方案

我有一个语法显然是错误的,因为解析一个简单的文件会产生奇怪的错误信息.

我尽可能地简化了以下语法而没有改变错误(如果你删除'this'了ANTLRWorks的树gui输出,那么int样本文件的标记会有不同的颜色,尽管结构看起来是相同的).

grammar DepClsJ_no_java_debug;

module   : ( methodDecl )* ;

methodDecl   : pathType Identifier '()' block ;

pathType   : Identifier | 'this' ;

block   : '{'
    ( localDecl ';'  )*
    ( statement  )*
    ( expr  )?
    '}'   ;

localDecl   : pathType Identifier ( '=' expr )?;

statement   : block | expr ';' ;

expr   : dotExpr ( '=' dotExpr  )* ;    dotExpr   : Identifier ( '.' Identifier )* ;

Identifier   : ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'0'..'9'|'_')* ;
Run Code Online (Sandbox Code Playgroud)

演示代码:

void …
Run Code Online (Sandbox Code Playgroud)

grammar antlr parsing-error parse-error antlr4

1
推荐指数
1
解决办法
5010
查看次数