lexer
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 708 public repositories matching this topic...
Current Behavior
f863c9490e6912ffcaeb12965fb3a567a10745ff changed the return value of yyinput() from EOF to 0 when encountering an end-of-file:
Inconsistence
But as docume
Everything in diagrams.css should be scoped to some wrapping css class, because as is it cannot be bundled with the rest of an app's css because of styles like this:
div {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
svg {
width: 100%;
}
Curre
from the docs in your readme https://github.com/csstree/csstree/blob/master/docs/parsing.md#atrule
atrule
Type: string or null
Default: null
Using for atrulePrelude context to apply atrule specific parse rules.What would the string be and how would it be used to apply specific parse rules?
This shouldn't be too difficult to add support for.
As an example, \\u\{(?:10|[0-9])[0-9a-fA-F]{0,4}\} would just expand to \\u\{(?:10|[0-9])[0-9a-fA-F]?[0-9a-fA-F]?[0-9a-fA-F]?[0-9a-fA-F]?.
That is, expand to n copies of the repeated node and m-n copies of the repeated node but optional.
The "regex optimized" version would be expanding to nested optionals, so `nnn(?:m(?:m(?:m)?)?
Prepare the parser to PHP 8 :
Work In Progress as RFC are not yet closed
Not sure if this is the right place for it, but I want people searching for it to find it.
Since I wanted one, I made a playground for Moo: https://ablingeroscar.github.io/moo-playground/ (github link)
It's not especially pretty, but it works.
Would it be possible to have the regex parser support character classes like \w within other character classes? I had a regex pattern earlier that used the character class [0-9a-zA-Z_\.-], and I attempted to simplify it with [\w\.\-]. I didn't notice this library doesn't support doing that, and was wondering just how difficult that would be to implement. For the time being i'm just expanding
-
Updated
May 10, 2020 - C++
-
Updated
Mar 20, 2020 - Swift
-
Updated
Oct 14, 2019 - TypeScript
-
Updated
May 25, 2020 - C++
Example formatter output of reduced test case:
task t;
a_pkg::foo #(x)::func();
endtaskShould be:
task t;
a_pkg::foo#(x)::func();
endtask-
Updated
Sep 25, 2018 - Swift
-
Updated
May 25, 2018 - C++
-
Updated
Apr 29, 2020 - C
-
Updated
Feb 7, 2018 - Swift
Hi there,
I appear to be getting some strange indenting errors. When I copy the quickstart .gel file and text and run the provided command, I get the error Exception: indent must be a multiple of 4, is 14 in line 24: u' user('
I am using Python 3.7.3, Visual Studio Code with spaces set to 4 and UTF-8 encoding.
Here is the copied quickstart syntax file:
# Define commonl
Current parser tries to associate comments with the entities by assuming that the comment preceding the definition belongs to that definition.
According to the specification draft:
Comments are Ignored like white space and may appear after any token, or before a LineTerminator, and have no significance to the semantic meaning of a GraphQL Document.
Documentation for options for parse error handling and recovery are nonexistent. When a parse error occurs, what happens? What options are available for handling this error? How can I provide custom behavior for the exception that is raised when a parse error occurs?
-
Updated
May 25, 2018 - JavaScript
- Wikipedia
- Wikipedia
Hi I want to check if the prevoius char is a
:. The exact example code I have is this:I want basicly to be able to check based on if the previous char is a
:the!should get a string and later reuse the look back logic to check if I am inside an array which is defined like in yaml meaning to make sure the last 2 lines of the following example don't get into the ar