analyzes a simple symbolic language described via BNF and deems the input part or not a part of the language
License
kooplar/symbolic-language-analyzer
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
symbolic language syntactic analyzer This project defines a language via a BNF grammar, and implements a lexical and syntactical analisis of a given input string based on the rules defined in the language. The project was coded in C and has no dependencies. All parsing, tokenization, and syntactical analysis is done in house. The language specifications are under specifications/ to compile the analyzer, run 'make' under src/ to analize a given string, feed it to the analyzer as a file via parameter. There are some test examples under tests/ (some tests are supposed to fail) example: $ cd src; ./sla ../tests/TEST1 @X#Y(->(X)&c(Y)&X!=Y&vel(X)<vel(Y)->k(Y)) (01)[@] (02)[X] (03)[#] (04)[Y] (05)[(] (06)[->] (07)[(] (08)[X] (09)[)] (10)[&] (11)[c] (12)[(] (13)[Y] (14)[)] (15)[&] (16)[X] (17)[!=] (18)[Y] (19)[&] (20)[vel] (21)[(] (22)[X] (23)[)] (24)[<] (25)[vel] (26)[(] (27)[Y] (28)[)] (29)[->] (30)[k] (31)[(] (32)[Y] (33)[)] (34)[)] ERROR: expected termino got: [->] token number: (6) Here we can see the tokenization of the input, and that token 6 has an error (in this case this token cannot be followed by the previous one, as described in the specification)
About
analyzes a simple symbolic language described via BNF and deems the input part or not a part of the language
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published