Skip to main content

Questions tagged [parsing]

For questions related to the parsing stage of code compilation or interpretation. Parsing is the process of converting text-based code into the constituent logic.

11 votes
4 answers
6k views

So, nearly all (or perhaps all) C-like languages require us to use curly brackets { and } when writing a do-while loop of more ...
FlatAssembler's user avatar
0 votes
0 answers
111 views

In a "managed memory" language that I'm designing, I'm constructing grammar for the description of arbitrary object type that can simultaneously be used for initialization of objects with ...
DannyNiu's user avatar
  • 467
3 votes
1 answer
255 views

I'm developing an expression language using a LL(1) recursive descent parser. Technically it's actually LL(2) since I need an extra lookahead in one place. I'm using ANTLR 3 (ANTLRWorks) to verify ...
Nexus's user avatar
  • 31
7 votes
2 answers
356 views

In the book of Wilhelm, Seidl and Hack, " Compiler Design, Syntactic and Semantic Analysis" they write on p. 10 (bold face emphasis is mine) Most designers of programming languages have ...
Thomas Preu's user avatar
12 votes
4 answers
5k views

In Python we have the concept of a soft keyword, which makes some keywords reserved only in some special cases (e.g. match, case ...
Amir reza Riahi's user avatar
2 votes
2 answers
140 views

I'd like to confirm whether a sketch of procedure over a DCFG (deterministic context-free grammar) can maintaining full functional equivalence over building a full states transition table and loop ...
DannyNiu's user avatar
  • 467
8 votes
1 answer
1k views

I've been learning about formal languages and grammars, and I came across two terms while studying my textbook: Context-Free Grammar (CFG) and Backus-Naur Form (BNF). They both seem to be related to ...
Joe's user avatar
  • 183
8 votes
1 answer
2k views

My previous question was about how the tokenizers for programming languages which support both the ternary conditional operator ?: and labels (with the syntax ...
FlatAssembler's user avatar
3 votes
1 answer
255 views

What is this step called to convert a parse tree into a pattern tree? I need to understand terminologies on the act of conversion/rebalancing the parse tree such that the most simplistic regular ...
John Greene's user avatar
11 votes
1 answer
874 views

Programming languages can come quite far with an easy grammar like LL(1), and parsers both in the compiler and tooling can be constructed with hand-written Predictive Parsers (or be generated). When ...
Jonas's user avatar
  • 715
3 votes
1 answer
395 views

I am confused about the implementation of a global namespace in python . How are variable names mapped as keys to the objects they reference as values ,since namespace is implemented as a dictionary? ...
Silah's user avatar
  • 33
0 votes
1 answer
389 views

C (and other languages which allow variable argument lists) process function arguments from right-to-left. Pascal (and other languages with fixed-length argument lists) process function arguments from ...
warren's user avatar
  • 169
2 votes
1 answer
759 views

One of the most confusing things to me about VHDL is that the <= operator can mean both "less than or equal to" and it can be a signal assignment ...
FlatAssembler's user avatar
16 votes
4 answers
2k views

Why do many typical parsers need to have two stages: tokenization and parsing? This isn't just a helping hand for manually-constructed parsers, as even generation tools do the same. For example, the ...
Aster's user avatar
  • 3,508
28 votes
7 answers
13k views

When I started researching parsing and compiling I started with simple mathematical expression parsers. Many of the existing implementations I found have an intermediate step of converting a string ...
CPlus's user avatar
  • 10.5k

15 30 50 per page
1
2 3 4 5