Give multiple times to enable a list of certain types of logs to stderr help debugging, e.g.:Note that this follows commander.js' insane variadic argumentso syntax, and thus the
./ourbigbook --log ast tokens -- README.bigb
--is required above. If you want to omit it for a single value you have to add the
=sign as in:
./ourbigbook --log=ast README.bigb
Values not documented in other sections:
ast: the full final parsed abstract syntax tree as JSON
ast-simple: a simplified view of the abstract syntax tree with one AstNode or AstArgument per line and showing only the most important fields
ast-pp-simple: view snapshots of the various abstract syntax tree post process stages, more info at: conversion process overview
ast-inside: print the AST from inside the
ourbigbook.convertcall before it returns.This is useful to debug the program if
ourbigbook.convertblows up on the next stages before returning.
db: show database transactions done by OurBigBook, to help debug stuff like cross file references
mem: show process memory usage as per Node.js'
--log perfstep: stackoverflow.com/questions/12023359/what-do-the-return-values-of-node-js-process-memoryusage-stand-for. Implies
--log perf.To use this options, you must run OurBigBook with the
--expose-gccommand line option, e.g. with:
node --expose-gc $(which ourbigbook) myfile.bigb
parse: parsing steps
tokenize: tokenization steps
tokens: final parsed token stream
ast-insidebut for tokens.Also adds token index to the output, which makes debugging the parser way easier.