Sha256: bce69e0b171407c3e399e513aae7d886052cca7d9925969d3d6a39947e014ddf
Contents?: true
Size: 1.45 KB
Versions: 2
Compression:
Stored size: 1.45 KB
Contents
# encoding: utf-8 require 'antelope/ace/errors' require 'antelope/ace/scanner' require 'antelope/ace/compiler' module Antelope # Defines the Ace file. The Ace file format works similarly to # bison's y file format. The Ace file is seperated into three # parts: # # <first> # %% # <second> # %% # <third> # # All parts may be empty; thus, the minimal file that Ace will # accept would be # # %% # %% # # The first part consists of _directives_ and _blocks_; directives # look something like `'%' <directive>[ <argument>]*\n`, with # `<directive>` being any alphanumerical character, including # underscores and dashes, and `<argument>` being any word character # or a quote-delimited string. Blocks consist of # `'%{" <content> "\n" "\s"* "%}'`, with `<content>` being any # characters. The content is copied directly into the body of the # output. # # The second part consists of rules. Rules look something like # this: # # <nonterminal>: (<nonterminal> | <terminal>)* ['{" <content> "}"] ["|" (<nonterminal> | <terminal>)* ["{" <content> "}']]* [;] # # Where `<nonterminal>` is any lowercase alphabetical cahracter, # `<terminal>` is any uppercase alphabetical character, and # `<content>` is code to be used in the output file upon matching # the specific rule. # # The third part consists of a body, which is copied directly into # the output. module Ace end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
antelope-0.4.1 | lib/antelope/ace.rb |
antelope-0.4.0 | lib/antelope/ace.rb |