summaryrefslogtreecommitdiff
path: root/scanner
AgeCommit message (Collapse)Author
2024-03-14feat: improve debug output of tokensMarc Vertes
2024-01-15chore: import from gnolangMarc Vertes
2023-10-12move to a direct byte code compiler (#8)Marc Vertes
* chore: refactor to keep only the new parser and bytecode vm * scanner: remove Token.value field * scanner: remove scanner.kind field * chore: move language specification in lang package This avoid a cyclic dependency in scanner_test which can now use the golang/GoSpec language specification for Go. * clean code * scanner: export scanner fields Also parser now generate function calls, including externals. * chore: fix lint issues * parser: handle strings * wip * parser: implement support for 'if, else, else if' statements Resolving labels in the compiler still in progress. * parser: support if statements, improve compiler * improve handling of functions * improve support of local variables * scanner: trim leading and trailing spaces * fixes to make fibonacci work * parser: improve README, fix function parameters parsing
2023-09-08scanner: automatic semi-colon insertion at EOFMarc Vertes
2023-09-06scanner: add automatic insertion of semi-colon after newlineMarc Vertes
As specified in the Go specification, adapted to the following: - the scanner recognise blocks as tokens - the scanner is multi-language: define keywords in scanner spec - as a result, we define how to skip semi-colon insertion rather than how to add it.
2023-09-06chore: refactor some APIsMarc Vertes
The scanner returns a slice of pointers to tokens instead of a slice of tokens. The parser now pass the initial node context.
2023-09-04codegen: add interpreter testsMarc Vertes
Also simplify project structure. The executable is now produced in the root directory. Work in progress.
2023-09-04scan: fix scanning blocks with inner stringsMarc Vertes
2023-09-01parser: skip comment modesMarc Vertes
Refctor node kind names by concatenating category and instance, to allow better sorting. Comments are now parsed and skipped during generation of AST.
2023-08-25chore: appease lint and vetMarc Vertes
2023-08-24doc: add diagrams to scanner and parser readmesMarc Vertes
2023-08-24fix: parser must be initialized before useMarc Vertes
2023-08-24scanner: handle long string delimiters (#7)Marc Vertes
* scanner: handle long string delimiters Strings now can be delimited by arbitrary sequences of characters. It is also possible to exclude the end delimiter, as for example required for `//` C or Go comments. * scanner: fix handling strings within blocks
2023-08-09codegen: add a bytecode generator (#5)Marc Vertes
* codegen: add a bytecode generator * cleaning scanner, parser and vm1.
2023-07-24scanner: compute numerical values (#2)Marc Vertes
The conversion to numerical values is done by the scanner so it's only done once. This will simplify and accelerate vm0 and the code generator.
2023-07-10first commitMarc Vertes