Displaying 1 to 9 from 9 results

go-ast-book - :books: 《Go语法树入门——开启自制编程语言和编译器之旅》(开源免费图书/Go语言进阶/掌握抽象语法树/Go语言AST/凹语言)

  •    Go

:books: 《Go语法树入门——开启自制编程语言和编译器之旅》(开源免费图书/Go语言进阶/掌握抽象语法树/Go语言AST/凹语言)

language - A fast PEG parser written in JavaScript with first class errors

  •    Objective-J

Language.js is an experimental new parser based on PEG (Parsing Expression Grammar), with the special addition of the "naughty OR" operator to handle errors in a unique new way. It makes use of memoization to achieve linear time parsing speed, and support for automatic cut placement is coming to maintain mostly constant space as well (for a discussion of cut operators see: www.ialab.cs.tsukuba.ac.jp/~mizusima/publications/paste513-mizushima.pdf). The most unique addition Language.js makes to PEG is how it handles errors. No parse ever fails in Language.js, instead SyntaxErrorNodes are placed into the resultant tree. This makes it trivial to do things like write syntax highlighters that have live error reporting. This also means that Language.js is very competent at handling multiple errors (as opposed to aborting on the first one that is reached).

Ragel lexer and Bison parser integration example

  •    C++

This a sample of win(bison) parser and Ragel lexer integration, with unicode support

simple_wc_example - simple word count example using flex/bison parser

  •    C++

Between the tutorial and the code you should be able to get started with more advanced projects using C++ and Flex/Bison. Admittedly the example itself is a bit contrived, however it's mean to be simple and get the point across. If there are changes in Flex/Bison that prevent the example from compiling or if you just have improvements, feel free to generate a pull request or just shoot me an e-mail. To compile just download and run make, there's a super simple test harness to make sure it runs in the test dir.

yascm - Yet Another Scheme Interpreter using flex and bison

  •    C

Yet Another Scheme Interpreter. GPL Version 3, see the COPYING file included in the source distribution.

vscode-lex-flex-yacc-bison - Syntax highlighting for Lex, Flex, Yacc and Bison in VSCode.

  •    Javascript

Syntax highlighting for Lex, Flex, Yacc and Bison. Lex and Yacc can generate program fragments that solve the first task.

flex-bison-indentation - An example of how to correctly parse python-like indentation-scoped files using flex (and bison)


An example of how to correctly parse python-like indentation-scoped files using flex (and bison). Besides that, this project also serves as a template CMake-based project for a flex&bison parser and includes rules to track the current line and column of the scanner.