Skip to content
#

parse

A grammar describes the syntax of a programming language, and might be defined in Backus-Naur form (BNF). A lexer performs lexical analysis, turning text into tokens. A parser takes tokens and builds a data structure like an abstract syntax tree (AST). The parser is concerned with context: does the sequence of tokens fit the grammar? A compiler is a combined lexer and parser, built for a specific grammar.

Here are 1,190 public repositories matching this topic...

enexusde
enexusde commented Mar 13, 2020

Many methods that allows instreams as parameter exposes infos about closing the stream. Example:
Properties#load:

  • The specified stream remains open after this method returns.

This information is very usefull. I miss that in Jsoup.parse();

After intensive inspection of the sourcecode I was able to find out that the instream is not closed. To avoid this inspection-work the documentation sh

vdenisenko-waverley
vdenisenko-waverley commented Apr 29, 2020

Documentation saying:

Key with no values (such as an empty object or array) will return nothing

However there are cases when this behavior is not desirable. It brings inconsistencies between stringify and parse methods, meaning same object can't be stringified and then parsed. Example:

qs.stringify({ foo: [], bar: 1 })
// -> "bar=1"

qs.parse("bar=1")
// -> {bar: "1"}

F

rbalet
rbalet commented Nov 19, 2019

🐛 Bug Report

when using backtick within a table, the pipe | wont be espace by the backslash \
(originally raised here)

To Reproduce

try this code within a docusaurus md file

| Test                            | x        | x   |
| ------------------------------- | -------- | --- |
| `this pipe \| should be espace` |
felixvuo
felixvuo commented Dec 18, 2019

I think it would be nice to have the option to dump a raw graphviz DOT file instead of the sppf.png for a few reasons:

  • the file size is a lot smaller
  • it's nice to be able to "do things" with the resulting tree in its structured form, rather than navigate the rendered bitmap
  • it's only one extra (or no extra) line and could be optional, e.g. if you've turned on "debug" mode.

Any though

techyourchance
techyourchance commented Jul 14, 2019

After several hours of debug, I've finally found the problem in client's app: ParseObject.unpinAll() unpins only the objects that were pinned using default name (automatically assigned if no explicit name specified upon pinning).

Current JavaDoc of unipinAll():

Removes the objects and every object they point to in the local datastore, recursively.

IMHO, the documentation of unpinAll() m

alexholy
alexholy commented Apr 15, 2018

There is a lot of content out there that uses this behavior. Actually, HTML5 mandates that

<p>1<p>2<h1>head1</h1>

and

<p>1</p><p>2</p><h1>head1</h1>

MUST be treated equally. Sadly, some HTML edit components emit such stuff.

At present the parser looses this content:

/*	
See: http://www.w3.org/TR/html50/grouping-content.html#the-p-element

A p element's
donaldtone
donaldtone commented Mar 3, 2019

options.delimiters
Type: String
Default: ---

Open and close delimiters can be passed in as an array of strings.

Example:

// format delims as a string
matter.read('file.md', {delims: '~~~'});
// or an array (open/close)
matter.read('file.md', {delims: ['~~~', '~~~']});

the example is wrong.
it should use delimiters instead of delims.

like that:

Example:

/
matthoskins1980
matthoskins1980 commented Oct 5, 2019

ORIGINAL STRING: Bianchette, Michael David
PARSED TOKENS: [('Bianchette,', 'Surname'), ('Michael', 'GivenName'), ('David', 'Surname')]
UNCERTAIN LABEL: Surname

When this error is raised, it's likely that either (1) the string is not a valid person/corporation name or (2) some tokens were labeled incorrectly

To report an error in labeling a valid name, open an issue at https://github.c

You can’t perform that action at this time.