{"id":25159,"library":"dawn.js","title":"dawn.js","description":"dawn.js is a general-purpose source-to-source transpiler framework implemented in JavaScript (CoffeeScript). Version 0.1.1 provides built-in lexical parser, syntax parser (with AST generation), symbol table generator, and a customizable plugin system (Flow) for transforming code between languages. It targets developers needing autocompletion, refactoring, or cross-language compilation features. Released under MIT, but appears to be early-stage with limited documentation and infrequent updates compared to established alternatives like Babel or Recast.","status":"abandoned","version":"0.1.1","language":"javascript","source_language":"en","source_url":"https://github.com/qdwang/dawn.js","tags":["javascript","dawn.js","AST","compiler","transpiler","lex parser","syntax parser","symbol talbe","BNF parser"],"install":[{"cmd":"npm install dawn.js","lang":"bash","label":"npm"},{"cmd":"yarn add dawn.js","lang":"bash","label":"yarn"},{"cmd":"pnpm add dawn.js","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package uses ES6 modules; ensure bundler configured for ESM.","wrong":"const dawn = require('dawn.js'); new dawn.LexParser()","symbol":"LexParser","correct":"import { LexParser } from 'dawn.js'"},{"note":"SyntaxParser is a named export, not default.","wrong":"import SyntaxParser from 'dawn.js'","symbol":"SyntaxParser","correct":"import { SyntaxParser } from 'dawn.js'"},{"note":"Flow is the plugin system; available as named export.","wrong":"const Flow = require('dawn.js').Flow","symbol":"Flow","correct":"import { Flow } from 'dawn.js'"}],"quickstart":{"code":"import { LexParser, SyntaxParser, SymbolTable, Flow } from 'dawn.js';\n\nconst code = `const x = 1 + 2;`;\n\n// Lexical analysis\nconst lexer = new LexParser();\nconst tokens = lexer.analyze(code);\nconsole.log('Tokens:', tokens);\n\n// Syntax analysis (requires BNF grammar definition)\n// Minimal example using built-in grammar? Not explicitly provided.\n// Assume BNF grammar string:\nconst bnf = `\n<program> ::= <statement>\n<statement> ::= <assignment>\n<assignment> ::= \"const\" <identifier> \"=\" <expression> \";\"\n<expression> ::= <number> \"+\" <number>\n`;\nconst syntaxParser = new SyntaxParser(bnf);\nconst ast = syntaxParser.parse(tokens);\nconsole.log('AST:', ast);\n\n// Symbol table\nconst symbolTable = new SymbolTable();\nsymbolTable.build(ast);\nconsole.log('Symbols:', symbolTable);\n\n// Plugin system placeholder\nconst flow = new Flow();\n// flow.addPlugin(...);\n","lang":"javascript","description":"Demonstrates basic lexical and syntax parsing, and symbol table generation using dawn.js."},"warnings":[{"fix":"Consider alternatives like Babel, Recast, or SWC for active transpilation needs.","message":"Package appears abandoned; last update was years ago.","severity":"deprecated","affected_versions":"*"}],"env_vars":null,"search_vec":"'0.1.1':19 'altern':76 'appear':61 'ast':29,83 'autocomplet':49 'babel':78 'bnf':92 'built':22 'built-in':21 'code':42 'coffeescript':17 'compar':73 'compil':55,84 'cross':53 'cross-languag':52 'customiz':36 'dawn.js':1,2,82 'develop':47 'document':69 'earli':65 'early-stag':64 'establish':75 'featur':56 'flow':39 'framework':13 'general':6 'general-purpos':5 'generat':30,33 'implement':14 'infrequ':71 'javascript':16,81 'languag':44,54 'lex':86 'lexic':24 'like':77 'limit':68 'mit':59 'need':48 'parser':25,27,87,89,93 'plugin':37 'provid':20 'purpos':7 'recast':80 'refactor':50 'releas':57 'sourc':9,11 'source-to-sourc':8 'stage':66 'symbol':31,90 'syntax':26,88 'system':38 'tabl':32 'talb':91 'target':46 'transform':41 'transpil':12,85 'updat':72 'version':18","created_at":"2026-05-01T13:43:18.770247+00:00","updated_at":"2026-05-01T13:43:18.770247+00:00","problems":[{"fix":"npm install dawn.js (note: npm package name is dawn.js with dot)","cause":"Package not installed or wrong import path.","error":"Error: Cannot find module 'dawn.js'"},{"fix":"Use import { LexParser } from 'dawn.js' instead of require.","cause":"Incorrect import style (CommonJS vs ESM).","error":"TypeError: dawn.LexParser is not a constructor"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/qdwang/dawn.js","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/dawn.js","openapi_spec":null,"status_page":null,"smithery":null,"categories":["serialization"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-05-01","next_check":"2026-07-30","install_tag":null}}