tscc-compiler
Version:
An LALR(1) compiler compiler written in Typescript
26 lines (23 loc) • 739 B
text/typescript
import { Grammar } from '../grammar/grammar.js';
import { LexAction } from '../lexer/action';
import { DFA } from '../lexer/dfa';
import { JNode, newNode } from './node';
import { DFATable } from '../lexer/dfa-table';
export class File{
name: string;
eol: string = '\n';
grammar: Grammar = null;
lexDFA: DFA<LexAction>[] = [];
dfaTables: DFATable<LexAction>[] = [];
opt: {[s: string]: { name: JNode, val: JNode }} = {};
prefix: string = 'jj';
header: JNode[] = [];
tokenHookArg: JNode = null;
tokenHookBody: JNode = null;
output: JNode = null;
extraArgs: JNode = null;
initArg: JNode = null;
initBody: JNode = null;
epilogue: JNode = null;
sematicType: JNode = null;
}