Questions tagged [lex]

Lex is a computer program that generates lexical analyzers ("scanners" or "lexers"). Lex is commonly used with the yacc parser generator.

Filter by
Sorted by
Tagged with
6
votes
0answers
375 views

Creating a new language: FreezeFlame

Where it shines FreezeFlame shines in readibility while still maintaining most of the C-like syntax. It also implements a few (Planning on several) operators that are still in testing for other ...
2
votes
0answers
51 views

Lex simple line-counting grammar

I'm trying to make a lex (flex) grammar that kicks out tokens while always being aware of the current line number. As an exercise, I made a simple grammar that accepts raw strings ...
2
votes
0answers
59 views

Parsing key:value metadata in a file

I have written some Flex and Bison code for parsing a file. The following is a simplified example of the input file as well as the code used for parsing. There are a few things I am not satisfied ...
4
votes
1answer
3k views

Yet another C++ Json Parser (Recursive)

Following on from this request Yet another C++ Json Parser A friend pointed out that he though a recursive decent parser would be more efficient. Before I agree I want to test it so I wrote it for ...
44
votes
1answer
6k views

Yet another C++ JSON parser

This is a framework for a JSON parser I put together last night. Any comments appreciated. JsonLexer.l: Breaks the input into lexemes JsonParser.y: Understands the language syntax JsonParser.h: ...