Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
cs-236:datalog-parser [2017/10/12 01:05]
brob144 [Example 1]
cs-236:datalog-parser [2018/09/25 16:46] (current)
pdiddy [FAQ]
Line 269: Line 269:
  
 The grammar is in the [http://​www.antlr.org ANTLR] format. [http://​www.antlr.org ANTLR] is a tool that takes a grammar specification like the one on this webpage and automatically turns it into a lexical analyzer and parser for several different output languages. The key changes are this: the '​|'​ character is used to separate different rules for a given non-terminal rather than a new line (much like BNF); non-terminals are lowercase; terminals are upper-case; if something is not separated by the '​|'​ character, then it is part of the same rule (see the first rule for for the datalog program example); and the first rule is the start rule. The grammar is in the [http://​www.antlr.org ANTLR] format. [http://​www.antlr.org ANTLR] is a tool that takes a grammar specification like the one on this webpage and automatically turns it into a lexical analyzer and parser for several different output languages. The key changes are this: the '​|'​ character is used to separate different rules for a given non-terminal rather than a new line (much like BNF); non-terminals are lowercase; terminals are upper-case; if something is not separated by the '​|'​ character, then it is part of the same rule (see the first rule for for the datalog program example); and the first rule is the start rule.
- +
 '''​What do I have to change in my Lexical Analyzer?'''​ '''​What do I have to change in my Lexical Analyzer?'''​
  
cs-236/datalog-parser.txt ยท Last modified: 2018/09/25 16:46 by pdiddy
Back to top
CC Attribution-Share Alike 4.0 International
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0