Document bash completion

This commit is contained in:
Robin Jadoul 2017-01-30 17:43:04 +01:00
parent acc2dd2ae6
commit 9777ab029d
1 changed files with 7 additions and 1 deletions

View File

@ -121,12 +121,18 @@ Conventionally, terminals are all caps, while variables are lowercase.
Comments are from a `#` to the end of the line. Comments are from a `#` to the end of the line.
### Using the parser ### Using the parser
Of course, how you use the generated parser highly depends on which backend you used to generate it. For the default c++ backend however, the easiest way of getting to know the parser is probably having a look at the class definition in the generated header file, usually named *<Parsername>.h*. Of course, how you use the generated parser highly depends on which backend you used to generate it. For the default c++ backend however, the easiest way of getting to know the parser is probably having a look at the class definition in the generated header file, usually named *<Parsername>.h*.
In general, there should be some way to run the parser, along with user defined actions, and get back the generated structure or abstract syntax tree. In general, there should be some way to run the parser, along with user defined actions, and get back the generated structure or abstract syntax tree.
### Bash completion
A file that provides bash completion is also provided for your convenience, to use it, do:
for a single session: `source Parsodus-completion.bash`
If you want it always, copy the file to */etc/bash_completion.d* or your distro's equivalent location, and start a new shell.
## More examples ## More examples
More examples can be found in the *examples* subdirectory, go ahead an have a look at them. More examples can be found in the *examples* subdirectory, go ahead an have a look at them.
Feel free to play around and experiment with them. Feel free to play around and experiment with them.